@@ -59,7 +59,7 @@ |
||
59 | 59 | |
60 | 60 | /** |
61 | 61 | * @param RequestInterface $request |
62 | - * @return ResponseInterface |
|
62 | + * @return null|Response |
|
63 | 63 | * @throws \Commercetools\Core\Error\ApiException |
64 | 64 | * @throws \Commercetools\Core\Error\BadGatewayException |
65 | 65 | * @throws \Commercetools\Core\Error\ConcurrentModificationException |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | * new protocol version. |
77 | 77 | * |
78 | 78 | * @param string $version HTTP protocol version |
79 | - * @return self |
|
79 | + * @return Response |
|
80 | 80 | */ |
81 | 81 | public function withProtocolVersion($version) |
82 | 82 | { |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | * |
182 | 182 | * @param string $name Case-insensitive header field name. |
183 | 183 | * @param string|string[] $value Header value(s). |
184 | - * @return self |
|
184 | + * @return Response |
|
185 | 185 | * @throws \InvalidArgumentException for invalid header names or values. |
186 | 186 | */ |
187 | 187 | public function withHeader($name, $value) |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | * |
203 | 203 | * @param string $name Case-insensitive header field name to add. |
204 | 204 | * @param string|string[] $value Header value(s). |
205 | - * @return self |
|
205 | + * @return Response |
|
206 | 206 | * @throws \InvalidArgumentException for invalid header names or values. |
207 | 207 | */ |
208 | 208 | public function withAddedHeader($name, $value) |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | * the named header. |
221 | 221 | * |
222 | 222 | * @param string $name Case-insensitive header field name to remove. |
223 | - * @return self |
|
223 | + * @return Response |
|
224 | 224 | */ |
225 | 225 | public function withoutHeader($name) |
226 | 226 | { |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | * new body stream. |
248 | 248 | * |
249 | 249 | * @param StreamInterface $body Body. |
250 | - * @return self |
|
250 | + * @return Response |
|
251 | 251 | * @throws \InvalidArgumentException When the body is not valid. |
252 | 252 | */ |
253 | 253 | public function withBody(StreamInterface $body) |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | * @param string $reasonPhrase The reason phrase to use with the |
286 | 286 | * provided status code; if none is provided, implementations MAY |
287 | 287 | * use the defaults as suggested in the HTTP specification. |
288 | - * @return self |
|
288 | + * @return Response |
|
289 | 289 | * @throws \InvalidArgumentException For invalid status code arguments. |
290 | 290 | */ |
291 | 291 | public function withStatus($code, $reasonPhrase = '') |
@@ -38,8 +38,6 @@ |
||
38 | 38 | protected $newPassword; |
39 | 39 | |
40 | 40 | /** |
41 | - * @param string $id |
|
42 | - * @param int $version |
|
43 | 41 | * @param string $tokenValue |
44 | 42 | * @param string $newPassword |
45 | 43 | * @param Context $context |
@@ -29,10 +29,17 @@ discard block |
||
29 | 29 | */ |
30 | 30 | protected $callbacks = []; |
31 | 31 | |
32 | + /** |
|
33 | + * @param string $cacheDir |
|
34 | + */ |
|
32 | 35 | public function __construct($cacheDir = null) |
33 | 36 | { |
34 | 37 | $this->cacheDir = !is_null($cacheDir) ? $cacheDir : realpath(__DIR__ . '/../..'); |
35 | 38 | $this->registerCallback( |
39 | + |
|
40 | + /** |
|
41 | + * @param string $cache |
|
42 | + */ |
|
36 | 43 | function ($cache) { |
37 | 44 | if ($cache instanceof Cache) { |
38 | 45 | return new DoctrineCacheAdapter($cache); |
@@ -41,6 +48,10 @@ discard block |
||
41 | 48 | } |
42 | 49 | ) |
43 | 50 | ->registerCallback( |
51 | + |
|
52 | + /** |
|
53 | + * @param string $cache |
|
54 | + */ |
|
44 | 55 | function ($cache) { |
45 | 56 | if ($cache instanceof \Redis) { |
46 | 57 | return new PhpRedisCacheAdapter($cache); |
@@ -140,7 +140,6 @@ |
||
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |
143 | - * @param bool $fuzzy |
|
144 | 143 | * @return $this |
145 | 144 | */ |
146 | 145 | public function fuzzy($level) |
@@ -43,7 +43,6 @@ |
||
43 | 43 | protected $newPassword; |
44 | 44 | |
45 | 45 | /** |
46 | - * @param string $id |
|
47 | 46 | * @param int $version |
48 | 47 | * @param string $currentPassword |
49 | 48 | * @param string $newPassword |
@@ -104,6 +104,9 @@ |
||
104 | 104 | return (!in_array($statusCode, [200, 201])); |
105 | 105 | } |
106 | 106 | |
107 | + /** |
|
108 | + * @param string $fieldName |
|
109 | + */ |
|
107 | 110 | protected function getResponseField($fieldName, $default = '') |
108 | 111 | { |
109 | 112 | $result = $this->toArray(); |
@@ -43,7 +43,6 @@ |
||
43 | 43 | protected $newPassword; |
44 | 44 | |
45 | 45 | /** |
46 | - * @param string $id |
|
47 | 46 | * @param int $version |
48 | 47 | * @param string $currentPassword |
49 | 48 | * @param string $newPassword |