@@ -22,7 +22,7 @@ |
||
22 | 22 | $this->file = $this->prepareFileForFFMpegProcess(); |
23 | 23 | $this->type = GuessLaruploadFileTypeAction::make($this->file)->calc(); |
24 | 24 | |
25 | - if ( $this->type == 'VIDEO' ) { |
|
25 | + if ($this->type == 'VIDEO') { |
|
26 | 26 | $this->handleVideoStyles($this->id); |
27 | 27 | } else { |
28 | 28 | $this->handleAudioStyles($this->id); |
@@ -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 | |
@@ -65,14 +63,12 @@ discard block |
||
65 | 63 | $this->initializeFFMpegQueue( |
66 | 64 | $model->id, $model->getMorphClass(), $standalone |
67 | 65 | ); |
68 | - } |
|
69 | - else { |
|
66 | + } else { |
|
70 | 67 | $this->initializeFFMpegQueue( |
71 | 68 | $id, $model, $standalone |
72 | 69 | ); |
73 | 70 | } |
74 | - } |
|
75 | - else { |
|
71 | + } else { |
|
76 | 72 | $this->handleAudioStyles($id); |
77 | 73 | } |
78 | 74 | |
@@ -107,7 +103,9 @@ discard block |
||
107 | 103 | |
108 | 104 | static function get_class_name($classname) |
109 | 105 | { |
110 | - if ($pos = strrpos($classname, '\\')) return substr($classname, $pos + 1); |
|
106 | + if ($pos = strrpos($classname, '\\')) { |
|
107 | + return substr($classname, $pos + 1); |
|
108 | + } |
|
111 | 109 | return (string) $pos; |
112 | 110 | } |
113 | 111 | |
@@ -166,8 +164,7 @@ discard block |
||
166 | 164 | } |
167 | 165 | |
168 | 166 | return null; |
169 | - } |
|
170 | - else if ($name and $this->styleHasFile($style)) { |
|
167 | + } else if ($name and $this->styleHasFile($style)) { |
|
171 | 168 | $name = FixExceptionNamesAction::make($name, $style)->run(); |
172 | 169 | $path = $this->getBasePath($this->id, $style); |
173 | 170 |
@@ -83,7 +83,7 @@ |
||
83 | 83 | return $this; |
84 | 84 | } |
85 | 85 | |
86 | - public function audio(string $name, Mp3|Aac|Wav|Flac $format = new Mp3, int $bitrate = 128): UploadEntities |
|
86 | + public function audio(string $name, Mp3 | Aac | Wav | Flac $format = new Mp3, int $bitrate = 128): UploadEntities |
|
87 | 87 | { |
88 | 88 | $this->audioStyles[$name] = AudioStyle::make($name, $format, $bitrate); |
89 | 89 |
@@ -12,9 +12,9 @@ discard block |
||
12 | 12 | class AudioStyle extends Style |
13 | 13 | { |
14 | 14 | public readonly LaruploadMediaStyle $mode; |
15 | - public readonly Mp3|Aac|Wav|Flac $format; |
|
15 | + public readonly Mp3 | Aac | Wav | Flac $format; |
|
16 | 16 | |
17 | - public function __construct(string $name, Mp3|Aac|Wav|Flac $format = new Mp3, int $bitrate = 128) |
|
17 | + public function __construct(string $name, Mp3 | Aac | Wav | Flac $format = new Mp3, int $bitrate = 128) |
|
18 | 18 | { |
19 | 19 | parent::__construct($name); |
20 | 20 | |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $this->format = $format; |
24 | 24 | } |
25 | 25 | |
26 | - public static function make(string $name, Mp3|Aac|Wav|Flac $format = new Mp3, int $bitrate = 128): self |
|
26 | + public static function make(string $name, Mp3 | Aac | Wav | Flac $format = new Mp3, int $bitrate = 128): self |
|
27 | 27 | { |
28 | 28 | return new self($name, $format, $bitrate); |
29 | 29 | } |