diff --git a/src/Attributes/Validation/Dimensions.php b/src/Attributes/Validation/Dimensions.php index b20326c1..5a2449ce 100644 --- a/src/Attributes/Validation/Dimensions.php +++ b/src/Attributes/Validation/Dimensions.php @@ -23,8 +23,7 @@ public function __construct( null|int|RouteParameterReference $width = null, null|int|RouteParameterReference $height = null, null|BaseDimensions $rule = null, - ) - { + ) { $minWidth = $this->normalizePossibleRouteReferenceParameter($minWidth); $minHeight = $this->normalizePossibleRouteReferenceParameter($minHeight); $maxWidth = $this->normalizePossibleRouteReferenceParameter($maxWidth); diff --git a/src/Attributes/Validation/Email.php b/src/Attributes/Validation/Email.php index 31be6cf1..e7c8c617 100644 --- a/src/Attributes/Validation/Email.php +++ b/src/Attributes/Validation/Email.php @@ -32,15 +32,15 @@ public static function keyword(): string public function parameters(): array { return collect($this->modes) - ->whenEmpty(fn(Collection $modes) => $modes->add(self::RfcValidation)) - ->filter(fn(string $mode) => in_array($mode, [ + ->whenEmpty(fn (Collection $modes) => $modes->add(self::RfcValidation)) + ->filter(fn (string $mode) => in_array($mode, [ self::RfcValidation, self::NoRfcWarningsValidation, self::DnsCheckValidation, self::SpoofCheckValidation, self::FilterEmailValidation, ])) - ->whenEmpty(fn() => throw CannotBuildValidationRule::create("Email validation rule needs at least one valid mode.")) + ->whenEmpty(fn () => throw CannotBuildValidationRule::create("Email validation rule needs at least one valid mode.")) ->all(); } } diff --git a/src/Attributes/Validation/ExcludeIf.php b/src/Attributes/Validation/ExcludeIf.php index bba48e5b..38acdd1e 100644 --- a/src/Attributes/Validation/ExcludeIf.php +++ b/src/Attributes/Validation/ExcludeIf.php @@ -15,8 +15,7 @@ class ExcludeIf extends StringValidationAttribute public function __construct( string|FieldReference $field, protected string|int|float|bool|BackedEnum|RouteParameterReference $value - ) - { + ) { $this->field = $this->parseFieldReference($field); } diff --git a/src/Attributes/Validation/ExcludeUnless.php b/src/Attributes/Validation/ExcludeUnless.php index 304a86f3..080f6f47 100644 --- a/src/Attributes/Validation/ExcludeUnless.php +++ b/src/Attributes/Validation/ExcludeUnless.php @@ -15,8 +15,7 @@ class ExcludeUnless extends StringValidationAttribute public function __construct( string|FieldReference $field, protected string|int|float|bool|BackedEnum|RouteParameterReference $value - ) - { + ) { $this->field = $this->parseFieldReference($field); } diff --git a/src/Attributes/Validation/ExcludeWithout.php b/src/Attributes/Validation/ExcludeWithout.php index 8abb0c73..12440e20 100644 --- a/src/Attributes/Validation/ExcludeWithout.php +++ b/src/Attributes/Validation/ExcludeWithout.php @@ -12,8 +12,7 @@ class ExcludeWithout extends StringValidationAttribute public function __construct( string|FieldReference $field, - ) - { + ) { $this->field = $this->parseFieldReference($field); } diff --git a/src/Attributes/Validation/InArray.php b/src/Attributes/Validation/InArray.php index 33c4b86e..2c702410 100644 --- a/src/Attributes/Validation/InArray.php +++ b/src/Attributes/Validation/InArray.php @@ -12,8 +12,7 @@ class InArray extends StringValidationAttribute public function __construct( string|FieldReference $field, - ) - { + ) { $this->field = $this->parseFieldReference($field); } diff --git a/src/Attributes/Validation/LessThan.php b/src/Attributes/Validation/LessThan.php index 67c40c76..47e64dcc 100644 --- a/src/Attributes/Validation/LessThan.php +++ b/src/Attributes/Validation/LessThan.php @@ -12,8 +12,7 @@ class LessThan extends StringValidationAttribute public function __construct( string|FieldReference $field, - ) - { + ) { $this->field = $this->parseFieldReference($field); } diff --git a/src/Attributes/Validation/LessThanOrEqualTo.php b/src/Attributes/Validation/LessThanOrEqualTo.php index bc4ef6b4..af145648 100644 --- a/src/Attributes/Validation/LessThanOrEqualTo.php +++ b/src/Attributes/Validation/LessThanOrEqualTo.php @@ -12,8 +12,7 @@ class LessThanOrEqualTo extends StringValidationAttribute public function __construct( string|FieldReference $field, - ) - { + ) { $this->field = $this->parseFieldReference($field); } diff --git a/src/Attributes/Validation/NotIn.php b/src/Attributes/Validation/NotIn.php index 4b935862..521b8319 100644 --- a/src/Attributes/Validation/NotIn.php +++ b/src/Attributes/Validation/NotIn.php @@ -22,7 +22,7 @@ public function __construct(array|string|BaseNotIn|RouteParameterReference ...$v } $values = array_map( - fn(string|RouteParameterReference $value) => $this->normalizePossibleRouteReferenceParameter($value), + fn (string|RouteParameterReference $value) => $this->normalizePossibleRouteReferenceParameter($value), Arr::flatten($values) ); diff --git a/src/Attributes/Validation/Password.php b/src/Attributes/Validation/Password.php index a6e0886b..9274092c 100644 --- a/src/Attributes/Validation/Password.php +++ b/src/Attributes/Validation/Password.php @@ -23,8 +23,7 @@ public function __construct( int|RouteParameterReference $uncompromisedThreshold = 0, bool|RouteParameterReference $default = false, ?BasePassword $rule = null, - ) - { + ) { $min = $this->normalizePossibleRouteReferenceParameter($min); $letters = $this->normalizePossibleRouteReferenceParameter($letters); $mixedCase = $this->normalizePossibleRouteReferenceParameter($mixedCase); diff --git a/src/Attributes/Validation/ProhibitedUnless.php b/src/Attributes/Validation/ProhibitedUnless.php index 4ed8f5a0..817674d6 100644 --- a/src/Attributes/Validation/ProhibitedUnless.php +++ b/src/Attributes/Validation/ProhibitedUnless.php @@ -18,8 +18,7 @@ class ProhibitedUnless extends StringValidationAttribute public function __construct( string|FieldReference $field, array|string|BackedEnum|RouteParameterReference ...$values - ) - { + ) { $this->field = $this->parseFieldReference($field); $this->values = Arr::flatten($values); } diff --git a/src/Attributes/Validation/RequiredIf.php b/src/Attributes/Validation/RequiredIf.php index 5ac3b4f8..4f078f9c 100644 --- a/src/Attributes/Validation/RequiredIf.php +++ b/src/Attributes/Validation/RequiredIf.php @@ -19,8 +19,7 @@ class RequiredIf extends StringValidationAttribute implements RequiringRule public function __construct( string|FieldReference $field, array|string|BackedEnum|RouteParameterReference ...$values - ) - { + ) { $this->field = $this->parseFieldReference($field); $this->values = Arr::flatten($values); } diff --git a/src/Attributes/Validation/RequiredUnless.php b/src/Attributes/Validation/RequiredUnless.php index 511d36ae..6cc607ce 100644 --- a/src/Attributes/Validation/RequiredUnless.php +++ b/src/Attributes/Validation/RequiredUnless.php @@ -19,8 +19,7 @@ class RequiredUnless extends StringValidationAttribute implements RequiringRule public function __construct( string|FieldReference $field, array|string|BackedEnum|RouteParameterReference ...$values - ) - { + ) { $this->field = $this->parseFieldReference($field); $this->values = Arr::flatten($values); } diff --git a/src/Attributes/Validation/Unique.php b/src/Attributes/Validation/Unique.php index 47c6ff71..12b2669b 100644 --- a/src/Attributes/Validation/Unique.php +++ b/src/Attributes/Validation/Unique.php @@ -24,8 +24,7 @@ public function __construct( string|RouteParameterReference $deletedAtColumn = 'deleted_at', ?Closure $where = null, ?BaseUnique $rule = null - ) - { + ) { $table = $this->normalizePossibleRouteReferenceParameter($table); $column = $this->normalizePossibleRouteReferenceParameter($column); $connection = $this->normalizePossibleRouteReferenceParameter($connection); diff --git a/src/Attributes/Validation/ValidationAttribute.php b/src/Attributes/Validation/ValidationAttribute.php index 6428347f..cbc3e110 100644 --- a/src/Attributes/Validation/ValidationAttribute.php +++ b/src/Attributes/Validation/ValidationAttribute.php @@ -22,7 +22,7 @@ public function __toString(): string protected static function parseDateValue(mixed $value): mixed { - if (!is_string($value)) { + if (! is_string($value)) { return $value; } @@ -41,7 +41,7 @@ protected static function parseDateValue(mixed $value): mixed protected static function parseBooleanValue(mixed $value): mixed { - if (!is_string($value)) { + if (! is_string($value)) { return $value; } @@ -58,8 +58,7 @@ protected static function parseBooleanValue(mixed $value): mixed protected function parseFieldReference( string|FieldReference $reference - ): FieldReference - { + ): FieldReference { return $reference instanceof FieldReference ? $reference : new FieldReference($reference);