@@ -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 |
@@ -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 |
@@ -45,6 +45,9 @@ |
||
| 45 | 45 | $this->setAction('setLocale'); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | + /** |
|
| 49 | + * @param string $locale |
|
| 50 | + */ |
|
| 48 | 51 | public function setLocale($locale) |
| 49 | 52 | { |
| 50 | 53 | $locale = \Locale::canonicalize($locale); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * @param MessageFormatter $formatter Formatter used to create message strings. |
| 58 | 58 | * @param string $logLevel Level at which to log requests. |
| 59 | 59 | * |
| 60 | - * @return callable Returns a function that accepts the next handler. |
|
| 60 | + * @return \Closure Returns a function that accepts the next handler. |
|
| 61 | 61 | */ |
| 62 | 62 | private static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = LogLevel::INFO) |
| 63 | 63 | { |
@@ -90,6 +90,9 @@ discard block |
||
| 90 | 90 | }; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | + /** |
|
| 94 | + * @param \Closure $handler |
|
| 95 | + */ |
|
| 93 | 96 | public function addHandler($handler) |
| 94 | 97 | { |
| 95 | 98 | $this->client->getConfig('handler')->push($handler); |
@@ -11,11 +11,9 @@ |
||
| 11 | 11 | use GuzzleHttp\MessageFormatter; |
| 12 | 12 | use GuzzleHttp\Middleware; |
| 13 | 13 | use GuzzleHttp\Pool; |
| 14 | -use GuzzleHttp\Promise\PromiseInterface; |
|
| 15 | 14 | use Psr\Http\Message\RequestInterface; |
| 16 | 15 | use Psr\Http\Message\ResponseInterface; |
| 17 | 16 | use Psr\Log\LoggerInterface; |
| 18 | -use Commercetools\Core\Error\Message; |
|
| 19 | 17 | use Commercetools\Core\Error\ApiException; |
| 20 | 18 | use Psr\Log\LogLevel; |
| 21 | 19 | |