File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
functions/slack_slash_command Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 2020use Psr \Http \Message \ResponseInterface ;
2121use GuzzleHttp \Psr7 \Response ;
2222
23- use Google_Service_Kgsearch ;
24- use Google_Service_Kgsearch_SearchResponse ;
25-
2623// [END functions_slack_setup]
2724
2825// [START functions_verify_webhook]
@@ -60,7 +57,7 @@ function isValidSlackWebhook(ServerRequestInterface $request): bool
6057/**
6158 * Format the Knowledge Graph API response into a richly formatted Slack message.
6259 */
63- function formatSlackMessage ($ kgResponse , $ query ): string
60+ function formatSlackMessage (Google_Service_Kgsearch_SearchResponse $ kgResponse , string $ query ): string
6461{
6562 $ responseJson = [
6663 'response_type ' => 'in_channel ' ,
@@ -109,7 +106,7 @@ function formatSlackMessage($kgResponse, $query): string
109106/**
110107 * Send the user's search query to the Knowledge Graph API.
111108 */
112- function searchKnowledgeGraph ($ query ): Google_Service_Kgsearch_SearchResponse
109+ function searchKnowledgeGraph (string $ query ): Google_Service_Kgsearch_SearchResponse
113110{
114111 /**
115112 * Unlike most other Cloud Functions languages, PHP does not preserve
You can’t perform that action at this time.
0 commit comments