@@ -94,7 +94,7 @@ |
||
94 | 94 | public function getErrorMessage(string $field, $value, Validator $validator): string |
95 | 95 | { |
96 | 96 | if($this->include){ |
97 | - return $validator->translate( |
|
97 | + return $validator->translate( |
|
98 | 98 | '%s must be before or equal to the date [%s]!', |
99 | 99 | $validator->getLabel($field), |
100 | 100 | $this->date |
@@ -93,7 +93,7 @@ |
||
93 | 93 | */ |
94 | 94 | public function getErrorMessage(string $field, $value, Validator $validator): string |
95 | 95 | { |
96 | - if($this->include){ |
|
96 | + if ($this->include) { |
|
97 | 97 | return $validator->translate( |
98 | 98 | '%s must be before or equal to the date [%s]!', |
99 | 99 | $validator->getLabel($field), |
@@ -49,8 +49,7 @@ discard block |
||
49 | 49 | use Platine\Validator\RuleInterface; |
50 | 50 | use Platine\Validator\Validator; |
51 | 51 | |
52 | -class DateBefore implements RuleInterface |
|
53 | -{ |
|
52 | +class DateBefore implements RuleInterface { |
|
54 | 53 | /** |
55 | 54 | * The date to compare against |
56 | 55 | * @var string |
@@ -68,8 +67,7 @@ discard block |
||
68 | 67 | * @param string $date the date format |
69 | 68 | * @param bool $include |
70 | 69 | */ |
71 | - public function __construct(string $date, bool $include = false) |
|
72 | - { |
|
70 | + public function __construct(string $date, bool $include = false) { |
|
73 | 71 | $this->date = $date; |
74 | 72 | $this->include = $include; |
75 | 73 | } |
@@ -93,7 +91,7 @@ discard block |
||
93 | 91 | */ |
94 | 92 | public function getErrorMessage(string $field, $value, Validator $validator): string |
95 | 93 | { |
96 | - if($this->include){ |
|
94 | + if($this->include) { |
|
97 | 95 | return $validator->translate( |
98 | 96 | '%s must be before or equal to the date [%s]!', |
99 | 97 | $validator->getLabel($field), |
@@ -93,7 +93,7 @@ |
||
93 | 93 | */ |
94 | 94 | public function getErrorMessage(string $field, $value, Validator $validator): string |
95 | 95 | { |
96 | - if($this->include){ |
|
96 | + if ($this->include) { |
|
97 | 97 | return $validator->translate( |
98 | 98 | '%s must be after or equal to the date [%s]!', |
99 | 99 | $validator->getLabel($field), |
@@ -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 |
@@ -68,8 +67,7 @@ discard block |
||
68 | 67 | * @param string $date the date format |
69 | 68 | * @param bool $include |
70 | 69 | */ |
71 | - public function __construct(string $date, bool $include = false) |
|
72 | - { |
|
70 | + public function __construct(string $date, bool $include = false) { |
|
73 | 71 | $this->date = $date; |
74 | 72 | $this->include = $include; |
75 | 73 | } |
@@ -93,7 +91,7 @@ discard block |
||
93 | 91 | */ |
94 | 92 | public function getErrorMessage(string $field, $value, Validator $validator): string |
95 | 93 | { |
96 | - if($this->include){ |
|
94 | + if($this->include) { |
|
97 | 95 | return $validator->translate( |
98 | 96 | '%s must be after or equal to the date [%s]!', |
99 | 97 | $validator->getLabel($field), |