Completed
Push — master ( 72ec50...ec55c5 )
by Lars
01:17
created
src/voku/HtmlFormValidator/ValidatorResult.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 namespace voku\HtmlFormValidator;
6 6
 
7
-use Symfony\Component\CssSelector\CssSelectorConverter;
8 7
 use Symfony\Component\CssSelector\Exception\SyntaxErrorException;
9 8
 use voku\helper\HtmlDomParser;
10 9
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace voku\HtmlFormValidator;
6 6
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
   public function setError(string $field, $errorMsg): ValidatorResult
87 87
   {
88 88
     try {
89
-      $inputTag = $this->formDocument->find('[name=' . $field . ']', 0);
89
+      $inputTag = $this->formDocument->find('[name='.$field.']', 0);
90 90
       $inputTag->setAttribute('aria-invalid', 'true');
91 91
     } catch (SyntaxErrorException $syntaxErrorException) {
92 92
       // TODO@me? -> can the symfony CssSelectorConverter use array-name-attributes?
Please login to merge, or discard this patch.
src/voku/HtmlFormValidator/Validator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace voku\HtmlFormValidator;
6 6
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
       $currentFieldData = \call_user_func([UTF8::class, $fieldFilter], $currentFieldData);
118 118
     } else {
119 119
       throw new UnknownFilter(
120
-          'No filter available for "' . $fieldFilter . '"'
120
+          'No filter available for "'.$fieldFilter.'"'
121 121
       );
122 122
     }
123 123
 
@@ -169,8 +169,8 @@  discard block
 block discarded – undo
169 169
       $fieldHelperChar = '';
170 170
       $fieldArrayTmp = preg_replace_callback(
171 171
           '/\[([^\]]+)\]/',
172
-          function ($match) use ($fieldHelperChar) {
173
-            return $match[1] . $fieldHelperChar;
172
+          function($match) use ($fieldHelperChar) {
173
+            return $match[1].$fieldHelperChar;
174 174
           },
175 175
           $fieldArray
176 176
       );
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
           if (\strpos($filtersOuter, '|') !== false) {
374 374
             $fieldFilters = \explode('|', $filtersOuter);
375 375
           } else {
376
-            $fieldFilters = (array)$filtersOuter;
376
+            $fieldFilters = (array) $filtersOuter;
377 377
           }
378 378
 
379 379
           foreach ($fieldFilters as $fieldFilter) {
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
         if (\strpos($fieldRuleOuter, '|') !== false) {
407 407
           $fieldRules = \explode('|', $fieldRuleOuter);
408 408
         } else {
409
-          $fieldRules = (array)$fieldRuleOuter;
409
+          $fieldRules = (array) $fieldRuleOuter;
410 410
         }
411 411
 
412 412
         foreach ($fieldRules as $fieldRule) {
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
               $respectValidatorFactory->rule($validationClass);
420 420
             } catch (ComponentException $componentException) {
421 421
               throw new UnknownValidationRule(
422
-                  'No rule defined for: ' . $field . ' (rule: ' . $fieldRule . ')',
422
+                  'No rule defined for: '.$field.' (rule: '.$fieldRule.')',
423 423
                   500,
424 424
                   $componentException
425 425
               );
Please login to merge, or discard this patch.
src/voku/HtmlFormValidator/Exceptions/UnknownValidationRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace voku\HtmlFormValidator\Exceptions;
6 6
 
Please login to merge, or discard this patch.
src/voku/HtmlFormValidator/Exceptions/NoValidationRule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace voku\HtmlFormValidator\Exceptions;
6 6
 
Please login to merge, or discard this patch.
src/voku/HtmlFormValidator/Exceptions/UnknownFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace voku\HtmlFormValidator\Exceptions;
6 6
 
Please login to merge, or discard this patch.