@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | abstract class Result |
8 | 8 | { |
9 | 9 | private $valid; |
10 | - private $errors = []; |
|
10 | + private $errors = [ ]; |
|
11 | 11 | |
12 | 12 | public function __construct(bool $valid, Error... $errors) |
13 | 13 | { |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | public function getFirstError() : ?Error |
32 | 32 | { |
33 | 33 | if (!$this->valid) { |
34 | - return $this->errors[0]; |
|
34 | + return $this->errors[ 0 ]; |
|
35 | 35 | } |
36 | 36 | return null; |
37 | 37 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | |
12 | 12 | class IPAddressValidator implements Validator |
13 | 13 | { |
14 | - public function validate($type, $options = []): Result |
|
14 | + public function validate($type, $options = [ ]): Result |
|
15 | 15 | { |
16 | 16 | if (filter_var($type, FILTER_VALIDATE_IP)) { |
17 | 17 |
@@ -10,7 +10,7 @@ |
||
10 | 10 | |
11 | 11 | class EmailValidator implements Validator |
12 | 12 | { |
13 | - public function validate($email, $options = []): Result |
|
13 | + public function validate($email, $options = [ ]): Result |
|
14 | 14 | { |
15 | 15 | if (filter_var($email, FILTER_VALIDATE_EMAIL)) { |
16 | 16 | return new Success(); |