1 | <?php |
||
21 | class Manager extends AbstractHttpClient |
||
22 | { |
||
23 | const TOKEN_CACHE_KEY = 'commercetools-io-access-token'; |
||
24 | |||
25 | const REFRESH_TOKEN = 'refresh_token'; |
||
26 | const ACCESS_TOKEN = 'access_token'; |
||
27 | const EXPIRES_IN = 'expires_in'; |
||
28 | const ERROR = 'error'; |
||
29 | const SCOPE = 'scope'; |
||
30 | const ERROR_DESCRIPTION = 'error_description'; |
||
31 | |||
32 | /** |
||
33 | * @var array |
||
34 | */ |
||
35 | protected $cacheKeys; |
||
36 | |||
37 | /** |
||
38 | * @var CacheAdapterInterface |
||
39 | */ |
||
40 | protected $cacheAdapter; |
||
41 | |||
42 | /** |
||
43 | * @var CacheAdapterFactory |
||
44 | */ |
||
45 | protected $cacheAdapterFactory; |
||
46 | |||
47 | public function __construct($config, $cache = null) |
||
53 | 297 | ||
54 | /** |
||
55 | * @return CacheAdapterFactory |
||
56 | */ |
||
57 | public function getCacheAdapterFactory() |
||
64 | |||
65 | /** |
||
66 | * @param $cache |
||
67 | * @return $this |
||
68 | */ |
||
69 | public function setCacheAdapter($cache) |
||
75 | |||
76 | /** |
||
77 | * @return CacheAdapterInterface |
||
78 | */ |
||
79 | public function getCacheAdapter() |
||
83 | |||
84 | /** |
||
85 | * @param string $scope |
||
|
|||
86 | * @return Token |
||
87 | * @throws InvalidClientCredentialsException |
||
88 | */ |
||
89 | public function getToken() |
||
98 | |||
99 | 6 | /** |
|
100 | * @return Token |
||
101 | * @throws InvalidClientCredentialsException |
||
102 | */ |
||
103 | public function refreshToken() |
||
132 | 270 | ||
133 | 270 | protected function getCacheToken() |
|
137 | |||
138 | /** |
||
139 | * @return string |
||
140 | */ |
||
141 | protected function getCacheKey() |
||
162 | 6 | ||
163 | 6 | /** |
|
164 | * @param array $data |
||
165 | 6 | * @return Token |
|
166 | * @throws ApiException |
||
167 | * @throws \Commercetools\Core\Error\BadGatewayException |
||
168 | * @throws \Commercetools\Core\Error\GatewayTimeoutException |
||
169 | * @throws \Commercetools\Core\Error\ServiceUnavailableException |
||
170 | */ |
||
171 | protected function getBearerToken(array $data) |
||
189 | |||
190 | /** |
||
191 | * @param $data |
||
192 | * @return ResponseInterface |
||
193 | */ |
||
194 | public function execute($data) |
||
203 | |||
204 | /** |
||
205 | * @return string |
||
206 | */ |
||
207 | protected function getBaseUrl() |
||
211 | } |
||
212 |
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.