@@ -34,8 +34,7 @@ |
||
| 34 | 34 | { |
| 35 | 35 | return |
| 36 | 36 | $this->isValid($input, $context) ? |
| 37 | - ErrorReporting::success() : |
|
| 38 | - (new ErrorReporting)->addError($this->message(), $this->getField(), $this); |
|
| 37 | + ErrorReporting::success() : (new ErrorReporting)->addError($this->message(), $this->getField(), $this); |
|
| 39 | 38 | } |
| 40 | 39 | |
| 41 | 40 | protected function className(): string |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | { |
| 8 | 8 | private static TranslatorInterface $default; |
| 9 | 9 | |
| 10 | - public static function setDefault(TranslatorInterface|callable $translator, bool $compose = true): void |
|
| 10 | + public static function setDefault(TranslatorInterface | callable $translator, bool $compose = true): void |
|
| 11 | 11 | { |
| 12 | 12 | if ($translator instanceof TranslatorInterface) { |
| 13 | 13 | self::$default = $translator; |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | $error['field'] ?? '_error', |
| 34 | 34 | $error['message'], |
| 35 | 35 | $error['type'] ?? '' |
| 36 | - ) . PHP_EOL; |
|
| 36 | + ).PHP_EOL; |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | return $errors; |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | /** @inheritDoc */ |
| 55 | 55 | public function validate(mixed $input, array $context = []): ErrorReporting |
| 56 | 56 | { |
| 57 | - if (! $this->shouldValidate($input)) { |
|
| 57 | + if (!$this->shouldValidate($input)) { |
|
| 58 | 58 | return ErrorReporting::success(); |
| 59 | 59 | } |
| 60 | 60 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | private function stopSign(Rule $rule, Result $result): int |
| 80 | 80 | { |
| 81 | - if (! $rule instanceof Stoppable) { |
|
| 81 | + if (!$rule instanceof Stoppable) { |
|
| 82 | 82 | return StopSign::DONT_STOP; |
| 83 | 83 | } |
| 84 | 84 | |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | use BelongsToField, Priority; |
| 19 | 19 | |
| 20 | 20 | public function __construct( |
| 21 | - private object|string $objectOrClass, |
|
| 21 | + private object | string $objectOrClass, |
|
| 22 | 22 | private string $property, |
| 23 | 23 | int $priority = 0 |
| 24 | 24 | ) { |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | |
| 24 | 24 | public static function sortByPriority(array &$haystack): void |
| 25 | 25 | { |
| 26 | - uasort($haystack, function ($a, $b) { |
|
| 26 | + uasort($haystack, function($a, $b) { |
|
| 27 | 27 | $prorityOfA = $a instanceof Prioritable ? $a->getPriority() : 0; |
| 28 | 28 | $prorityOfB = $b instanceof Prioritable ? $b->getPriority() : 0; |
| 29 | 29 | |