Passed
Push — master ( 5f9e30...9e7e6b )
by Dedipyaman
02:07
created
src/Validator/PasswordValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     private function isLongEnough(string $password, int $minSize) : bool
46 46
     {
47
-        return strlen($password) >= $minSize ;
47
+        return strlen($password) >= $minSize;
48 48
     }
49 49
 
50 50
     /**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      * @param array $options
56 56
      * @return bool
57 57
      */
58
-    public function isValid($password, $options = []): bool
58
+    public function isValid($password, $options = [ ]): bool
59 59
     {
60 60
         $this->validated = true;
61 61
 
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
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 
6 6
 class IPAddressValidator extends AbstractValidator
7 7
 {
8
-    public function isValid($ip, $options = []): bool
8
+    public function isValid($ip, $options = [ ]): bool
9 9
     {
10 10
         $this->validated = true;
11 11
 
Please login to merge, or discard this patch.
src/Result.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 class Result
14 14
 {
15 15
     private $valid;
16
-    private $errors = [];
16
+    private $errors = [ ];
17 17
 
18 18
     public function __construct(bool $valid, Error... $errors)
19 19
     {
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     public function getFirstError() : ?Error
39 39
     {
40 40
         if (!$this->valid) {
41
-            return $this->errors[0];
41
+            return $this->errors[ 0 ];
42 42
         }
43 43
         return null;
44 44
     }
Please login to merge, or discard this patch.
src/Error/TypeError/TypeErrorCode.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
 abstract class TypeErrorCode
13 13
 {
14
-    const PREMATURE_CALL_TO_METHOD  = 230000;
14
+    const PREMATURE_CALL_TO_METHOD = 230000;
15 15
 
16 16
     const EMAIL_INVALID = 320001;
17 17
     const PASSWORD_TOO_SMALL = 320002;
Please login to merge, or discard this patch.
src/Validator/AbstractValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
     {
59 59
         return new Result(true);
60 60
     }
61
-    protected function failure($errors = []) {
61
+    protected function failure($errors = [ ]) {
62 62
         return new Result(false, $errors);
63 63
     }
64 64
 }
65 65
\ No newline at end of file
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 extends AbstractValidator
12 12
 {
13
-    public function getResult($email, $options = []): Result
13
+    public function getResult($email, $options = [ ]): Result
14 14
     {
15 15
         $this->validated = true;
16 16
 
Please login to merge, or discard this patch.
src/Validator/Validator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,5 +7,5 @@
 block discarded – undo
7 7
 
8 8
 interface Validator
9 9
 {
10
-    public function getResult($type, $options = []) : Result;
10
+    public function getResult($type, $options = [ ]) : Result;
11 11
 }
12 12
\ No newline at end of file
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
@@ -26,9 +26,10 @@
 block discarded – undo
26 26
     {
27 27
         if (mb_strlen($data, 'UTF-8') >= $this->minLength) {
28 28
             return new Result(true);
29
-        }
30
-        else return new Result(false,
29
+        } else {
30
+            return new Result(false,
31 31
             new RuleError(RuleErrorCode::TOO_SHORT,
32 32
             'The supplied string is too short'));
33
+        }
33 34
     }
34 35
 }
35 36
\ No newline at end of file
Please login to merge, or discard this patch.