Passed
Push — develop ( bb7610...58cba6 )
by nguereza
02:23
created
src/Rule/Password.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
             'lowercase' => false,
85 85
             'number' => false,
86 86
             'special_chars' => false,
87
-           ], $rules);
87
+            ], $rules);
88 88
     }
89 89
 
90 90
     /**
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -105,25 +105,25 @@
 block discarded – undo
105 105
             return false;
106 106
         }
107 107
 
108
-        if ($rules['uppercase'] && ((bool)preg_match('~[A-Z]~', $value)) === false) {
108
+        if ($rules['uppercase'] && ((bool) preg_match('~[A-Z]~', $value)) === false) {
109 109
             $this->errorType = self::ERROR_TYPE_UPPERCASE;
110 110
 
111 111
             return false;
112 112
         }
113 113
 
114
-        if ($rules['lowercase'] && ((bool)preg_match('~[a-z]~', $value)) === false) {
114
+        if ($rules['lowercase'] && ((bool) preg_match('~[a-z]~', $value)) === false) {
115 115
             $this->errorType = self::ERROR_TYPE_LOWERCASE;
116 116
 
117 117
             return false;
118 118
         }
119 119
 
120
-        if ($rules['number'] && ((bool)preg_match('~[0-9]~', $value)) === false) {
120
+        if ($rules['number'] && ((bool) preg_match('~[0-9]~', $value)) === false) {
121 121
             $this->errorType = self::ERROR_TYPE_NUMBER;
122 122
 
123 123
             return false;
124 124
         }
125 125
 
126
-        if ($rules['special_chars'] && ((bool)preg_match('~[^\w]~', $value)) === false) {
126
+        if ($rules['special_chars'] && ((bool) preg_match('~[^\w]~', $value)) === false) {
127 127
             $this->errorType = self::ERROR_TYPE_SPECIAL_CHAR;
128 128
 
129 129
             return false;
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@  discard block
 block discarded – undo
49 49
 use Platine\Validator\RuleInterface;
50 50
 use Platine\Validator\Validator;
51 51
 
52
-class Password implements RuleInterface
53
-{
52
+class Password implements RuleInterface {
54 53
     /*
55 54
      * The error type list
56 55
      */
@@ -76,8 +75,7 @@  discard block
 block discarded – undo
76 75
      * Constructor
77 76
      * @param array<string, bool|int> $rules
78 77
      */
79
-    public function __construct(array $rules = [])
80
-    {
78
+    public function __construct(array $rules = []) {
81 79
         $this->rules = array_merge([
82 80
             'length' => 5,
83 81
             'uppercase' => false,
Please login to merge, or discard this patch.