@@ -15,7 +15,6 @@ |
||
| 15 | 15 | use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\NodeInterface; |
| 16 | 16 | use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\NumericNode; |
| 17 | 17 | use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode; |
| 18 | -use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\PostponedViewHelperNode; |
|
| 19 | 18 | use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode; |
| 20 | 19 | use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\TextNode; |
| 21 | 20 | use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\ViewHelperNode; |
@@ -313,7 +313,6 @@ |
||
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | /** |
| 316 | - * @param ArrayNode $node |
|
| 317 | 316 | * @return array |
| 318 | 317 | * @see convert() |
| 319 | 318 | */ |
@@ -200,7 +200,7 @@ |
||
| 200 | 200 | && $argumentsObjectTree[$argumentName] !== null) { |
| 201 | 201 | $argumentsObjectTree[$argumentName] = new BooleanNode($argumentsObjectTree[$argumentName]); |
| 202 | 202 | } else { |
| 203 | - $argumentsObjectTree[$argumentName] = (bool)$argumentsObjectTree[$argumentName]; |
|
| 203 | + $argumentsObjectTree[$argumentName] = (bool) $argumentsObjectTree[$argumentName]; |
|
| 204 | 204 | } |
| 205 | 205 | } |
| 206 | 206 | } |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | public const CONTEXT_ROOT = 0; |
| 9 | 9 | public const CONTEXT_INLINE = 1; |
| 10 | 10 | public const CONTEXT_TAG = 2; |
| 11 | - public const CONTEXT_ARRAY= 3; |
|
| 11 | + public const CONTEXT_ARRAY = 3; |
|
| 12 | 12 | public const CONTEXT_QUOTED = 4; |
| 13 | 13 | public const CONTEXT_ATTRIBUTES = 5; |
| 14 | 14 | public const CONTEXT_DEAD = 6; |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | { |
| 49 | 49 | $previous = $this->features[$feature]; |
| 50 | 50 | if (is_bool($state) || is_numeric($state) || is_null($state)) { |
| 51 | - $this->features[$feature] = (bool)$state; |
|
| 51 | + $this->features[$feature] = (bool) $state; |
|
| 52 | 52 | } elseif (is_string($state)) { |
| 53 | 53 | $this->features[$feature] = in_array(strtolower($state), ['on', 'true', 'enabled']); |
| 54 | 54 | } |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | protected static function evaluateCondition($arguments = null) |
| 125 | 125 | { |
| 126 | - return isset($arguments['condition']) && (bool)($arguments['condition']); |
|
| 126 | + return isset($arguments['condition']) && (bool) ($arguments['condition']); |
|
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | /** |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | if ($condition instanceof NodeInterface) { |
| 210 | 210 | $condition = $condition->evaluate($this->renderingContext); |
| 211 | 211 | } |
| 212 | - if ((bool)$condition === true) { |
|
| 212 | + if ((bool) $condition === true) { |
|
| 213 | 213 | return $childNode->evaluate($this->renderingContext); |
| 214 | 214 | } |
| 215 | 215 | } else { |
@@ -186,7 +186,7 @@ |
||
| 186 | 186 | $argument = $definition->getDefaultValue(); |
| 187 | 187 | } elseif (($type = $definition->getType()) && ($type === 'bool' || $type === 'boolean')) { |
| 188 | 188 | // Cast the value or create a BooleanNode |
| 189 | - $argument = is_bool($argument) || is_numeric($argument) ? (bool)$argument : new BooleanNode($argument); |
|
| 189 | + $argument = is_bool($argument) || is_numeric($argument) ? (bool) $argument : new BooleanNode($argument); |
|
| 190 | 190 | } |
| 191 | 191 | $arguments[$name] = $argument; |
| 192 | 192 | } |
@@ -159,7 +159,7 @@ |
||
| 159 | 159 | * character (byte). The secondary bit mask is costless as it is OR'ed into |
| 160 | 160 | * the primary bit mask. |
| 161 | 161 | * |
| 162 | - * @return \NoRewindIterator|string[]|null[] |
|
| 162 | + * @return \Generator |
|
| 163 | 163 | */ |
| 164 | 164 | public function createGenerator(): \Generator |
| 165 | 165 | { |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | { |
| 125 | 125 | $position = new Position($this->context, $this->index); |
| 126 | 126 | $ascii = (string) $this->source->bytes[$this->index]; |
| 127 | - $message .= ' ASCII: ' . $ascii . ': ' . $this->extractSourceDumpOfLineAtPosition($position); |
|
| 127 | + $message .= ' ASCII: ' . $ascii . ': ' . $this->extractSourceDumpOfLineAtPosition($position); |
|
| 128 | 128 | $error = new SequencingException($message, $code); |
| 129 | 129 | return $error; |
| 130 | 130 | } |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | } |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | - public function switch(Context $context): Context |
|
| 196 | + public function switch (Context $context): Context |
|
| 197 | 197 | { |
| 198 | 198 | $previous = $this->context; |
| 199 | 199 | $this->context = $context; |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | $isArray = $allowArray; |
| 484 | 484 | $callDetected = false; |
| 485 | 485 | $potentialAccessor = $potentialAccessor ?? $captured; |
| 486 | - $text .= $this->source->source[$this->splitter->index - 1]; |
|
| 486 | + $text .= $this->source->source[$this->splitter->index - 1]; |
|
| 487 | 487 | if ($node instanceof ViewHelperInterface) { |
| 488 | 488 | $node->postParse($arguments, $this->state, $this->renderingContext); |
| 489 | 489 | } |
@@ -521,7 +521,7 @@ discard block |
||
| 521 | 521 | $this->splitter->switch($this->contexts->inline); |
| 522 | 522 | if ($childNodeToAdd) { |
| 523 | 523 | $escapingEnabledBackup = $this->escapingEnabled; |
| 524 | - $this->escapingEnabled = (bool)$node->isChildrenEscapingEnabled(); |
|
| 524 | + $this->escapingEnabled = (bool) $node->isChildrenEscapingEnabled(); |
|
| 525 | 525 | if ($childNodeToAdd instanceof ObjectAccessorNode) { |
| 526 | 526 | $this->callInterceptor($childNodeToAdd, InterceptorInterface::INTERCEPT_OBJECTACCESSOR); |
| 527 | 527 | } |
@@ -594,7 +594,7 @@ discard block |
||
| 594 | 594 | $node = new TextNode($text); |
| 595 | 595 | $interceptionPoint = InterceptorInterface::INTERCEPT_TEXT; |
| 596 | 596 | } |
| 597 | - } elseif ($hasPass && $this->resolver->isAliasRegistered((string)$potentialAccessor)) { |
|
| 597 | + } elseif ($hasPass && $this->resolver->isAliasRegistered((string) $potentialAccessor)) { |
|
| 598 | 598 | // Fourth priority check is for a pass to a ViewHelper alias, e.g. "{value | raw}" in which case |
| 599 | 599 | // we look for the alias used and create a ViewHelperNode with no arguments. |
| 600 | 600 | $childNodeToAdd = $node; |
@@ -615,7 +615,7 @@ discard block |
||
| 615 | 615 | } |
| 616 | 616 | |
| 617 | 617 | $escapingEnabledBackup = $this->escapingEnabled; |
| 618 | - $this->escapingEnabled = (bool)((isset($viewHelper) && $node->isOutputEscapingEnabled()) || $escapingEnabledBackup); |
|
| 618 | + $this->escapingEnabled = (bool) ((isset($viewHelper) && $node->isOutputEscapingEnabled()) || $escapingEnabledBackup); |
|
| 619 | 619 | $this->callInterceptor($node, $interceptionPoint); |
| 620 | 620 | $this->escapingEnabled = $escapingEnabledBackup; |
| 621 | 621 | return $node; |
@@ -657,7 +657,7 @@ discard block |
||
| 657 | 657 | throw $this->splitter->createErrorAtPosition('Unexpected colon or equals sign, no preceding key', 1559250839); |
| 658 | 658 | } |
| 659 | 659 | if ($definitions !== null && !$numeric && !isset($definitions[$key])) { |
| 660 | - throw $this->splitter->createUnsupportedArgumentError((string)$key, $definitions); |
|
| 660 | + throw $this->splitter->createUnsupportedArgumentError((string) $key, $definitions); |
|
| 661 | 661 | } |
| 662 | 662 | break; |
| 663 | 663 | |
@@ -714,7 +714,7 @@ discard block |
||
| 714 | 714 | } elseif (isset($captured)) { |
| 715 | 715 | $key = $key ?? ($numeric ? ++$itemCount : $captured); |
| 716 | 716 | if (!$numeric && isset($definitions) && !isset($definitions[$key])) { |
| 717 | - throw $this->splitter->createUnsupportedArgumentError((string)$key, $definitions); |
|
| 717 | + throw $this->splitter->createUnsupportedArgumentError((string) $key, $definitions); |
|
| 718 | 718 | } |
| 719 | 719 | $array[$key] = is_numeric($captured) ? $captured + 0 : new ObjectAccessorNode($captured); |
| 720 | 720 | } |
@@ -754,7 +754,7 @@ discard block |
||
| 754 | 754 | } |
| 755 | 755 | } |
| 756 | 756 | if (!$numeric && isset($key, $definitions) && !isset($definitions[$key])) { |
| 757 | - throw $this->splitter->createUnsupportedArgumentError((string)$key, $definitions); |
|
| 757 | + throw $this->splitter->createUnsupportedArgumentError((string) $key, $definitions); |
|
| 758 | 758 | } |
| 759 | 759 | $this->escapingEnabled = $escapingEnabledBackup; |
| 760 | 760 | return new ArrayNode($array); |