@@ -4,7 +4,6 @@ |
||
| 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 | |
@@ -1,6 +1,6 @@ discard block |
||
| 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 |
||
| 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? |
@@ -1,6 +1,6 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | ); |
@@ -1,6 +1,6 @@ |
||
| 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 | |
@@ -1,6 +1,6 @@ |
||
| 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 | |
@@ -1,6 +1,6 @@ |
||
| 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 | |