Passed
Push — master ( c6e4cd...5de612 )
by Darío
01:48
created
test/Validator/FormValidatorTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         ]);
48 48
 
49 49
         $form->fill([
50
-            "username" => 'jobs',       # wrong because of minlength attr
50
+            "username" => 'jobs', # wrong because of minlength attr
51 51
             "password" => 'jVi7Qp4X',
52 52
             "email"    => 'j@'          # wrong because of type and minlength attr
53 53
         ]);
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         ]);
199 199
 
200 200
         $form->fill([
201
-            "username" => 'jobs',       # wrong because of minlength attr
201
+            "username" => 'jobs', # wrong because of minlength attr
202 202
         ]);
203 203
 
204 204
         $validator = new FormValidator($form, 'en');
@@ -243,12 +243,12 @@  discard block
 block discarded – undo
243 243
         $form->fill([
244 244
             "product" => [
245 245
                 "optical mouse",
246
-                "-",                # wrong name
246
+                "-", # wrong name
247 247
                 "78"                # another wrong name
248 248
             ],
249 249
             "price" => [
250 250
                 10,
251
-                0,   # wrong price
251
+                0, # wrong price
252 252
                 0    # another wrong price
253 253
             ]
254 254
         ]);
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
         ]);
306 306
 
307 307
         $form->fill([
308
-            "username" => 'steave jobs',       # wrong because of minlength attr
308
+            "username" => 'steave jobs', # wrong because of minlength attr
309 309
             "password" => 'jVi7Qp4X',
310 310
             "type"     => 'moderator'          # wrong because moderator is not a valid needle
311 311
         ]);
Please login to merge, or discard this patch.
src/Validator/FormValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -304,7 +304,7 @@
 block discarded – undo
304 304
             {
305 305
                 foreach ($validator->getMessages() as $message)
306 306
                 {
307
-                    $this->error($label ."-~-". (count($this->getErrors()) + 1), $message);
307
+                    $this->error($label . "-~-" . (count($this->getErrors()) + 1), $message);
308 308
                 }
309 309
             }
310 310
         }
Please login to merge, or discard this patch.