We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -9,21 +9,21 @@ |
||
9 | 9 | |
10 | 10 | class FileNameGenerator implements FileNameGeneratorInterface |
11 | 11 | { |
12 | - public function getName(string|UploadedFile|File $file): string |
|
12 | + public function getName(string | UploadedFile | File $file): string |
|
13 | 13 | { |
14 | - if (! is_string($file) && get_class($file) === File::class) { |
|
14 | + if (!is_string($file) && get_class($file) === File::class) { |
|
15 | 15 | return $file->getFileName(); |
16 | 16 | } |
17 | 17 | |
18 | 18 | return $this->getFileName($file).'.'.$this->getExtensionFromFile($file); |
19 | 19 | } |
20 | 20 | |
21 | - private function getExtensionFromFile(string|UploadedFile $file): string |
|
21 | + private function getExtensionFromFile(string | UploadedFile $file): string |
|
22 | 22 | { |
23 | 23 | return is_a($file, UploadedFile::class, true) ? $file->extension() : Str::after(mime_content_type($file), '/'); |
24 | 24 | } |
25 | 25 | |
26 | - private function getFileName(string|UploadedFile $file): string |
|
26 | + private function getFileName(string | UploadedFile $file): string |
|
27 | 27 | { |
28 | 28 | if (is_file($file)) { |
29 | 29 | return Str::of($file->getClientOriginalName())->beforeLast('.')->slug()->append('-'.Str::random(4)); |
@@ -7,5 +7,5 @@ |
||
7 | 7 | |
8 | 8 | interface FileNameGeneratorInterface |
9 | 9 | { |
10 | - public function getName(string|UploadedFile|File $file): string; |
|
10 | + public function getName(string | UploadedFile | File $file): string; |
|
11 | 11 | } |