Passed
Push — master ( ff9501...93f6b3 )
by Dedipyaman
02:53 queued 01:04
created
src/Result/Result.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Rule/String/MinimumLength.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,9 +20,10 @@
 block discarded – undo
20 20
     {
21 21
         if (mb_strlen($data, 'UTF-8') >= $this->minLength) {
22 22
             return new Result\Success();
23
-        }
24
-        else return new Result\Failure(
23
+        } else {
24
+            return new Result\Failure(
25 25
             new RuleError(RuleErrorCode::TOO_SHORT,
26 26
             'The supplied string is too short'));
27
+        }
27 28
     }
28 29
 }
29 30
\ No newline at end of file
Please login to merge, or discard this patch.
src/Rule/String/MaximumLength.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,9 +22,10 @@
 block discarded – undo
22 22
     {
23 23
         if (mb_strlen($data, 'UTF-8') <= $this->maxLength) {
24 24
             return new Success();
25
-        }
26
-        else return new Failure(
25
+        } else {
26
+            return new Failure(
27 27
             new RuleError(RuleErrorCode::TOO_LONG,
28 28
                 'The supplied string is too long'));
29
+        }
29 30
     }
30 31
 }
31 32
\ No newline at end of file
Please login to merge, or discard this patch.
src/Validator/IPAddressValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Validator/EmailValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.