@@ -87,17 +87,17 @@ |
||
| 87 | 87 | * @param int|string $videoBitrate |
| 88 | 88 | * @throws Exception |
| 89 | 89 | */ |
| 90 | - public static function streamIsValid(string $name, int $width, int $height, int|string $audioBitrate, int|string $videoBitrate): void |
|
| 90 | + public static function streamIsValid(string $name, int $width, int $height, int | string $audioBitrate, int | string $videoBitrate): void |
|
| 91 | 91 | { |
| 92 | 92 | if (ctype_alnum($name) === false) { |
| 93 | 93 | throw new Exception('stream name [' . $name . '] should be an alpha numeric string'); |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | - if($width <= 0) { |
|
| 96 | + if ($width <= 0) { |
|
| 97 | 97 | throw new Exception('width [' . $width . '] should be a positive number'); |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - if($height <= 0) { |
|
| 100 | + if ($height <= 0) { |
|
| 101 | 101 | throw new Exception('height [' . $height . '] should be a positive number'); |
| 102 | 102 | } |
| 103 | 103 | |
@@ -495,7 +495,7 @@ discard block |
||
| 495 | 495 | * @return $this |
| 496 | 496 | * @throws Exception |
| 497 | 497 | */ |
| 498 | - public function stream(string $name, int $width, int $height, int|string $audioBitrate, int|string $videoBitrate): UploadEntities |
|
| 498 | + public function stream(string $name, int $width, int $height, int | string $audioBitrate, int | string $videoBitrate): UploadEntities |
|
| 499 | 499 | { |
| 500 | 500 | Validator::streamIsValid($name, $width, $height, $audioBitrate, $videoBitrate); |
| 501 | 501 | |
@@ -599,12 +599,12 @@ discard block |
||
| 599 | 599 | $unit = substr($number, -1); |
| 600 | 600 | |
| 601 | 601 | if (!array_key_exists($unit, $units)) { |
| 602 | - return (int)$number; |
|
| 602 | + return (int) $number; |
|
| 603 | 603 | } |
| 604 | 604 | |
| 605 | - $number = (float)$number * $units[$unit]; |
|
| 605 | + $number = (float) $number * $units[$unit]; |
|
| 606 | 606 | |
| 607 | - return (int)$number; |
|
| 607 | + return (int) $number; |
|
| 608 | 608 | } |
| 609 | 609 | |
| 610 | 610 | /** |
@@ -685,7 +685,7 @@ discard block |
||
| 685 | 685 | * @param string $path |
| 686 | 686 | * @return StreamedResponse|RedirectResponse|null |
| 687 | 687 | */ |
| 688 | - protected function storageDownload(string $path): StreamedResponse|RedirectResponse|null |
|
| 688 | + protected function storageDownload(string $path): StreamedResponse | RedirectResponse | null |
|
| 689 | 689 | { |
| 690 | 690 | if (isset($this->file) and $this->file == LARUPLOAD_NULL) { |
| 691 | 691 | return null; |
@@ -730,7 +730,7 @@ discard block |
||
| 730 | 730 | */ |
| 731 | 731 | protected function outputToObject(): object |
| 732 | 732 | { |
| 733 | - $output = (object)$this->output; |
|
| 733 | + $output = (object) $this->output; |
|
| 734 | 734 | |
| 735 | 735 | if ($this->camelCaseResponse) { |
| 736 | 736 | $output->mimeType = $output->mime_type; |