@@ -18,7 +18,6 @@ |
||
| 18 | 18 | use CKSource\CKFinder\Event\BeforeCommandEvent; |
| 19 | 19 | use CKSource\CKFinder\Event\CKFinderEvent; |
| 20 | 20 | use CKSource\CKFinder\Exception\InvalidCommandException; |
| 21 | -use CKSource\CKFinder\Exception\InvalidRequestException; |
|
| 22 | 21 | use CKSource\CKFinder\Exception\MethodNotAllowedException; |
| 23 | 22 | use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; |
| 24 | 23 | use Symfony\Component\HttpFoundation\Request; |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | /** |
| 60 | 60 | * @param string $fileName |
| 61 | 61 | * @param CKFinder $app |
| 62 | - * @param null $newFileName |
|
| 62 | + * @param string $newFileName |
|
| 63 | 63 | */ |
| 64 | 64 | public function __construct($fileName, CKFinder $app, $newFileName = null) |
| 65 | 65 | { |
@@ -184,7 +184,7 @@ |
||
| 184 | 184 | /** |
| 185 | 185 | * Returns file contents. |
| 186 | 186 | * |
| 187 | - * @return resource contents stream |
|
| 187 | + * @return string|false contents stream |
|
| 188 | 188 | */ |
| 189 | 189 | public function getContents() |
| 190 | 190 | { |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | * For example for a file named `file.foo.bar.baz` it will return an array containing |
| 96 | 96 | * `['foo', 'bar', 'baz']`. |
| 97 | 97 | * |
| 98 | - * @param null $newFileName the file name to check if it is different than the current file name (for example for validation of |
|
| 98 | + * @param null|string $newFileName the file name to check if it is different than the current file name (for example for validation of |
|
| 99 | 99 | * a new file name in edited files). |
| 100 | 100 | * |
| 101 | 101 | * @return array |
@@ -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 | */ |