@@ -56,8 +56,7 @@ discard block |
||
| 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> |
@@ -112,8 +111,7 @@ discard block |
||
| 112 | 111 | * @param Lang $lang |
| 113 | 112 | * @param string $langDomain |
| 114 | 113 | */ |
| 115 | - public function __construct(Lang $lang, string $langDomain = 'validators') |
|
| 116 | - { |
|
| 114 | + public function __construct(Lang $lang, string $langDomain = 'validators') { |
|
| 117 | 115 | $this->lang = $lang; |
| 118 | 116 | $this->langDomain = $langDomain; |
| 119 | 117 | |
@@ -38,6 +38,5 @@ |
||
| 38 | 38 | * @class ValidatorException |
| 39 | 39 | * @package Platine\Validator\Exception |
| 40 | 40 | */ |
| 41 | -class ValidatorException extends Exception |
|
| 42 | -{ |
|
| 41 | +class ValidatorException extends Exception { |
|
| 43 | 42 | } |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * @class AlphaNumericDash |
| 54 | 54 | * @package Platine\Validator\Rule |
| 55 | 55 | */ |
| 56 | -class AlphaNumericDash implements RuleInterface |
|
| 57 | -{ |
|
| 56 | +class AlphaNumericDash implements RuleInterface { |
|
| 58 | 57 | /** |
| 59 | 58 | * String pattern to allow |
| 60 | 59 | * @var string |
@@ -59,13 +59,13 @@ |
||
| 59 | 59 | * Value to compare against |
| 60 | 60 | * @var string|float|int|bool|null |
| 61 | 61 | */ |
| 62 | - protected string|float|int|bool|null $value; |
|
| 62 | + protected string | float | int | bool | null $value; |
|
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | 65 | * Constructor |
| 66 | 66 | * @param string|float|int|bool|null $value the value to compare against |
| 67 | 67 | */ |
| 68 | - public function __construct(string|float|int|bool|null $value) |
|
| 68 | + public function __construct(string | float | int | bool | null $value) |
|
| 69 | 69 | { |
| 70 | 70 | $this->value = $value; |
| 71 | 71 | } |
@@ -53,8 +53,7 @@ discard block |
||
| 53 | 53 | * @class Max |
| 54 | 54 | * @package Platine\Validator\Rule |
| 55 | 55 | */ |
| 56 | -class Max implements RuleInterface |
|
| 57 | -{ |
|
| 56 | +class Max implements RuleInterface { |
|
| 58 | 57 | /** |
| 59 | 58 | * Value to compare against |
| 60 | 59 | * @var string|float|int|bool|null |
@@ -65,8 +64,7 @@ discard block |
||
| 65 | 64 | * Constructor |
| 66 | 65 | * @param string|float|int|bool|null $value the value to compare against |
| 67 | 66 | */ |
| 68 | - public function __construct(string|float|int|bool|null $value) |
|
| 69 | - { |
|
| 67 | + public function __construct(string|float|int|bool|null $value) { |
|
| 70 | 68 | $this->value = $value; |
| 71 | 69 | } |
| 72 | 70 | |
@@ -53,8 +53,7 @@ discard block |
||
| 53 | 53 | * @class DateBefore |
| 54 | 54 | * @package Platine\Validator\Rule |
| 55 | 55 | */ |
| 56 | -class DateBefore implements RuleInterface |
|
| 57 | -{ |
|
| 56 | +class DateBefore implements RuleInterface { |
|
| 58 | 57 | /** |
| 59 | 58 | * The date to compare against |
| 60 | 59 | * @var string |
@@ -72,8 +71,7 @@ discard block |
||
| 72 | 71 | * @param string $date the date format |
| 73 | 72 | * @param bool $include |
| 74 | 73 | */ |
| 75 | - public function __construct(string $date, bool $include = false) |
|
| 76 | - { |
|
| 74 | + public function __construct(string $date, bool $include = false) { |
|
| 77 | 75 | $this->date = $date; |
| 78 | 76 | $this->include = $include; |
| 79 | 77 | } |
@@ -53,8 +53,7 @@ discard block |
||
| 53 | 53 | * @class InList |
| 54 | 54 | * @package Platine\Validator\Rule |
| 55 | 55 | */ |
| 56 | -class InList implements RuleInterface |
|
| 57 | -{ |
|
| 56 | +class InList implements RuleInterface { |
|
| 58 | 57 | /** |
| 59 | 58 | * The list to match |
| 60 | 59 | * @var array<mixed> |
@@ -65,8 +64,7 @@ discard block |
||
| 65 | 64 | * Constructor |
| 66 | 65 | * @param array<mixed> $list |
| 67 | 66 | */ |
| 68 | - public function __construct(array $list) |
|
| 69 | - { |
|
| 67 | + public function __construct(array $list) { |
|
| 70 | 68 | $this->list = $list; |
| 71 | 69 | } |
| 72 | 70 | |
@@ -53,8 +53,7 @@ discard block |
||
| 53 | 53 | * @class NotEqual |
| 54 | 54 | * @package Platine\Validator\Rule |
| 55 | 55 | */ |
| 56 | -class NotEqual implements RuleInterface |
|
| 57 | -{ |
|
| 56 | +class NotEqual implements RuleInterface { |
|
| 58 | 57 | /** |
| 59 | 58 | * Value to compare against |
| 60 | 59 | * @var mixed |
@@ -65,8 +64,7 @@ discard block |
||
| 65 | 64 | * Constructor |
| 66 | 65 | * @param mixed $value the value to compare against |
| 67 | 66 | */ |
| 68 | - public function __construct(mixed $value) |
|
| 69 | - { |
|
| 67 | + public function __construct(mixed $value) { |
|
| 70 | 68 | $this->value = $value; |
| 71 | 69 | } |
| 72 | 70 | |
@@ -53,8 +53,7 @@ |
||
| 53 | 53 | * @class Natural |
| 54 | 54 | * @package Platine\Validator\Rule |
| 55 | 55 | */ |
| 56 | -class Natural implements RuleInterface |
|
| 57 | -{ |
|
| 56 | +class Natural implements RuleInterface { |
|
| 58 | 57 | /** |
| 59 | 58 | * {@inheritdoc} |
| 60 | 59 | * @see RuleInterface |
@@ -53,8 +53,7 @@ discard block |
||
| 53 | 53 | * @class Matches |
| 54 | 54 | * @package Platine\Validator\Rule |
| 55 | 55 | */ |
| 56 | -class Matches implements RuleInterface |
|
| 57 | -{ |
|
| 56 | +class Matches implements RuleInterface { |
|
| 58 | 57 | /** |
| 59 | 58 | * Field to compare against |
| 60 | 59 | * @var string |
@@ -65,8 +64,7 @@ discard block |
||
| 65 | 64 | * Constructor |
| 66 | 65 | * @param string $field the field to compare against |
| 67 | 66 | */ |
| 68 | - public function __construct(string $field) |
|
| 69 | - { |
|
| 67 | + public function __construct(string $field) { |
|
| 70 | 68 | $this->field = $field; |
| 71 | 69 | } |
| 72 | 70 | |