@@ -85,7 +85,7 @@ |
||
| 85 | 85 | public function setError(string $field, $errorMsg): self |
| 86 | 86 | { |
| 87 | 87 | try { |
| 88 | - $inputTag = $this->formDocument->find('[name=' . $field . ']', 0); |
|
| 88 | + $inputTag = $this->formDocument->find('[name='.$field.']', 0); |
|
| 89 | 89 | } catch (SyntaxErrorException $syntaxErrorException) { |
| 90 | 90 | $inputTag = null; |
| 91 | 91 | // TODO@me -> can the symfony CssSelectorConverter use array-name-attributes? |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | $currentFieldData = \call_user_func_array([UTF8::class, $fieldFilter], $currentFieldData); |
| 157 | 157 | } else { |
| 158 | 158 | throw new UnknownFilter( |
| 159 | - 'No filter available for "' . $fieldFilter . '"' |
|
| 159 | + 'No filter available for "'.$fieldFilter.'"' |
|
| 160 | 160 | ); |
| 161 | 161 | } |
| 162 | 162 | |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | $namespaceSeparator = '\\'; |
| 198 | 198 | $rulePrefix = \rtrim($phpNamespace, $namespaceSeparator); |
| 199 | 199 | |
| 200 | - return $rulePrefix . $namespaceSeparator; |
|
| 200 | + return $rulePrefix.$namespaceSeparator; |
|
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | /** |
@@ -235,8 +235,8 @@ discard block |
||
| 235 | 235 | $fieldHelperChar = ''; |
| 236 | 236 | $fieldArrayTmp = \preg_replace_callback( |
| 237 | 237 | '/\[([^\]]+)\]/', |
| 238 | - function ($match) use ($fieldHelperChar) { |
|
| 239 | - return $match[1] . $fieldHelperChar; |
|
| 238 | + function($match) use ($fieldHelperChar) { |
|
| 239 | + return $match[1].$fieldHelperChar; |
|
| 240 | 240 | }, |
| 241 | 241 | $fieldArray |
| 242 | 242 | ); |
@@ -331,16 +331,16 @@ discard block |
||
| 331 | 331 | if ($htmlElement->id) { |
| 332 | 332 | $htmlElementHelperId = $htmlElement->id; |
| 333 | 333 | } elseif ($this->selector) { |
| 334 | - $htmlElementHelperId = 'html-element-validator-tmp-' . $this->selector; |
|
| 334 | + $htmlElementHelperId = 'html-element-validator-tmp-'.$this->selector; |
|
| 335 | 335 | } else { |
| 336 | 336 | $cssClassesTmp = \str_replace( |
| 337 | 337 | ' ', |
| 338 | 338 | '.', |
| 339 | 339 | $htmlElement->getAttribute('class') |
| 340 | 340 | ); |
| 341 | - $fakeCssSelector = $htmlElement->getNode()->getNodePath() . '/' . $cssClassesTmp; |
|
| 341 | + $fakeCssSelector = $htmlElement->getNode()->getNodePath().'/'.$cssClassesTmp; |
|
| 342 | 342 | |
| 343 | - $htmlElementHelperId = 'html-element-validator-tmp-' . $fakeCssSelector; |
|
| 343 | + $htmlElementHelperId = 'html-element-validator-tmp-'.$fakeCssSelector; |
|
| 344 | 344 | } |
| 345 | 345 | |
| 346 | 346 | $htmlElementTagSelector = 'input, textarea, select'; |
@@ -421,7 +421,7 @@ discard block |
||
| 421 | 421 | if ($inputType) { |
| 422 | 422 | $selectedRule = $this->autoSelectRuleByInputType($inputType); |
| 423 | 423 | if ($selectedRule) { |
| 424 | - $inputRule .= '|' . $selectedRule; |
|
| 424 | + $inputRule .= '|'.$selectedRule; |
|
| 425 | 425 | } |
| 426 | 426 | } |
| 427 | 427 | |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | // |
| 431 | 431 | |
| 432 | 432 | if ($inputPattern) { |
| 433 | - $inputRule .= '|regex(/' . $inputPattern . '/)'; |
|
| 433 | + $inputRule .= '|regex(/'.$inputPattern.'/)'; |
|
| 434 | 434 | } |
| 435 | 435 | |
| 436 | 436 | // |
@@ -438,19 +438,19 @@ discard block |
||
| 438 | 438 | // |
| 439 | 439 | |
| 440 | 440 | if ($inputMinLength) { |
| 441 | - $inputRule .= '|minLength(' . \serialize($inputMinLength) . ')'; |
|
| 441 | + $inputRule .= '|minLength('.\serialize($inputMinLength).')'; |
|
| 442 | 442 | } |
| 443 | 443 | |
| 444 | 444 | if ($inputMaxLength) { |
| 445 | - $inputRule .= '|maxLength(' . \serialize($inputMaxLength) . ')'; |
|
| 445 | + $inputRule .= '|maxLength('.\serialize($inputMaxLength).')'; |
|
| 446 | 446 | } |
| 447 | 447 | |
| 448 | 448 | if ($inputMin) { |
| 449 | - $inputRule .= '|min(' . \serialize($inputMin) . ')'; |
|
| 449 | + $inputRule .= '|min('.\serialize($inputMin).')'; |
|
| 450 | 450 | } |
| 451 | 451 | |
| 452 | 452 | if ($inputMax) { |
| 453 | - $inputRule .= '|max(' . \serialize($inputMax) . ')'; |
|
| 453 | + $inputRule .= '|max('.\serialize($inputMax).')'; |
|
| 454 | 454 | } |
| 455 | 455 | } |
| 456 | 456 | |
@@ -460,7 +460,7 @@ discard block |
||
| 460 | 460 | foreach ($htmlElementField->getElementsByTagName('option') as $option) { |
| 461 | 461 | $selectableValues[] = $option->getNode()->nodeValue; |
| 462 | 462 | } |
| 463 | - $inputRule .= '|in(' . \serialize($selectableValues) . ')'; |
|
| 463 | + $inputRule .= '|in('.\serialize($selectableValues).')'; |
|
| 464 | 464 | } elseif ( |
| 465 | 465 | ( |
| 466 | 466 | $inputType === 'checkbox' |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | $selectableValues = []; |
| 473 | 473 | |
| 474 | 474 | try { |
| 475 | - $htmlElementFieldNames = $htmlElement->find('[name=' . $htmlElementField->name . ']'); |
|
| 475 | + $htmlElementFieldNames = $htmlElement->find('[name='.$htmlElementField->name.']'); |
|
| 476 | 476 | } catch (SyntaxErrorException $syntaxErrorException) { |
| 477 | 477 | $htmlElementFieldNames = null; |
| 478 | 478 | // TODO@me -> can the symfony CssSelectorConverter use array-name-attributes? |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | } |
| 485 | 485 | } |
| 486 | 486 | |
| 487 | - $inputRule .= '|in(' . \serialize($selectableValues) . ')'; |
|
| 487 | + $inputRule .= '|in('.\serialize($selectableValues).')'; |
|
| 488 | 488 | } |
| 489 | 489 | } |
| 490 | 490 | |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | } |
| 646 | 646 | } catch (ComponentException $componentException) { |
| 647 | 647 | throw new UnknownValidationRule( |
| 648 | - 'No rule defined for: ' . $field . ' (rule: ' . $fieldRule . ' | class: ' . $validationClass . ')', |
|
| 648 | + 'No rule defined for: '.$field.' (rule: '.$fieldRule.' | class: '.$validationClass.')', |
|
| 649 | 649 | 500, |
| 650 | 650 | $componentException |
| 651 | 651 | ); |