@@ -16,11 +16,11 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | trait RuleChain |
| 18 | 18 | { |
| 19 | - abstract public function add(Rule|RuleSet ...$rules): static; |
|
| 19 | + abstract public function add(Rule | RuleSet ...$rules): static; |
|
| 20 | 20 | |
| 21 | 21 | public function __call($name, $arguments): static |
| 22 | 22 | { |
| 23 | - $namespace = __NAMESPACE__ . '\\Rules'; |
|
| 23 | + $namespace = __NAMESPACE__.'\\Rules'; |
|
| 24 | 24 | $class = sprintf("%s\%s", $namespace, ucfirst($name)); |
| 25 | 25 | if (!class_exists($class)) { |
| 26 | 26 | throw new RuntimeException(sprintf('Rule not found: (%s).', $name)); |
@@ -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 | |