@@ -236,7 +236,7 @@ |
||
236 | 236 | * - calculateAspectRatio(300, 200, 800, 400, false) will return 300x150 |
237 | 237 | * - calculateAspectRatio(300, 200, 800, 400, true) will return 400x200 |
238 | 238 | * |
239 | - * @return array |
|
239 | + * @return string |
|
240 | 240 | */ |
241 | 241 | public static function calculateAspectRatio($maxWidth, $maxHeight, $actualWidth, $actualHeight, $useHigherFactor = false) |
242 | 242 | { |
@@ -127,6 +127,9 @@ |
||
127 | 127 | $this->resizedImageFileName = static::createFilename($sourceFileName, $this->width, $this->height); |
128 | 128 | } |
129 | 129 | |
130 | + /** |
|
131 | + * @param string $fileName |
|
132 | + */ |
|
130 | 133 | public static function createFilename($fileName, $width, $height) |
131 | 134 | { |
132 | 135 | $pathInfo = pathinfo($fileName); |
@@ -275,6 +275,7 @@ |
||
275 | 275 | |
276 | 276 | /** |
277 | 277 | * Returns a directory path for the resized image. |
278 | + * @return string |
|
278 | 279 | */ |
279 | 280 | abstract public function getDirectory(); |
280 | 281 | } |
@@ -112,7 +112,7 @@ |
||
112 | 112 | /** |
113 | 113 | * Creates a thumbnail. |
114 | 114 | * |
115 | - * @return bool |
|
115 | + * @return boolean|null |
|
116 | 116 | * |
117 | 117 | * @throws \Exception |
118 | 118 | */ |
@@ -100,7 +100,7 @@ |
||
100 | 100 | * Checks if an array contains all specified keys. |
101 | 101 | * |
102 | 102 | * @param array $array |
103 | - * @param array $keys |
|
103 | + * @param string[] $keys |
|
104 | 104 | * |
105 | 105 | * @return `true` if the array has all required keys, `false` otherwise. |
106 | 106 | */ |
@@ -367,6 +367,10 @@ |
||
367 | 367 | return $file; |
368 | 368 | } |
369 | 369 | |
370 | + /** |
|
371 | + * @param string $class |
|
372 | + * @param string $ext |
|
373 | + */ |
|
370 | 374 | private function findFileWithExtension($class, $ext) |
371 | 375 | { |
372 | 376 | // PSR-4 lookup |
@@ -9,6 +9,9 @@ |
||
9 | 9 | */ |
10 | 10 | class BadResponseException extends RequestException |
11 | 11 | { |
12 | + /** |
|
13 | + * @param string $message |
|
14 | + */ |
|
12 | 15 | public function __construct( |
13 | 16 | $message, |
14 | 17 | RequestInterface $request, |
@@ -3,7 +3,6 @@ |
||
3 | 3 | |
4 | 4 | use GuzzleHttp\Promise as P; |
5 | 5 | use GuzzleHttp\Promise\Promise; |
6 | -use GuzzleHttp\Psr7; |
|
7 | 6 | use Psr\Http\Message\RequestInterface; |
8 | 7 | |
9 | 8 | /** |
@@ -4,7 +4,6 @@ |
||
4 | 4 | use GuzzleHttp\Exception\RequestException; |
5 | 5 | use GuzzleHttp\HandlerStack; |
6 | 6 | use GuzzleHttp\Promise\PromiseInterface; |
7 | -use GuzzleHttp\Promise\RejectedPromise; |
|
8 | 7 | use GuzzleHttp\TransferStats; |
9 | 8 | use Psr\Http\Message\RequestInterface; |
10 | 9 | use Psr\Http\Message\ResponseInterface; |