1 | <?php |
||
6 | class Request implements RequestInterface |
||
7 | { |
||
8 | /** |
||
9 | * @var string |
||
10 | */ |
||
11 | protected $serviceUri; |
||
12 | |||
13 | /** |
||
14 | * @var |
||
15 | */ |
||
16 | protected $params; |
||
17 | |||
18 | /** |
||
19 | * Request constructor. |
||
20 | * |
||
21 | * @param string $keyword |
||
22 | * @param string $serviceUri |
||
23 | */ |
||
24 | public function __construct($keyword, $serviceUri) |
||
29 | |||
30 | /** |
||
31 | * Country, you want to get keyword suggestions for. |
||
32 | * |
||
33 | * @param string $countryCode Two characters of country code |
||
34 | * |
||
35 | * @return $this |
||
36 | */ |
||
37 | public function country($countryCode = 'us') |
||
42 | |||
43 | /** |
||
44 | * Language, you want to get keyword suggestions for. |
||
45 | * |
||
46 | * @param string $countryCode Two characters of country code |
||
|
|||
47 | * |
||
48 | * @return $this |
||
49 | */ |
||
50 | public function language($language = 'en') |
||
55 | |||
56 | /** |
||
57 | * Use this parameter to specify negative keywords, i.e. the keywords that you want to exclude from your results. |
||
58 | * For example, an API call that contains "keyword=iphone&exclude=case|game|price" will return keyword suggestions |
||
59 | * for the keyword "iphone" but there will be no keyword suggestions that contain words "case", "game", or "price". |
||
60 | * Meaning the keyword suggestion "best iphone price" will not show up in the results. |
||
61 | * |
||
62 | * @param array $keywords |
||
63 | * |
||
64 | * @return $this |
||
65 | */ |
||
66 | public function excludeKeywords(array $keywords = []) |
||
71 | |||
72 | /** |
||
73 | * Allows to get Search Volume, CPC and AdWords Competition data for |
||
74 | * keywords in English language if this parameter is set to "true". |
||
75 | * |
||
76 | * @param bool $flag [Default: false] |
||
77 | * |
||
78 | * @return $this |
||
79 | */ |
||
80 | public function metrics($flag = false) |
||
85 | |||
86 | /** |
||
87 | * Type of search query. |
||
88 | * Available types are: "suggestions" and "questions". |
||
89 | * |
||
90 | * @param string $type [Default: suggestions] |
||
91 | * |
||
92 | * @return $this |
||
93 | */ |
||
94 | public function type($type = 'suggestions') |
||
99 | |||
100 | /** |
||
101 | * Allows to get the full set of autocomplete results. |
||
102 | * Please note that certain percent of requests might return an error |
||
103 | * if this parameter is set to "true". |
||
104 | * |
||
105 | * @param bool|false $flag [Default: false] |
||
106 | * |
||
107 | * @return $this |
||
108 | */ |
||
109 | public function complete($flag = false) |
||
114 | |||
115 | /** |
||
116 | * @param string $paramName |
||
117 | * @param string $paramValue |
||
118 | */ |
||
119 | protected function addQueryParam($paramName, $paramValue) |
||
123 | |||
124 | /** |
||
125 | * @return \Psr\Http\Message\UriInterface |
||
126 | */ |
||
127 | public function getUri() |
||
132 | } |
||
133 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.