| @@ -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; | 
| @@ -123,7 +123,7 @@ | ||
| 123 | 123 | } | 
| 124 | 124 | } | 
| 125 | 125 | |
| 126 | - public function switch(Context $context): Context | |
| 126 | + public function switch (Context $context): Context | |
| 127 | 127 |      { | 
| 128 | 128 | $previous = $this->context; | 
| 129 | 129 | $this->context = $context; | 
| @@ -35,7 +35,7 @@ | ||
| 35 | 35 |      { | 
| 36 | 36 | $previous = $this->features[$feature]; | 
| 37 | 37 |          if (is_bool($state) || is_numeric($state) || is_null($state)) { | 
| 38 | - $this->features[$feature] = (bool)$state; | |
| 38 | + $this->features[$feature] = (bool) $state; | |
| 39 | 39 |          } elseif (is_string($state)) { | 
| 40 | 40 | $this->features[$feature] = in_array(strtolower($state), ['on', 'true', 'enabled'], true); | 
| 41 | 41 | } | 
| @@ -223,7 +223,7 @@ | ||
| 223 | 223 |          try { | 
| 224 | 224 | $parsedPartial = $renderingContext->getTemplateParser()->getOrParseAndStoreTemplate( | 
| 225 | 225 | $templatePaths->getPartialIdentifier($partialName), | 
| 226 | -                function (RenderingContextInterface $renderingContext) use ($partialName): string { | |
| 226 | +                function(RenderingContextInterface $renderingContext) use ($partialName): string { | |
| 227 | 227 | return $renderingContext->getTemplatePaths()->getPartialSource($partialName); | 
| 228 | 228 | } | 
| 229 | 229 | ); | 
| @@ -80,7 +80,7 @@ | ||
| 80 | 80 |      { | 
| 81 | 81 | $this->ignoreEmptyAttributes = $ignoreEmptyAttributes; | 
| 82 | 82 |          if ($ignoreEmptyAttributes) { | 
| 83 | -            $this->attributes = array_filter($this->attributes, function ($item): bool { return trim((string) $item) !== ''; }); | |
| 83 | +            $this->attributes = array_filter($this->attributes, function($item): bool { return trim((string) $item) !== ''; }); | |
| 84 | 84 | } | 
| 85 | 85 | } | 
| 86 | 86 | |
| @@ -153,7 +153,7 @@ | ||
| 153 | 153 | protected function buildRenderChildrenClosure() | 
| 154 | 154 |      { | 
| 155 | 155 | $self = clone $this; | 
| 156 | -        $renderChildrenClosure = function () use ($self) { | |
| 156 | +        $renderChildrenClosure = function() use ($self) { | |
| 157 | 157 | return $self->renderChildren(); | 
| 158 | 158 | }; | 
| 159 | 159 | return $renderChildrenClosure; | 
| @@ -79,7 +79,7 @@ | ||
| 79 | 79 | $argumentName = $this->resolveContentArgumentName(); | 
| 80 | 80 | $arguments = $this->arguments ?? []; | 
| 81 | 81 | $self = $this; | 
| 82 | -        $renderChildrenClosure = function () use ($arguments, $argumentName, $self) { | |
| 82 | +        $renderChildrenClosure = function() use ($arguments, $argumentName, $self) { | |
| 83 | 83 | return !empty($argumentName) ? ($arguments[$argumentName] ?? $self->renderChildren()) : $self->renderChildren(); | 
| 84 | 84 | }; | 
| 85 | 85 | return $renderChildrenClosure; | 
| @@ -326,7 +326,7 @@ discard block | ||
| 326 | 326 | $this->escapingEnabled = $this->configuration->isFeatureEnabled(Configuration::FEATURE_ESCAPING); | 
| 327 | 327 |                      if (!$this->configuration->isFeatureEnabled(Configuration::FEATURE_PARSING)) { | 
| 328 | 328 |                          throw (new PassthroughSourceException('Source must be represented as raw string', 1563379852)) | 
| 329 | - ->setSource((string)$this->sequenceRemainderAsText()); | |
| 329 | + ->setSource((string) $this->sequenceRemainderAsText()); | |
| 330 | 330 | } | 
| 331 | 331 | return; | 
| 332 | 332 | } | 
| @@ -513,7 +513,7 @@ discard block | ||
| 513 | 513 |                              // hand equivalent of having written `attr="{attr}"` in the Fluid template. | 
| 514 | 514 | $key = $captured; | 
| 515 | 515 | } | 
| 516 | -                    } elseif ($namespace !== null || (!isset($namespace, $method) && $this->resolver->isAliasRegistered((string)$captured))) { | |
| 516 | +                    } elseif ($namespace !== null || (!isset($namespace, $method) && $this->resolver->isAliasRegistered((string) $captured))) { | |
| 517 | 517 | $method = $captured; | 
| 518 | 518 | $viewHelperNode = $this->resolver->createViewHelperInstance($namespace, $method); | 
| 519 | 519 | $arguments = $viewHelperNode->getArguments(); | 
| @@ -609,7 +609,7 @@ discard block | ||
| 609 | 609 | ++$ignoredEndingBraces; | 
| 610 | 610 | $countedEscapes = 0; | 
| 611 | 611 |                          if ($captured !== null) { | 
| 612 | - $node->addChild(new TextNode((string)$captured)); | |
| 612 | + $node->addChild(new TextNode((string) $captured)); | |
| 613 | 613 | } | 
| 614 | 614 |                      } elseif ($this->splitter->context->context === Context::CONTEXT_PROTECTED) { | 
| 615 | 615 | // Ignore one ending additional curly brace. Subtracted in the BYTE_INLINE_END case below. | 
| @@ -752,7 +752,7 @@ discard block | ||
| 752 | 752 | $isArray = $allowArray; | 
| 753 | 753 | $callDetected = false; | 
| 754 | 754 | |
| 755 | - $text .= $this->source->source[$this->splitter->index - 1]; | |
| 755 | + $text .= $this->source->source[$this->splitter->index - 1]; | |
| 756 | 756 | $node = $node ?? new ObjectAccessorNode(); | 
| 757 | 757 |                      if ($potentialAccessor ?? $captured) { | 
| 758 | 758 | $node->addChild(new TextNode($potentialAccessor . $captured)); | 
| @@ -976,7 +976,7 @@ discard block | ||
| 976 | 976 |                          throw $this->createErrorAtPosition('Unexpected colon or equals sign, no preceding key', 1559250839); | 
| 977 | 977 | } | 
| 978 | 978 |                      if ($definitions !== null && !$numeric && !isset($definitions[$key])) { | 
| 979 | - throw $this->createUnsupportedArgumentError((string)$key, $definitions); | |
| 979 | + throw $this->createUnsupportedArgumentError((string) $key, $definitions); | |
| 980 | 980 | } | 
| 981 | 981 | break; | 
| 982 | 982 | |
| @@ -1040,7 +1040,7 @@ discard block | ||
| 1040 | 1040 |                      } elseif ($captured !== null) { | 
| 1041 | 1041 | $key = $key ?? ($numeric ? ++$itemCount : $captured); | 
| 1042 | 1042 |                          if (!$numeric && $definitions !== null && !isset($definitions[$key])) { | 
| 1043 | - throw $this->createUnsupportedArgumentError((string)$key, $definitions); | |
| 1043 | + throw $this->createUnsupportedArgumentError((string) $key, $definitions); | |
| 1044 | 1044 | } | 
| 1045 | 1045 | $value = is_numeric($captured) ? $captured + 0 : new ObjectAccessorNode($captured); | 
| 1046 | 1046 | } | 
| @@ -1084,7 +1084,7 @@ discard block | ||
| 1084 | 1084 | } | 
| 1085 | 1085 | } | 
| 1086 | 1086 |                      if (!$numeric && isset($key, $definitions) && !isset($definitions[$key])) { | 
| 1087 | - throw $this->createUnsupportedArgumentError((string)$key, $definitions); | |
| 1087 | + throw $this->createUnsupportedArgumentError((string) $key, $definitions); | |
| 1088 | 1088 | } | 
| 1089 | 1089 | $this->escapingEnabled = $escapingEnabledBackup; | 
| 1090 | 1090 | $this->splitter->switch($restore); |