@@ -74,9 +74,9 @@ |
||
74 | 74 | { |
75 | 75 | Storage::disk($disk ?: $this->disk) |
76 | 76 | ->putFileAs( |
77 | - path: $this->getBasePath($id, Larupload::ORIGINAL_FOLDER), |
|
78 | - file: $this->file, |
|
79 | - name: $this->output['name'] |
|
77 | + path : $this->getBasePath($id, Larupload::ORIGINAL_FOLDER), |
|
78 | + file : $this->file, |
|
79 | + name : $this->output['name'] |
|
80 | 80 | ); |
81 | 81 | } |
82 | 82 |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | * @param string|null $key |
17 | 17 | * @return object|string|integer|null |
18 | 18 | */ |
19 | - public function meta(string $key = null): object|int|string|null |
|
19 | + public function meta(string $key = null): object | int | string | null |
|
20 | 20 | { |
21 | 21 | if ($key) { |
22 | 22 | $meta = $this->output; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * @param string $style |
91 | 91 | * @return RedirectResponse|StreamedResponse|null |
92 | 92 | */ |
93 | - public function download(string $style = Larupload::ORIGINAL_FOLDER): StreamedResponse|RedirectResponse|null |
|
93 | + public function download(string $style = Larupload::ORIGINAL_FOLDER): StreamedResponse | RedirectResponse | null |
|
94 | 94 | { |
95 | 95 | $path = $this->prepareStylePath($style); |
96 | 96 |
@@ -49,7 +49,7 @@ |
||
49 | 49 | return $path; |
50 | 50 | } |
51 | 51 | |
52 | - protected function storageDownload(string $path): StreamedResponse|RedirectResponse|null |
|
52 | + protected function storageDownload(string $path): StreamedResponse | RedirectResponse | null |
|
53 | 53 | { |
54 | 54 | if (isset($this->file) and $this->file == LARUPLOAD_NULL) { |
55 | 55 | return null; |
@@ -75,7 +75,7 @@ |
||
75 | 75 | */ |
76 | 76 | protected function outputToObject(): object |
77 | 77 | { |
78 | - $output = (object)$this->output; |
|
78 | + $output = (object) $this->output; |
|
79 | 79 | |
80 | 80 | if ($this->camelCaseResponse) { |
81 | 81 | $output->mimeType = $output->mime_type; |
@@ -47,7 +47,7 @@ |
||
47 | 47 | * @param string|null $name |
48 | 48 | * @return object|null |
49 | 49 | */ |
50 | - public function getAttachments(string $name = null): object|null |
|
50 | + public function getAttachments(string $name = null): object | null |
|
51 | 51 | { |
52 | 52 | if ($name) { |
53 | 53 | if ($attachment = $this->getAttachment($name)) { |
@@ -41,7 +41,7 @@ |
||
41 | 41 | /** |
42 | 42 | * @internal |
43 | 43 | */ |
44 | - public function download(string $style = 'original'): StreamedResponse|RedirectResponse|null |
|
44 | + public function download(string $style = 'original'): StreamedResponse | RedirectResponse | null |
|
45 | 45 | { |
46 | 46 | $this->internalException(); |
47 | 47 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | /** |
22 | 22 | * @internal |
23 | 23 | */ |
24 | - public function meta(string $key = null): object|int|string|null |
|
24 | + public function meta(string $key = null): object | int | string | null |
|
25 | 25 | { |
26 | 26 | if ($this->internalFunctionIsCallable) { |
27 | 27 | return parent::meta($key); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | private FFMpegMeta $meta; |
33 | 33 | |
34 | - private Video|Audio $media; |
|
34 | + private Video | Audio $media; |
|
35 | 35 | |
36 | 36 | |
37 | 37 | /** |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | |
65 | - public function getMedia(): Video|Audio |
|
65 | + public function getMedia(): Video | Audio |
|
66 | 66 | { |
67 | 67 | return $this->media; |
68 | 68 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | return $this; |
101 | 101 | } |
102 | 102 | |
103 | - public function capture(int|float|null $fromSeconds, ImageStyle $style, string $saveTo, bool $withDominantColor = false): ?string |
|
103 | + public function capture(int | float | null $fromSeconds, ImageStyle $style, string $saveTo, bool $withDominantColor = false): ?string |
|
104 | 104 | { |
105 | 105 | $dominantColor = null; |
106 | 106 | $saveTo = get_larupload_save_path($this->disk, $saveTo); |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | return $hls->export($styles, $basePath, $fileName); |
142 | 142 | } |
143 | 143 | |
144 | - public function resize(VideoStyle|ImageStyle|StreamStyle $style): void |
|
144 | + public function resize(VideoStyle | ImageStyle | StreamStyle $style): void |
|
145 | 145 | { |
146 | 146 | $dimension = $this->dimension($style); |
147 | 147 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | } |
158 | 158 | } |
159 | 159 | |
160 | - public function crop(VideoStyle|ImageStyle|StreamStyle $style): void |
|
160 | + public function crop(VideoStyle | ImageStyle | StreamStyle $style): void |
|
161 | 161 | { |
162 | 162 | $meta = $this->getMeta(); |
163 | 163 | $width = $style->width ?? null; |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | } |
179 | 179 | } |
180 | 180 | |
181 | - private function frame(int|float|null $fromSeconds, array $saveTo): void |
|
181 | + private function frame(int | float | null $fromSeconds, array $saveTo): void |
|
182 | 182 | { |
183 | 183 | if (is_null($fromSeconds)) { |
184 | 184 | $fromSeconds = $this->getMeta()->duration / 2; |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | |
187 | 187 | $saveToPath = $saveTo['local']; |
188 | 188 | $commands = [ |
189 | - '-y', '-ss', (string)TimeCode::fromSeconds($fromSeconds), |
|
189 | + '-y', '-ss', (string) TimeCode::fromSeconds($fromSeconds), |
|
190 | 190 | '-i', $this->media->getPathfile(), |
191 | 191 | '-vframes', '1', |
192 | 192 | '-f', 'image2', |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | return Log::channel($channel ?: config('logging.default')); |
236 | 236 | } |
237 | 237 | |
238 | - private function dimension(VideoStyle|ImageStyle|StreamStyle $style): Dimension |
|
238 | + private function dimension(VideoStyle | ImageStyle | StreamStyle $style): Dimension |
|
239 | 239 | { |
240 | 240 | $width = $style->width ?: (!$style->height ? self::DEFAULT_SCALE : 1); |
241 | 241 | $height = $style->height ?: (!$style->width ? self::DEFAULT_SCALE : 1); |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | return new AttachmentCover($this->attachment); |
28 | 28 | } |
29 | 29 | |
30 | - public function meta(string $key = null): object|int|string|null |
|
30 | + public function meta(string $key = null): object | int | string | null |
|
31 | 31 | { |
32 | 32 | return $this->attachment->meta($key); |
33 | 33 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | return $this->attachment->url($style); |
43 | 43 | } |
44 | 44 | |
45 | - public function download(string $style = Larupload::ORIGINAL_FOLDER): StreamedResponse|RedirectResponse|null |
|
45 | + public function download(string $style = Larupload::ORIGINAL_FOLDER): StreamedResponse | RedirectResponse | null |
|
46 | 46 | { |
47 | 47 | return $this->attachment->download($style); |
48 | 48 | } |