@@ -119,13 +119,13 @@ |
||
| 119 | 119 | |
| 120 | 120 | // Prep this model |
| 121 | 121 | $this->setPath($path) |
| 122 | - ->setSplFileInfo(new SplFileInfo($path)) |
|
| 123 | - ->setOriginalWidth($width) |
|
| 124 | - ->setOriginalHeight($height) |
|
| 125 | - ->setTargetWidth($targetWidth) |
|
| 126 | - ->setTargetHeight($targetHeight) |
|
| 127 | - ->calculateCropPositions($cropMode, $x, $y) |
|
| 128 | - ->setTargetPath($this->generateFileName()); |
|
| 122 | + ->setSplFileInfo(new SplFileInfo($path)) |
|
| 123 | + ->setOriginalWidth($width) |
|
| 124 | + ->setOriginalHeight($height) |
|
| 125 | + ->setTargetWidth($targetWidth) |
|
| 126 | + ->setTargetHeight($targetHeight) |
|
| 127 | + ->calculateCropPositions($cropMode, $x, $y) |
|
| 128 | + ->setTargetPath($this->generateFileName()); |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | /** |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | public function __construct(string $path, int $targetWidth, int $targetHeight, string $cropMode = self::CENTERED_CROP, int $x = 0, int $y = 0) |
| 99 | 99 | { |
| 100 | 100 | // Check if given path exists |
| 101 | - if (!file_exists($path)) { |
|
| 101 | + if ( ! file_exists($path)) { |
|
| 102 | 102 | throw new InvalidArgumentException(sprintf('The provided file(%s) does not exist.', $path)); |
| 103 | 103 | } |
| 104 | 104 | |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | int $cropPositionY = 0 |
| 172 | 172 | ): Image { |
| 173 | 173 | // Check if we've recieved a valid crop modus |
| 174 | - if (!in_array($cropMode, self::CROP_MODUS)) { |
|
| 174 | + if ( ! in_array($cropMode, self::CROP_MODUS)) { |
|
| 175 | 175 | throw new InvalidArgumentException( |
| 176 | 176 | sprintf( |
| 177 | 177 | 'Crop mode \'%s\' is not a valid mode. Choose one of the following %s', |