@@ -50,8 +50,7 @@ |
||
50 | 50 | * A generic Rule that asserts whether the given validation |
51 | 51 | * data is valid or not. |
52 | 52 | */ |
53 | -interface RuleInterface |
|
54 | -{ |
|
53 | +interface RuleInterface { |
|
55 | 54 | |
56 | 55 | /** |
57 | 56 | * Method to validate this Rule |
@@ -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 | /** |
56 | 55 | * The date format to validate |
@@ -62,8 +61,7 @@ discard block |
||
62 | 61 | * Constructor |
63 | 62 | * @param string $format the date format |
64 | 63 | */ |
65 | - public function __construct(string $format) |
|
66 | - { |
|
64 | + public function __construct(string $format) { |
|
67 | 65 | $this->format = $format; |
68 | 66 | } |
69 | 67 |
@@ -73,7 +73,7 @@ |
||
73 | 73 | */ |
74 | 74 | public function validate(string $field, $value, Validator $validator): bool |
75 | 75 | { |
76 | - if (empty($value)) { |
|
76 | + if (empty($value)) { |
|
77 | 77 | return true; |
78 | 78 | } |
79 | 79 | $dateValue = date_create_from_format($this->format, (string) $value); |
@@ -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 | /** |
56 | 55 | * Minimum Value to compare against |
@@ -69,8 +68,7 @@ discard block |
||
69 | 68 | * @param mixed $min the minimum value to compare against |
70 | 69 | * @param mixed $max the maximum value to compare against |
71 | 70 | */ |
72 | - public function __construct($min, $max) |
|
73 | - { |
|
71 | + public function __construct($min, $max) { |
|
74 | 72 | $this->min = $min; |
75 | 73 | $this->max = $max; |
76 | 74 | } |
@@ -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 | /** |
56 | 55 | * String pattern to allow |
@@ -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 | /** |
56 | 55 | * Value to compare against |
@@ -62,8 +61,7 @@ discard block |
||
62 | 61 | * Constructor |
63 | 62 | * @param mixed $value the value to compare against |
64 | 63 | */ |
65 | - public function __construct($value) |
|
66 | - { |
|
64 | + public function __construct($value) { |
|
67 | 65 | $this->value = $value; |
68 | 66 | } |
69 | 67 |
@@ -49,8 +49,7 @@ |
||
49 | 49 | use Platine\Validator\RuleInterface; |
50 | 50 | use Platine\Validator\Validator; |
51 | 51 | |
52 | -class Integer implements RuleInterface |
|
53 | -{ |
|
52 | +class Integer implements RuleInterface { |
|
54 | 53 | |
55 | 54 | /** |
56 | 55 | * {@inheritdoc} |
@@ -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 | /** |
56 | 55 | * The regex pattern |
@@ -62,8 +61,7 @@ discard block |
||
62 | 61 | * Constructor |
63 | 62 | * @param string $regex the regex pattern |
64 | 63 | */ |
65 | - public function __construct(string $regex) |
|
66 | - { |
|
64 | + public function __construct(string $regex) { |
|
67 | 65 | $this->regex = $regex; |
68 | 66 | } |
69 | 67 |
@@ -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 | /** |
56 | 55 | * {@inheritdoc} |
@@ -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 | /** |
56 | 55 | * The length |
@@ -62,8 +61,7 @@ discard block |
||
62 | 61 | * Constructor |
63 | 62 | * @param int $length |
64 | 63 | */ |
65 | - public function __construct(int $length) |
|
66 | - { |
|
64 | + public function __construct(int $length) { |
|
67 | 65 | $this->length = $length; |
68 | 66 | } |
69 | 67 |