@@ -49,8 +49,7 @@ discard block |
||
| 49 | 49 | use Platine\Validator\RuleInterface; |
| 50 | 50 | use Platine\Validator\Validator; |
| 51 | 51 | |
| 52 | -class DateAfter implements RuleInterface |
|
| 53 | -{ |
|
| 52 | +class DateAfter implements RuleInterface { |
|
| 54 | 53 | /** |
| 55 | 54 | * The date to compare against |
| 56 | 55 | * @var string |
@@ -61,8 +60,7 @@ discard block |
||
| 61 | 60 | * Constructor |
| 62 | 61 | * @param string $date the date format |
| 63 | 62 | */ |
| 64 | - public function __construct(string $date) |
|
| 65 | - { |
|
| 63 | + public function __construct(string $date) { |
|
| 66 | 64 | $this->date = $date; |
| 67 | 65 | } |
| 68 | 66 | |
@@ -49,8 +49,7 @@ |
||
| 49 | 49 | use Platine\Validator\RuleInterface; |
| 50 | 50 | use Platine\Validator\Validator; |
| 51 | 51 | |
| 52 | -class NotEmpty implements RuleInterface |
|
| 53 | -{ |
|
| 52 | +class NotEmpty implements RuleInterface { |
|
| 54 | 53 | /** |
| 55 | 54 | * {@inheritdoc} |
| 56 | 55 | * @see RuleInterface |
@@ -49,8 +49,7 @@ |
||
| 49 | 49 | use Platine\Validator\RuleInterface; |
| 50 | 50 | use Platine\Validator\Validator; |
| 51 | 51 | |
| 52 | -class IPv4 implements RuleInterface |
|
| 53 | -{ |
|
| 52 | +class IPv4 implements RuleInterface { |
|
| 54 | 53 | /** |
| 55 | 54 | * {@inheritdoc} |
| 56 | 55 | * @see RuleInterface |
@@ -49,8 +49,7 @@ |
||
| 49 | 49 | use Platine\Validator\RuleInterface; |
| 50 | 50 | use Platine\Validator\Validator; |
| 51 | 51 | |
| 52 | -class Natural implements RuleInterface |
|
| 53 | -{ |
|
| 52 | +class Natural implements RuleInterface { |
|
| 54 | 53 | /** |
| 55 | 54 | * {@inheritdoc} |
| 56 | 55 | * @see RuleInterface |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | */ |
| 58 | 58 | public function validate(string $field, $value, Validator $validator): bool |
| 59 | 59 | { |
| 60 | - if (empty($value)) { |
|
| 60 | + if (empty($value)) { |
|
| 61 | 61 | return true; |
| 62 | 62 | } |
| 63 | 63 | if (filter_var($value, FILTER_VALIDATE_INT) === false) { |
@@ -49,8 +49,7 @@ |
||
| 49 | 49 | use Platine\Validator\RuleInterface; |
| 50 | 50 | use Platine\Validator\Validator; |
| 51 | 51 | |
| 52 | -class IP implements RuleInterface |
|
| 53 | -{ |
|
| 52 | +class IP implements RuleInterface { |
|
| 54 | 53 | /** |
| 55 | 54 | * {@inheritdoc} |
| 56 | 55 | * @see RuleInterface |
@@ -49,8 +49,7 @@ discard block |
||
| 49 | 49 | use Platine\Validator\RuleInterface; |
| 50 | 50 | use Platine\Validator\Validator; |
| 51 | 51 | |
| 52 | -class NotMatches implements RuleInterface |
|
| 53 | -{ |
|
| 52 | +class NotMatches implements RuleInterface { |
|
| 54 | 53 | /** |
| 55 | 54 | * Field to compare against |
| 56 | 55 | * @var string |
@@ -61,8 +60,7 @@ discard block |
||
| 61 | 60 | * Constructor |
| 62 | 61 | * @param string $field the field to compare against |
| 63 | 62 | */ |
| 64 | - public function __construct(string $field) |
|
| 65 | - { |
|
| 63 | + public function __construct(string $field) { |
|
| 66 | 64 | $this->field = $field; |
| 67 | 65 | } |
| 68 | 66 | |
@@ -49,8 +49,7 @@ discard block |
||
| 49 | 49 | use Platine\Validator\RuleInterface; |
| 50 | 50 | use Platine\Validator\Validator; |
| 51 | 51 | |
| 52 | -class Range implements RuleInterface |
|
| 53 | -{ |
|
| 52 | +class Range implements RuleInterface { |
|
| 54 | 53 | /** |
| 55 | 54 | * Minimum Value to compare against |
| 56 | 55 | * @var mixed |
@@ -68,8 +67,7 @@ discard block |
||
| 68 | 67 | * @param mixed $min the minimum value to compare against |
| 69 | 68 | * @param mixed $max the maximum value to compare against |
| 70 | 69 | */ |
| 71 | - public function __construct($min, $max) |
|
| 72 | - { |
|
| 70 | + public function __construct($min, $max) { |
|
| 73 | 71 | $this->min = $min; |
| 74 | 72 | $this->max = $max; |
| 75 | 73 | } |
@@ -49,8 +49,7 @@ |
||
| 49 | 49 | use Platine\Validator\RuleInterface; |
| 50 | 50 | use Platine\Validator\Validator; |
| 51 | 51 | |
| 52 | -class IPv6 implements RuleInterface |
|
| 53 | -{ |
|
| 52 | +class IPv6 implements RuleInterface { |
|
| 54 | 53 | /** |
| 55 | 54 | * {@inheritdoc} |
| 56 | 55 | * @see RuleInterface |
@@ -49,8 +49,7 @@ discard block |
||
| 49 | 49 | use Platine\Validator\RuleInterface; |
| 50 | 50 | use Platine\Validator\Validator; |
| 51 | 51 | |
| 52 | -class Regex implements RuleInterface |
|
| 53 | -{ |
|
| 52 | +class Regex implements RuleInterface { |
|
| 54 | 53 | /** |
| 55 | 54 | * The regex pattern |
| 56 | 55 | * @var string |
@@ -61,8 +60,7 @@ discard block |
||
| 61 | 60 | * Constructor |
| 62 | 61 | * @param string $regex the regex pattern |
| 63 | 62 | */ |
| 64 | - public function __construct(string $regex) |
|
| 65 | - { |
|
| 63 | + public function __construct(string $regex) { |
|
| 66 | 64 | $this->regex = $regex; |
| 67 | 65 | } |
| 68 | 66 | |