Passed
Push — master ( 3db3b7...c2e9f1 )
by Dedipyaman
02:09
created
src/Validator/NameValidator.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     /**
36 36
      * @var array $allowedChars
37 37
      */
38
-    private $allowedChars = [];
38
+    private $allowedChars = [ ];
39 39
 
40 40
     /**
41 41
      * NameValidator constructor.
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      * @param int $maxLength
45 45
      * @param array $allowedChars
46 46
      */
47
-    public function __construct(int $minLength = 1, int $maxLength = 255, $allowedChars = ["\'", "-", ".", " "])
47
+    public function __construct(int $minLength = 1, int $maxLength = 255, $allowedChars = [ "\'", "-", ".", " " ])
48 48
     {
49 49
         $this->minLength = $minLength;
50 50
         $this->maxLength = $maxLength;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,9 @@
 block discarded – undo
66 66
 
67 67
         $result = $rule->validate($name);
68 68
 
69
-        if ($result->isValid())
70
-            return new Success();
69
+        if ($result->isValid()) {
70
+                    return new Success();
71
+        }
71 72
         /**
72 73
          * @var Failure $result
73 74
          */
Please login to merge, or discard this patch.
src/Rule/String/ExactLength.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,9 +34,10 @@
 block discarded – undo
34 34
     {
35 35
         if (mb_strlen($data, 'UTF-8') == $this->length) {
36 36
             return new Success();
37
-        }
38
-        else return new Failure(
37
+        } else {
38
+            return new Failure(
39 39
             new RuleError(RuleErrorCode::LENGTH_ERROR,
40 40
                 'The supplied string is not of correct length'));
41
+        }
41 42
     }
42 43
 }
43 44
\ No newline at end of file
Please login to merge, or discard this patch.