@@ -140,7 +140,7 @@ |
||
| 140 | 140 | // Get the filepath |
| 141 | 141 | $explodedFilepath = explode(DIRECTORY_SEPARATOR, $this->getPath()); |
| 142 | 142 | // Reconstruct the base file path |
| 143 | - $baseFilepath = implode(DIRECTORY_SEPARATOR, array_slice($explodedFilepath, 0, count($explodedFilepath)-1)); |
|
| 143 | + $baseFilepath = implode(DIRECTORY_SEPARATOR, array_slice($explodedFilepath, 0, count($explodedFilepath) - 1)); |
|
| 144 | 144 | // Explode the filename |
| 145 | 145 | $explodedFilename = explode('.', $filename); |
| 146 | 146 | // Generate new name |
@@ -194,11 +194,11 @@ discard block |
||
| 194 | 194 | */ |
| 195 | 195 | public function scaleThumbnail(string $filepath, int $targetWidth = 0, int $targetHeight = 0) |
| 196 | 196 | { |
| 197 | - if (!file_exists($filepath) && is_file($filepath)) { |
|
| 197 | + if ( ! file_exists($filepath) && is_file($filepath)) { |
|
| 198 | 198 | throw new InvalidArgumentException('File does not exist!'); |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | - if ($targetHeight >! 0 || $targetWidth >! 0) { |
|
| 201 | + if ($targetHeight > ! 0 || $targetWidth > ! 0) { |
|
| 202 | 202 | throw new InvalidArgumentException('targetWidth or targetHeight needs to be defined.'); |
| 203 | 203 | } |
| 204 | 204 | |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | // Get the filepath |
| 213 | 213 | $explodedFilepath = explode(DIRECTORY_SEPARATOR, $filepath); |
| 214 | 214 | // Reconstruct the base file path |
| 215 | - $baseFilepath = implode(DIRECTORY_SEPARATOR, array_slice($explodedFilepath, 0, count($explodedFilepath)-1)); |
|
| 215 | + $baseFilepath = implode(DIRECTORY_SEPARATOR, array_slice($explodedFilepath, 0, count($explodedFilepath) - 1)); |
|
| 216 | 216 | // Explode the filename |
| 217 | 217 | $explodedFilename = explode('.', $filename); |
| 218 | 218 | // Generate new name |