@@ -32,22 +32,19 @@ |
||
| 32 | 32 | 'Width is required when you are in SCALE_HEIGHT mode' |
| 33 | 33 | ); |
| 34 | 34 | } |
| 35 | - } |
|
| 36 | - else if ($this->mode === LaruploadMediaStyle::SCALE_WIDTH) { |
|
| 35 | + } else if ($this->mode === LaruploadMediaStyle::SCALE_WIDTH) { |
|
| 37 | 36 | if ($this->height === null or $this->height === 0) { |
| 38 | 37 | throw new Exception( |
| 39 | 38 | 'Height is required when you are in SCALE_WIDTH mode' |
| 40 | 39 | ); |
| 41 | 40 | } |
| 42 | - } |
|
| 43 | - else if (in_array($this->mode, [LaruploadMediaStyle::CROP, LaruploadMediaStyle::FIT])) { |
|
| 41 | + } else if (in_array($this->mode, [LaruploadMediaStyle::CROP, LaruploadMediaStyle::FIT])) { |
|
| 44 | 42 | if (!$this->width or !$this->height) { |
| 45 | 43 | throw new Exception( |
| 46 | 44 | 'Width and Height are required when you are in CROP/FIT mode' |
| 47 | 45 | ); |
| 48 | 46 | } |
| 49 | - } |
|
| 50 | - else if ($this->mode === LaruploadMediaStyle::AUTO) { |
|
| 47 | + } else if ($this->mode === LaruploadMediaStyle::AUTO) { |
|
| 51 | 48 | if (!$this->width and !$this->height) { |
| 52 | 49 | throw new Exception( |
| 53 | 50 | 'Width and height are required when you are in auto mode' |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | * @param Model|string $class |
| 19 | 19 | * @param bool $standalone |
| 20 | 20 | */ |
| 21 | - protected function handleStyles(string $id, Model|string $model, bool $standalone = false): void |
|
| 21 | + protected function handleStyles(string $id, Model | string $model, bool $standalone = false): void |
|
| 22 | 22 | { |
| 23 | 23 | switch ($this->type) { |
| 24 | 24 | case LaruploadFileType::IMAGE: |
@@ -42,14 +42,12 @@ discard block |
||
| 42 | 42 | $this->initializeFFMpegQueue( |
| 43 | 43 | $model->id, $model->getMorphClass(), $standalone |
| 44 | 44 | ); |
| 45 | - } |
|
| 46 | - else { |
|
| 45 | + } else { |
|
| 47 | 46 | $this->initializeFFMpegQueue( |
| 48 | 47 | $id, $model, $standalone |
| 49 | 48 | ); |
| 50 | 49 | } |
| 51 | - } |
|
| 52 | - else { |
|
| 50 | + } else { |
|
| 53 | 51 | $this->handleVideoStyles($id); |
| 54 | 52 | } |
| 55 | 53 | |
@@ -115,8 +113,7 @@ discard block |
||
| 115 | 113 | } |
| 116 | 114 | |
| 117 | 115 | return null; |
| 118 | - } |
|
| 119 | - else if ($name and $this->styleHasFile($style)) { |
|
| 116 | + } else if ($name and $this->styleHasFile($style)) { |
|
| 120 | 117 | $name = FixExceptionNamesAction::make($name, $style)->run(); |
| 121 | 118 | $path = $this->getBasePath($this->id, $style); |
| 122 | 119 | |