@@ -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: |
@@ -10,10 +10,10 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | class AudioStyle extends Style |
| 12 | 12 | { |
| 13 | - public readonly Mp3|Aac|Wav|Flac $format; |
|
| 13 | + public readonly Mp3 | Aac | Wav | Flac $format; |
|
| 14 | 14 | |
| 15 | 15 | |
| 16 | - public function __construct(string $name, Mp3|Aac|Wav|Flac $format = new Mp3) |
|
| 16 | + public function __construct(string $name, Mp3 | Aac | Wav | Flac $format = new Mp3) |
|
| 17 | 17 | { |
| 18 | 18 | parent::__construct($name); |
| 19 | 19 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | - public static function make(string $name, Mp3|Aac|Wav|Flac $format = new Mp3): self |
|
| 24 | + public static function make(string $name, Mp3 | Aac | Wav | Flac $format = new Mp3): self |
|
| 25 | 25 | { |
| 26 | 26 | return new self($name, $format); |
| 27 | 27 | } |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | protected int $ffmpegMaxQueueNum; |
| 30 | 30 | |
| 31 | 31 | |
| 32 | - protected function ffmpeg(UploadedFile $file = null, AudioStyle|VideoStyle|null $style = null): FFMpeg |
|
| 32 | + protected function ffmpeg(UploadedFile $file = null, AudioStyle | VideoStyle | null $style = null): FFMpeg |
|
| 33 | 33 | { |
| 34 | 34 | $force = false; |
| 35 | 35 | |
@@ -80,14 +80,14 @@ |
||
| 80 | 80 | return $this; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - public function video(string $name, ?int $width = null, ?int $height = null, LaruploadMediaStyle $mode = LaruploadMediaStyle::SCALE_HEIGHT, X264|WebM|Ogg|Mp3|Aac|Wav|Flac $format = new X264, bool $padding = false): UploadEntities |
|
| 83 | + public function video(string $name, ?int $width = null, ?int $height = null, LaruploadMediaStyle $mode = LaruploadMediaStyle::SCALE_HEIGHT, X264 | WebM | Ogg | Mp3 | Aac | Wav | Flac $format = new X264, bool $padding = false): UploadEntities |
|
| 84 | 84 | { |
| 85 | 85 | $this->videoStyles[$name] = VideoStyle::make($name, $width, $height, $mode, $format, $padding); |
| 86 | 86 | |
| 87 | 87 | return $this; |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | - public function audio(string $name, Mp3|Aac|Wav|Flac $format = new Mp3): UploadEntities |
|
| 90 | + public function audio(string $name, Mp3 | Aac | Wav | Flac $format = new Mp3): UploadEntities |
|
| 91 | 91 | { |
| 92 | 92 | $this->audioStyles[$name] = AudioStyle::make($name, $format); |
| 93 | 93 | |
@@ -16,9 +16,9 @@ discard block |
||
| 16 | 16 | class VideoStyle extends Style |
| 17 | 17 | { |
| 18 | 18 | public readonly LaruploadMediaStyle $mode; |
| 19 | - public readonly X264|WebM|Ogg|Mp3|Aac|Wav|Flac $format; |
|
| 19 | + public readonly X264 | WebM | Ogg | Mp3 | Aac | Wav | Flac $format; |
|
| 20 | 20 | |
| 21 | - public function __construct(string $name, ?int $width = null, ?int $height = null, LaruploadMediaStyle $mode = LaruploadMediaStyle::SCALE_HEIGHT, X264|WebM|Ogg|Mp3|Aac|Wav|Flac $format = new X264, bool $padding = false) |
|
| 21 | + public function __construct(string $name, ?int $width = null, ?int $height = null, LaruploadMediaStyle $mode = LaruploadMediaStyle::SCALE_HEIGHT, X264 | WebM | Ogg | Mp3 | Aac | Wav | Flac $format = new X264, bool $padding = false) |
|
| 22 | 22 | { |
| 23 | 23 | parent::__construct($name, $width, $height, $padding); |
| 24 | 24 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $this->validateDimension(); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - public static function make(string $name, ?int $width = null, ?int $height = null, LaruploadMediaStyle $mode = LaruploadMediaStyle::SCALE_HEIGHT, X264|WebM|Ogg|Mp3|Aac|Wav|Flac $format = new X264, bool $padding = false): self |
|
| 31 | + public static function make(string $name, ?int $width = null, ?int $height = null, LaruploadMediaStyle $mode = LaruploadMediaStyle::SCALE_HEIGHT, X264 | WebM | Ogg | Mp3 | Aac | Wav | Flac $format = new X264, bool $padding = false): self |
|
| 32 | 32 | { |
| 33 | 33 | return new self($name, $width, $height, $mode, $format, $padding); |
| 34 | 34 | } |