@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | |
32 | 32 | list($type, $subType) = $this->explode($mediaType); |
33 | 33 | |
34 | - if (!array_key_exists($type, $this->allowedMediaType)){ |
|
34 | + if (!array_key_exists($type, $this->allowedMediaType)) { |
|
35 | 35 | throw new RuleException(sprintf($this->errorMessage, sprintf('%s/*', $type))); |
36 | 36 | } |
37 | 37 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | |
87 | - public function getAllowedMediaType(): array|string |
|
87 | + public function getAllowedMediaType(): array | string |
|
88 | 88 | { |
89 | 89 | return $this->allowedMediaType; |
90 | 90 | } |
@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | * @param string|string[] $extension |
32 | 32 | * @return $this |
33 | 33 | */ |
34 | - public function allow(array|string $extension): Extension |
|
34 | + public function allow(array | string $extension): Extension |
|
35 | 35 | { |
36 | - if (is_string($extension)){ |
|
36 | + if (is_string($extension)) { |
|
37 | 37 | $extension = explode(",", $extension); |
38 | 38 | } |
39 | 39 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | PATHINFO_EXTENSION |
50 | 50 | )); |
51 | 51 | |
52 | - if (!in_array($extension, $this->allowed, true)){ |
|
52 | + if (!in_array($extension, $this->allowed, true)) { |
|
53 | 53 | throw new RuleException(sprintf($this->errorMessage, $extension)); |
54 | 54 | } |
55 | 55 | } |