@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * @class AlphaNumeric |
| 54 | 54 | * @package Platine\Validator\Rule |
| 55 | 55 | */ |
| 56 | -class AlphaNumeric implements RuleInterface |
|
| 57 | -{ |
|
| 56 | +class AlphaNumeric implements RuleInterface { |
|
| 58 | 57 | /** |
| 59 | 58 | * String pattern to allow |
| 60 | 59 | * @var string |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * @class AlphaDash |
| 54 | 54 | * @package Platine\Validator\Rule |
| 55 | 55 | */ |
| 56 | -class AlphaDash implements RuleInterface |
|
| 57 | -{ |
|
| 56 | +class AlphaDash implements RuleInterface { |
|
| 58 | 57 | /** |
| 59 | 58 | * String pattern to allow |
| 60 | 59 | * @var string |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * @class Email |
| 54 | 54 | * @package Platine\Validator\Rule |
| 55 | 55 | */ |
| 56 | -class Email implements RuleInterface |
|
| 57 | -{ |
|
| 56 | +class Email implements RuleInterface { |
|
| 58 | 57 | /** |
| 59 | 58 | * {@inheritdoc} |
| 60 | 59 | * @see RuleInterface |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * @class NotEmpty |
| 54 | 54 | * @package Platine\Validator\Rule |
| 55 | 55 | */ |
| 56 | -class NotEmpty implements RuleInterface |
|
| 57 | -{ |
|
| 56 | +class NotEmpty implements RuleInterface { |
|
| 58 | 57 | /** |
| 59 | 58 | * {@inheritdoc} |
| 60 | 59 | * @see RuleInterface |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * @class Number |
| 54 | 54 | * @package Platine\Validator\Rule |
| 55 | 55 | */ |
| 56 | -class Number implements RuleInterface |
|
| 57 | -{ |
|
| 56 | +class Number implements RuleInterface { |
|
| 58 | 57 | /** |
| 59 | 58 | * {@inheritdoc} |
| 60 | 59 | * @see RuleInterface |
@@ -54,8 +54,7 @@ |
||
| 54 | 54 | * @class Uuid |
| 55 | 55 | * @package Platine\Validator\Rule |
| 56 | 56 | */ |
| 57 | -class Uuid implements RuleInterface |
|
| 58 | -{ |
|
| 57 | +class Uuid implements RuleInterface { |
|
| 59 | 58 | /** |
| 60 | 59 | * {@inheritdoc} |
| 61 | 60 | * @see RuleInterface |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * @class Range |
| 54 | 54 | * @package Platine\Validator\Rule |
| 55 | 55 | */ |
| 56 | -class Range implements RuleInterface |
|
| 57 | -{ |
|
| 56 | +class Range implements RuleInterface { |
|
| 58 | 57 | /** |
| 59 | 58 | * Constructor |
| 60 | 59 | * @param string|float|int|bool|null $min the minimum value to compare against |
@@ -61,8 +61,8 @@ |
||
| 61 | 61 | * @param string|float|int|bool|null $max the maximum value to compare against |
| 62 | 62 | */ |
| 63 | 63 | public function __construct( |
| 64 | - protected string|float|int|bool|null $min, |
|
| 65 | - protected string|float|int|bool|null $max |
|
| 64 | + protected string | float | int | bool | null $min, |
|
| 65 | + protected string | float | int | bool | null $max |
|
| 66 | 66 | ) { |
| 67 | 67 | } |
| 68 | 68 | |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | return true; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - return (bool) preg_match($this->regex, (string)$value); |
|
| 77 | + return (bool) preg_match($this->regex, (string) $value); |
|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | /** |
@@ -53,14 +53,12 @@ |
||
| 53 | 53 | * @class Regex |
| 54 | 54 | * @package Platine\Validator\Rule |
| 55 | 55 | */ |
| 56 | -class Regex implements RuleInterface |
|
| 57 | -{ |
|
| 56 | +class Regex implements RuleInterface { |
|
| 58 | 57 | /** |
| 59 | 58 | * Constructor |
| 60 | 59 | * @param string $regex the regex pattern |
| 61 | 60 | */ |
| 62 | - public function __construct(protected string $regex) |
|
| 63 | - { |
|
| 61 | + public function __construct(protected string $regex) { |
|
| 64 | 62 | } |
| 65 | 63 | |
| 66 | 64 | /** |
@@ -56,8 +56,7 @@ |
||
| 56 | 56 | * associated metadata for ensuring that a given data set |
| 57 | 57 | * is valid and returned correctly. |
| 58 | 58 | */ |
| 59 | -class Validator |
|
| 60 | -{ |
|
| 59 | +class Validator { |
|
| 61 | 60 | /** |
| 62 | 61 | * The data to validate |
| 63 | 62 | * @var array<string, mixed> |