@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | return true; |
42 | 42 | } |
43 | 43 | |
44 | - private function check(UploadedFileInterface|false $value, Ruleable $element): bool |
|
44 | + private function check(UploadedFileInterface | false $value, Ruleable $element): bool |
|
45 | 45 | { |
46 | 46 | /** @var array|scalar $options */ |
47 | 47 | foreach ($this->params as $rule => $options) { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | /** @var class-string<UploadCheckInterface> $className */ |
58 | 58 | Assert::classExists($className, sprintf('Unknown Check Upload: [%s]', $className)); |
59 | 59 | |
60 | - if ((new $className($value, $element, ...(array)$options))->check() === false) { |
|
60 | + if ((new $className($value, $element, ...(array) $options))->check() === false) { |
|
61 | 61 | return false; |
62 | 62 | } |
63 | 63 | } |
@@ -9,12 +9,12 @@ |
||
9 | 9 | |
10 | 10 | final class ExtensionsCheck implements UploadCheckInterface |
11 | 11 | { |
12 | - private UploadedFileInterface|false $value; |
|
12 | + private UploadedFileInterface | false $value; |
|
13 | 13 | private Ruleable $element; |
14 | 14 | private array $expectedExtensions; |
15 | 15 | private ?string $message; |
16 | 16 | |
17 | - public function __construct(false|UploadedFileInterface $value, Ruleable $element, string $expectedExtensions, ?string $message = null) |
|
17 | + public function __construct(false | UploadedFileInterface $value, Ruleable $element, string $expectedExtensions, ?string $message = null) |
|
18 | 18 | { |
19 | 19 | $this->value = $value; |
20 | 20 | $this->element = $element; |
@@ -9,11 +9,11 @@ |
||
9 | 9 | |
10 | 10 | final class RequiredCheck implements UploadCheckInterface |
11 | 11 | { |
12 | - private UploadedFileInterface|false $value; |
|
12 | + private UploadedFileInterface | false $value; |
|
13 | 13 | private Ruleable $element; |
14 | 14 | private ?string $message; |
15 | 15 | |
16 | - public function __construct(false|UploadedFileInterface $value, Ruleable $element, string $message = null) |
|
16 | + public function __construct(false | UploadedFileInterface $value, Ruleable $element, string $message = null) |
|
17 | 17 | { |
18 | 18 | $this->value = $value; |
19 | 19 | $this->element = $element; |
@@ -10,12 +10,12 @@ |
||
10 | 10 | |
11 | 11 | final class MaxsizeCheck implements UploadCheckInterface |
12 | 12 | { |
13 | - private UploadedFileInterface|false $value; |
|
13 | + private UploadedFileInterface | false $value; |
|
14 | 14 | private Ruleable $element; |
15 | - private int|string $thresholdSize; |
|
15 | + private int | string $thresholdSize; |
|
16 | 16 | private ?string $message; |
17 | 17 | |
18 | - public function __construct(false|UploadedFileInterface $value, Ruleable $element, int|string $thresholdSize, ?string $message = null) |
|
18 | + public function __construct(false | UploadedFileInterface $value, Ruleable $element, int | string $thresholdSize, ?string $message = null) |
|
19 | 19 | { |
20 | 20 | $this->value = $value; |
21 | 21 | $this->element = $element; |
@@ -9,11 +9,11 @@ |
||
9 | 9 | |
10 | 10 | final class SystemCheck implements UploadCheckInterface |
11 | 11 | { |
12 | - private UploadedFileInterface|false $value; |
|
12 | + private UploadedFileInterface | false $value; |
|
13 | 13 | private Ruleable $element; |
14 | 14 | private ?string $message; |
15 | 15 | |
16 | - public function __construct(false|UploadedFileInterface $value, Ruleable $element, string $message = null) |
|
16 | + public function __construct(false | UploadedFileInterface $value, Ruleable $element, string $message = null) |
|
17 | 17 | { |
18 | 18 | $this->value = $value; |
19 | 19 | $this->element = $element; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $this->addRule( |
32 | 32 | Rules::CALLBACK, |
33 | 33 | 'CSRF Attack detected', |
34 | - function (string $key) { |
|
34 | + function(string $key) { |
|
35 | 35 | /** @psalm-suppress PossiblyNullArgument, MixedArgument */ |
36 | 36 | if (password_verify($key, $this->getRequest()->getPostData(Form::_TOKEN_CSRF_, ''))) { |
37 | 37 | return true; |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | */ |
65 | 65 | private function getCsrfSecret(): string |
66 | 66 | { |
67 | - $secret = (string)$this->session->get('csrf_secret'); |
|
67 | + $secret = (string) $this->session->get('csrf_secret'); |
|
68 | 68 | |
69 | 69 | if (empty($secret)) { |
70 | 70 | $secret = $this->generateSecret(); |
@@ -7,7 +7,7 @@ |
||
7 | 7 | final class Helper |
8 | 8 | { |
9 | 9 | |
10 | - public static function arrayRecursiveSearchKeyMap(mixed $needle, array $haystack): array|null |
|
10 | + public static function arrayRecursiveSearchKeyMap(mixed $needle, array $haystack): array | null |
|
11 | 11 | { |
12 | 12 | /** @psalm-suppress MixedAssignment */ |
13 | 13 | foreach ($haystack as $firsLevelKey => $value) { |
@@ -125,7 +125,7 @@ |
||
125 | 125 | return $this; |
126 | 126 | } |
127 | 127 | |
128 | - private function getElementKey(string|Element $element): int|false |
|
128 | + private function getElementKey(string | Element $element): int | false |
|
129 | 129 | { |
130 | 130 | $name = ($element instanceof Element) ? $element->getName() : $element; |
131 | 131 |
@@ -13,7 +13,7 @@ |
||
13 | 13 | |
14 | 14 | public function __construct(string $name = null, string $title = null) |
15 | 15 | { |
16 | - if (is_null($name)){ |
|
16 | + if (is_null($name)) { |
|
17 | 17 | $name = uniqid('submit'); |
18 | 18 | } |
19 | 19 | parent::__construct($name, $title); |