@@ -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 |
@@ -61,25 +61,20 @@ discard block |
||
61 | 61 | |
62 | 62 | if ($style->mode === LaruploadMediaStyle::SCALE_HEIGHT and $style->width) { |
63 | 63 | $this->resizeLandscape($style->width); |
64 | - } |
|
65 | - else if ($style->mode == LaruploadMediaStyle::SCALE_WIDTH and $style->height) { |
|
64 | + } else if ($style->mode == LaruploadMediaStyle::SCALE_WIDTH and $style->height) { |
|
66 | 65 | $this->resizePortrait($style->height); |
67 | - } |
|
68 | - else if ($style->mode == LaruploadMediaStyle::CROP and $style->height and $style->width) { |
|
66 | + } else if ($style->mode == LaruploadMediaStyle::CROP and $style->height and $style->width) { |
|
69 | 67 | $this->resizeCrop($style->width, $style->height); |
70 | - } |
|
71 | - else if ($style->mode == LaruploadMediaStyle::FIT and $style->height and $style->width) { |
|
68 | + } else if ($style->mode == LaruploadMediaStyle::FIT and $style->height and $style->width) { |
|
72 | 69 | $this->resizeExact($style->width, $style->height); |
73 | - } |
|
74 | - else { |
|
70 | + } else { |
|
75 | 71 | $this->resizeAuto($style->width, $style->height); |
76 | 72 | } |
77 | 73 | |
78 | 74 | |
79 | 75 | if ($this->driverIsLocal) { |
80 | 76 | $this->save($saveTo); |
81 | - } |
|
82 | - else { |
|
77 | + } else { |
|
83 | 78 | list($path, $name) = split_larupload_path($saveTo); |
84 | 79 | |
85 | 80 | $tempDir = larupload_temp_dir(); |
@@ -110,8 +105,7 @@ discard block |
||
110 | 105 | |
111 | 106 | if ($file instanceof UploadedFile) { |
112 | 107 | $path = $file->getRealPath(); |
113 | - } |
|
114 | - else if (file_exists($file)) { |
|
108 | + } else if (file_exists($file)) { |
|
115 | 109 | $path = $file; |
116 | 110 | } |
117 | 111 |