@@ -49,8 +49,7 @@ discard block |
||
49 | 49 | use Platine\Validator\RuleInterface; |
50 | 50 | use Platine\Validator\Validator; |
51 | 51 | |
52 | -class ExactLength implements RuleInterface |
|
53 | -{ |
|
52 | +class ExactLength implements RuleInterface { |
|
54 | 53 | /** |
55 | 54 | * The length |
56 | 55 | * @var int |
@@ -61,8 +60,7 @@ discard block |
||
61 | 60 | * Constructor |
62 | 61 | * @param int $length |
63 | 62 | */ |
64 | - public function __construct(int $length) |
|
65 | - { |
|
63 | + public function __construct(int $length) { |
|
66 | 64 | $this->length = $length; |
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 Max implements RuleInterface |
|
53 | -{ |
|
52 | +class Max implements RuleInterface { |
|
54 | 53 | /** |
55 | 54 | * Value to compare against |
56 | 55 | * @var mixed |
@@ -61,8 +60,7 @@ discard block |
||
61 | 60 | * Constructor |
62 | 61 | * @param mixed $value the value to compare against |
63 | 62 | */ |
64 | - public function __construct($value) |
|
65 | - { |
|
63 | + public function __construct($value) { |
|
66 | 64 | $this->value = $value; |
67 | 65 | } |
68 | 66 |
@@ -49,8 +49,7 @@ |
||
49 | 49 | use Platine\Validator\RuleInterface; |
50 | 50 | use Platine\Validator\Validator; |
51 | 51 | |
52 | -class URL implements RuleInterface |
|
53 | -{ |
|
52 | +class URL 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 | return (bool) filter_var($value, FILTER_VALIDATE_URL); |
@@ -49,8 +49,7 @@ discard block |
||
49 | 49 | use Platine\Validator\RuleInterface; |
50 | 50 | use Platine\Validator\Validator; |
51 | 51 | |
52 | -class Min implements RuleInterface |
|
53 | -{ |
|
52 | +class Min implements RuleInterface { |
|
54 | 53 | /** |
55 | 54 | * Value to compare against |
56 | 55 | * @var mixed |
@@ -61,8 +60,7 @@ discard block |
||
61 | 60 | * Constructor |
62 | 61 | * @param mixed $value the value to compare against |
63 | 62 | */ |
64 | - public function __construct($value) |
|
65 | - { |
|
63 | + public function __construct($value) { |
|
66 | 64 | $this->value = $value; |
67 | 65 | } |
68 | 66 |
@@ -49,8 +49,7 @@ |
||
49 | 49 | use Platine\Validator\RuleInterface; |
50 | 50 | use Platine\Validator\Validator; |
51 | 51 | |
52 | -class AlphaNumericDash implements RuleInterface |
|
53 | -{ |
|
52 | +class AlphaNumericDash implements RuleInterface { |
|
54 | 53 | /** |
55 | 54 | * String pattern to allow |
56 | 55 | * @var string |
@@ -49,8 +49,7 @@ discard block |
||
49 | 49 | use Platine\Validator\RuleInterface; |
50 | 50 | use Platine\Validator\Validator; |
51 | 51 | |
52 | -class NotEqual implements RuleInterface |
|
53 | -{ |
|
52 | +class NotEqual implements RuleInterface { |
|
54 | 53 | /** |
55 | 54 | * Value to compare against |
56 | 55 | * @var mixed |
@@ -61,8 +60,7 @@ discard block |
||
61 | 60 | * Constructor |
62 | 61 | * @param mixed $value the value to compare against |
63 | 62 | */ |
64 | - public function __construct($value) |
|
65 | - { |
|
63 | + public function __construct($value) { |
|
66 | 64 | $this->value = $value; |
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 MaxLength implements RuleInterface |
|
53 | -{ |
|
52 | +class MaxLength implements RuleInterface { |
|
54 | 53 | /** |
55 | 54 | * The length |
56 | 55 | * @var int |
@@ -61,8 +60,7 @@ discard block |
||
61 | 60 | * Constructor |
62 | 61 | * @param int $length |
63 | 62 | */ |
64 | - public function __construct(int $length) |
|
65 | - { |
|
63 | + public function __construct(int $length) { |
|
66 | 64 | $this->length = $length; |
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 Date implements RuleInterface |
|
53 | -{ |
|
52 | +class Date implements RuleInterface { |
|
54 | 53 | /** |
55 | 54 | * The date format to validate |
56 | 55 | * @var string |
@@ -61,8 +60,7 @@ discard block |
||
61 | 60 | * Constructor |
62 | 61 | * @param string $format the date format |
63 | 62 | */ |
64 | - public function __construct(string $format) |
|
65 | - { |
|
63 | + public function __construct(string $format) { |
|
66 | 64 | $this->format = $format; |
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 MinLength implements RuleInterface |
|
53 | -{ |
|
52 | +class MinLength implements RuleInterface { |
|
54 | 53 | /** |
55 | 54 | * The length |
56 | 55 | * @var int |
@@ -61,8 +60,7 @@ discard block |
||
61 | 60 | * Constructor |
62 | 61 | * @param int $length |
63 | 62 | */ |
64 | - public function __construct(int $length) |
|
65 | - { |
|
63 | + public function __construct(int $length) { |
|
66 | 64 | $this->length = $length; |
67 | 65 | } |
68 | 66 |