diff --git a/composer.json b/composer.json
index d71d7698f..334b7a32c 100644
--- a/composer.json
+++ b/composer.json
@@ -17,7 +17,7 @@
},
"require-dev": {
"ext-json": "*",
- "friendsofphp/php-cs-fixer": "^3.52.1",
+ "friendsofphp/php-cs-fixer": "^3.54.0",
"phpstan/phpstan": "^1.10.14",
"phpstan/phpstan-phpunit": "^1.3.11",
"phpunit/phpunit": "^10.2.6"
diff --git a/examples/example_conditions.php b/examples/example_conditions.php
index 6600a2610..7072861f4 100644
--- a/examples/example_conditions.php
+++ b/examples/example_conditions.php
@@ -34,8 +34,8 @@
'nested' => [
'then' => 'Dotted variable TRUE',
'else' => 'Dotted variable FALSE',
- 'check' => true
- ]
+ 'check' => true,
+ ],
]);
// Assigning the template path and filename to be rendered. Doing this overrides
diff --git a/examples/example_multiplepaths.php b/examples/example_multiplepaths.php
index b7a042bef..365e7871c 100644
--- a/examples/example_multiplepaths.php
+++ b/examples/example_multiplepaths.php
@@ -49,7 +49,7 @@
TemplatePaths::CONFIG_PARTIALROOTPATHS => [
__DIR__ . '/Resources/Private/Partials/',
__DIR__ . '/ResourceOverrides/Private/Partials/',
- ]
+ ],
]);
$view->assign('foobar', 'This is foobar');
diff --git a/examples/example_structures.php b/examples/example_structures.php
index ae6b6be62..faa35d1eb 100644
--- a/examples/example_structures.php
+++ b/examples/example_structures.php
@@ -35,7 +35,7 @@
$view->assign('group', [
['property' => 'one'],
['property' => 'one'],
- ['property' => 'two']
+ ['property' => 'two'],
]);
// Rendering the View: plain old rendering of single file, no bells and whistles.
diff --git a/examples/example_variables.php b/examples/example_variables.php
index 76a8f30ee..8cca4f579 100644
--- a/examples/example_variables.php
+++ b/examples/example_variables.php
@@ -33,7 +33,7 @@
'csv' => 'one,two',
'aStringWithNumbers' => '132 a string',
'anArray' => ['one', 'two'],
- 'typeNameInteger' => 'integer'
+ 'typeNameInteger' => 'integer',
],
'foobar' => 'string foo',
// The variables we will use as dynamic part names:
@@ -48,14 +48,14 @@
// A numerically indexed array which we will access directly.
'numeric' => [
'foo',
- 'bar'
+ 'bar',
],
$dynamic1 => 'Dynamic key in $array[$dynamic1]',
$dynamic2 => 'Dynamic key in $array[$dynamic2]',
],
'123numericprefix' => 'Numeric prefixed variable',
// A variable whose value refers to another variable name
- 'dynamicVariableName' => 'foobar'
+ 'dynamicVariableName' => 'foobar',
]);
// Assigning the template path and filename to be rendered. Doing this overrides
diff --git a/examples/src/CustomViewHelperResolver.php b/examples/src/CustomViewHelperResolver.php
index 6132a495e..4b3405e02 100644
--- a/examples/src/CustomViewHelperResolver.php
+++ b/examples/src/CustomViewHelperResolver.php
@@ -55,7 +55,7 @@ public function getArgumentDefinitionsForViewHelper(ViewHelperInterface $viewHel
'array', // our argument must now be an array
'This is our new description for the argument',
false, // argument is no longer mandatory
- ['foo' => 'bar'] // our argument has a new default value if argument is not provided
+ ['foo' => 'bar'], // our argument has a new default value if argument is not provided
);
}
return $arguments;
diff --git a/examples/src/Helper/ExampleHelper.php b/examples/src/Helper/ExampleHelper.php
index b558abba9..5951e6072 100644
--- a/examples/src/Helper/ExampleHelper.php
+++ b/examples/src/Helper/ExampleHelper.php
@@ -31,13 +31,13 @@ public function init(): TemplateView
// rendering the file located in `TemplatesB` because this folder was last
// and is checked first (think of these paths as prioritised fallbacks).
$paths->setTemplateRootPaths([
- __DIR__ . '/../../Resources/Private/Templates/'
+ __DIR__ . '/../../Resources/Private/Templates/',
]);
$paths->setLayoutRootPaths([
- __DIR__ . '/../../Resources/Private/Layouts/'
+ __DIR__ . '/../../Resources/Private/Layouts/',
]);
$paths->setPartialRootPaths([
- __DIR__ . '/../../Resources/Private/Partials/'
+ __DIR__ . '/../../Resources/Private/Partials/',
]);
// Configure View's caching to use system temp dir (typically /tmp und unix) as caching directory.
diff --git a/src/Core/Cache/FluidCacheWarmupResult.php b/src/Core/Cache/FluidCacheWarmupResult.php
index 327577e18..c6cc162c9 100644
--- a/src/Core/Cache/FluidCacheWarmupResult.php
+++ b/src/Core/Cache/FluidCacheWarmupResult.php
@@ -60,7 +60,7 @@ public function add(ParsedTemplateInterface $state, $templatePathAndFilename)
static::RESULT_COMPILABLE => $currentlyCompiled || $state->isCompilable(),
static::RESULT_COMPILED => $currentlyCompiled,
static::RESULT_HASLAYOUT => $state->hasLayout(),
- static::RESULT_COMPILEDCLASS => $state->getIdentifier()
+ static::RESULT_COMPILEDCLASS => $state->getIdentifier(),
];
if ($state instanceof FailedCompilingState) {
$this->results[$templatePathAndFilename][static::RESULT_FAILURE] = $state->getFailureReason();
diff --git a/src/Core/Cache/StandardCacheWarmer.php b/src/Core/Cache/StandardCacheWarmer.php
index ef5d3183d..131c9146d 100644
--- a/src/Core/Cache/StandardCacheWarmer.php
+++ b/src/Core/Cache/StandardCacheWarmer.php
@@ -76,7 +76,7 @@ public function warm(RenderingContextInterface $renderingContext)
$result->merge(
$this->warmupTemplateRootPaths($renderingContext),
$this->warmupPartialRootPaths($renderingContext),
- $this->warmupLayoutRootPaths($renderingContext)
+ $this->warmupLayoutRootPaths($renderingContext),
);
return $result;
}
@@ -121,9 +121,9 @@ protected function warmupTemplateRootPaths(RenderingContextInterface $renderingC
$templateFile,
$paths->getTemplateIdentifier(
$controllerName,
- substr($templateFile, $pathCutoffPoint, $formatCutoffPoint)
+ substr($templateFile, $pathCutoffPoint, $formatCutoffPoint),
),
- $renderingContext
+ $renderingContext,
);
$result->add($state, $templateFile);
}
@@ -135,9 +135,9 @@ protected function warmupTemplateRootPaths(RenderingContextInterface $renderingC
$templateFile,
$paths->getTemplateIdentifier(
'Default',
- substr($templateFile, $pathCutoffPoint, $formatCutoffPoint)
+ substr($templateFile, $pathCutoffPoint, $formatCutoffPoint),
),
- $renderingContext
+ $renderingContext,
);
$result->add($state, $templateFile);
}
@@ -174,7 +174,7 @@ protected function warmupPartialRootPaths(RenderingContextInterface $renderingCo
$state = $this->warmSingleFile(
$partialFile,
$paths->getPartialIdentifier(substr($partialFile, $pathCutoffPoint, $formatCutoffPoint)),
- $renderingContext
+ $renderingContext,
);
$result->add($state, $partialFile);
}
@@ -211,7 +211,7 @@ protected function warmupLayoutRootPaths(RenderingContextInterface $renderingCon
$state = $this->warmSingleFile(
$layoutFile,
$paths->getLayoutIdentifier(substr($layoutFile, $pathCutoffPoint, $formatCutoffPoint)),
- $renderingContext
+ $renderingContext,
);
$result->add($state, $layoutFile);
}
@@ -264,18 +264,18 @@ protected function warmSingleFile($templatePathAndFilename, $identifier, Renderi
try {
$parsedTemplate = $renderingContext->getTemplateParser()->getOrParseAndStoreTemplate(
$identifier,
- $this->createClosure($templatePathAndFilename)
+ $this->createClosure($templatePathAndFilename),
);
} catch (StopCompilingException $error) {
$parsedTemplate->setFailureReason(sprintf('Compiling is intentionally disabled. Specific reason unknown. Message: "%s"', $error->getMessage()));
$parsedTemplate->setMitigations([
'Can be caused by specific ViewHelpers. If this is is not intentional: avoid ViewHelpers which disable caches.',
- 'If cache is intentionally disabled: consider using `f:cache.static` to cause otherwise uncompilable ViewHelpers\' output to be replaced with a static string in compiled templates.'
+ 'If cache is intentionally disabled: consider using `f:cache.static` to cause otherwise uncompilable ViewHelpers\' output to be replaced with a static string in compiled templates.',
]);
} catch (ExpressionException $error) {
$parsedTemplate->setFailureReason(sprintf('ExpressionNode evaluation error: %s', $error->getMessage()));
$parsedTemplate->setMitigations([
- 'Emulate variables used in ExpressionNode using `f:cache.warmup` or assign in warming RenderingContext'
+ 'Emulate variables used in ExpressionNode using `f:cache.warmup` or assign in warming RenderingContext',
]);
} catch (\TYPO3Fluid\Fluid\Core\Parser\Exception $error) {
$parsedTemplate->setFailureReason($error->getMessage());
@@ -283,25 +283,25 @@ protected function warmSingleFile($templatePathAndFilename, $identifier, Renderi
'Fix possible syntax errors.',
'Check that all ViewHelpers are correctly referenced and namespaces loaded (note: namespaces may be added externally!)',
'Check that all ExpressionNode types used by the template are loaded (note: may depend on RenderingContext implementation!)',
- 'Emulate missing variables used in expressions by using `f:cache.warmup` around your template code.'
+ 'Emulate missing variables used in expressions by using `f:cache.warmup` around your template code.',
]);
} catch (\TYPO3Fluid\Fluid\Core\ViewHelper\Exception $error) {
$parsedTemplate->setFailureReason(sprintf('ViewHelper threw Exception: %s', $error->getMessage()));
$parsedTemplate->setMitigations([
'Emulate missing variables using `f:cache.warmup` around failing ViewHelper.',
'Emulate globals / context required by ViewHelper.',
- 'Disable caching for template if ViewHelper depends on globals / context that cannot be emulated.'
+ 'Disable caching for template if ViewHelper depends on globals / context that cannot be emulated.',
]);
} catch (\TYPO3Fluid\Fluid\Core\Exception $error) {
$parsedTemplate->setFailureReason(sprintf('Fluid engine error: %s', $error->getMessage()));
$parsedTemplate->setMitigations([
- 'Search online for additional information about specific error.'
+ 'Search online for additional information about specific error.',
]);
} catch (Exception $error) {
$parsedTemplate->setFailureReason(sprintf('Fluid view error: %s', $error->getMessage()));
$parsedTemplate->setMitigations([
'Investigate reported error in View class for missing variable checks, missing configuration etc.',
- 'Consider using a different View class for rendering in warmup mode (a custom rendering context can provide it)'
+ 'Consider using a different View class for rendering in warmup mode (a custom rendering context can provide it)',
]);
} catch (\RuntimeException $error) {
$parsedTemplate->setFailureReason(
@@ -310,11 +310,11 @@ protected function warmSingleFile($templatePathAndFilename, $identifier, Renderi
get_class($error),
$error->getFile(),
$error->getLine(),
- $error->getMessage()
- )
+ $error->getMessage(),
+ ),
);
$parsedTemplate->setMitigations([
- 'There are no automated suggestions for mitigating this issue. An online search may yield more information.'
+ 'There are no automated suggestions for mitigating this issue. An online search may yield more information.',
]);
}
return $parsedTemplate;
diff --git a/src/Core/Compiler/TemplateCompiler.php b/src/Core/Compiler/TemplateCompiler.php
index 6a6baf6fc..3cee3659d 100644
--- a/src/Core/Compiler/TemplateCompiler.php
+++ b/src/Core/Compiler/TemplateCompiler.php
@@ -192,7 +192,7 @@ public function store($identifier, ParsingState $parsingState)
// RootNode, we could just call $parsingState->getRootNode()->compile().
$this->convertSubNodes($parsingState->getRootNode()->getChildNodes()),
'render',
- 'Main Render function'
+ 'Main Render function',
);
$storedLayoutName = $parsingState->getVariableContainer()->get('layoutName');
@@ -214,7 +214,7 @@ public function store($identifier, ParsingState $parsingState)
$this->generateCodeForLayoutName($storedLayoutName),
($parsingState->hasLayout() ? 'true' : 'false'),
var_export($this->renderingContext->getViewHelperResolver()->getNamespaces(), true),
- $generatedRenderFunctions
+ $generatedRenderFunctions,
);
$this->renderingContext->getCache()->set($identifier, $templateCode);
return $templateCode;
@@ -250,7 +250,7 @@ protected function generateSectionCodeFromParsingState(ParsingState $parsingStat
// and call $node->convert($this) directly.
$this->convertSubNodes($sectionRootNode->getChildNodes()),
'section_' . sha1($sectionName),
- 'section ' . $sectionName
+ 'section ' . $sectionName,
);
}
}
@@ -285,7 +285,7 @@ protected function generateCodeForSection(array $converted, string $methodName,
'}' . chr(10),
$comment,
$methodName,
- $execution
+ $execution,
);
}
return sprintf(
@@ -299,7 +299,7 @@ protected function generateCodeForSection(array $converted, string $methodName,
$comment,
$methodName,
$initialization,
- $execution
+ $execution,
);
}
@@ -354,7 +354,7 @@ private function convertSubNodes(array $nodes): array
case 0:
return [
'initialization' => '',
- 'execution' => 'NULL'
+ 'execution' => 'NULL',
];
case 1:
$childNode = current($nodes);
@@ -376,7 +376,7 @@ private function convertSubNodes(array $nodes): array
}
return [
'initialization' => $initializationPhpCode,
- 'execution' => $outputVariableName
+ 'execution' => $outputVariableName,
];
}
}
diff --git a/src/Core/Compiler/ViewHelperCompiler.php b/src/Core/Compiler/ViewHelperCompiler.php
index 7f14bda2a..5e6a9a2ef 100644
--- a/src/Core/Compiler/ViewHelperCompiler.php
+++ b/src/Core/Compiler/ViewHelperCompiler.php
@@ -93,8 +93,8 @@ public function compileWithCallToStaticMethod(ViewHelperInterface $viewHelper, $
$onClass,
$method,
$argumentsName,
- $renderChildrenClosureName
- )
+ $renderChildrenClosureName,
+ ),
];
}
}
diff --git a/src/Core/Parser/SyntaxTree/AbstractNode.php b/src/Core/Parser/SyntaxTree/AbstractNode.php
index a7c013c54..c5dc6983f 100644
--- a/src/Core/Parser/SyntaxTree/AbstractNode.php
+++ b/src/Core/Parser/SyntaxTree/AbstractNode.php
@@ -106,7 +106,7 @@ public function convert(TemplateCompiler $templateCompiler): array
{
return [
'initialization' => '// Uncompilable node type: ' . get_class($this) . chr(10),
- 'execution' => ''
+ 'execution' => '',
];
}
}
diff --git a/src/Core/Parser/SyntaxTree/ArrayNode.php b/src/Core/Parser/SyntaxTree/ArrayNode.php
index df2d2e88e..00a909209 100644
--- a/src/Core/Parser/SyntaxTree/ArrayNode.php
+++ b/src/Core/Parser/SyntaxTree/ArrayNode.php
@@ -54,21 +54,21 @@ public function convert(TemplateCompiler $templateCompiler): array
$initializationPhpCode .= sprintf(
'\'%s\' => %s,' . chr(10),
$key,
- $converted['execution']
+ $converted['execution'],
);
} elseif (is_numeric($value)) {
// handle int, float, numeric strings
$initializationPhpCode .= sprintf(
'\'%s\' => %s,' . chr(10),
$key,
- $value
+ $value,
);
} else {
// handle strings
$initializationPhpCode .= sprintf(
'\'%s\' => \'%s\',' . chr(10),
$key,
- str_replace(['\\', '\''], ['\\\\', '\\\''], $value)
+ str_replace(['\\', '\''], ['\\\\', '\\\''], $value),
);
}
}
@@ -76,7 +76,7 @@ public function convert(TemplateCompiler $templateCompiler): array
return [
'initialization' => $accumulatedInitializationPhpCode . chr(10) . $initializationPhpCode,
- 'execution' => $arrayVariableName
+ 'execution' => $arrayVariableName,
];
}
}
diff --git a/src/Core/Parser/SyntaxTree/BooleanNode.php b/src/Core/Parser/SyntaxTree/BooleanNode.php
index 8cbeaa734..b29f87230 100644
--- a/src/Core/Parser/SyntaxTree/BooleanNode.php
+++ b/src/Core/Parser/SyntaxTree/BooleanNode.php
@@ -176,8 +176,8 @@ public function convert(TemplateCompiler $templateCompiler): array
BooleanNode::class,
$functionName,
BooleanNode::class,
- $stack['execution']
- )
+ $stack['execution'],
+ ),
];
}
}
diff --git a/src/Core/Parser/SyntaxTree/EscapingNode.php b/src/Core/Parser/SyntaxTree/EscapingNode.php
index 6a6ceb1e6..54f44b308 100644
--- a/src/Core/Parser/SyntaxTree/EscapingNode.php
+++ b/src/Core/Parser/SyntaxTree/EscapingNode.php
@@ -73,7 +73,7 @@ public function convert(TemplateCompiler $templateCompiler): array
'call_user_func_array( function ($var) { ' .
'return (is_string($var) || (is_object($var) && method_exists($var, \'__toString\')) ' .
'? htmlspecialchars((string) $var, ENT_QUOTES) : $var); }, [%s])',
- $configuration['execution']
+ $configuration['execution'],
);
}
return $configuration;
diff --git a/src/Core/Parser/SyntaxTree/Expression/AbstractExpressionNode.php b/src/Core/Parser/SyntaxTree/Expression/AbstractExpressionNode.php
index 125133538..b4902b254 100644
--- a/src/Core/Parser/SyntaxTree/Expression/AbstractExpressionNode.php
+++ b/src/Core/Parser/SyntaxTree/Expression/AbstractExpressionNode.php
@@ -86,8 +86,8 @@ public function compile(TemplateCompiler $templateCompiler)
'\%s::evaluateExpression($renderingContext, %s, %s)',
$handlerClass,
$expressionVariable,
- $matchesVariable
- )
+ $matchesVariable,
+ ),
];
}
diff --git a/src/Core/Parser/SyntaxTree/Expression/CastingExpressionNode.php b/src/Core/Parser/SyntaxTree/Expression/CastingExpressionNode.php
index 6ffd49c6c..f1c9e783e 100644
--- a/src/Core/Parser/SyntaxTree/Expression/CastingExpressionNode.php
+++ b/src/Core/Parser/SyntaxTree/Expression/CastingExpressionNode.php
@@ -22,7 +22,7 @@ class CastingExpressionNode extends AbstractExpressionNode
* @var array
*/
protected static $validTypes = [
- 'integer', 'boolean', 'string', 'float', 'array', 'DateTime'
+ 'integer', 'boolean', 'string', 'float', 'array', 'DateTime',
];
/**
@@ -61,8 +61,8 @@ public static function evaluateExpression(RenderingContextInterface $renderingCo
sprintf(
'Invalid target conversion type "%s" specified in casting expression "{%s}".',
$type,
- $expression
- )
+ $expression,
+ ),
);
}
return self::convertStatic($variable, $type);
diff --git a/src/Core/Parser/SyntaxTree/Expression/TernaryExpressionNode.php b/src/Core/Parser/SyntaxTree/Expression/TernaryExpressionNode.php
index 74bc116a5..9f4b4558b 100644
--- a/src/Core/Parser/SyntaxTree/Expression/TernaryExpressionNode.php
+++ b/src/Core/Parser/SyntaxTree/Expression/TernaryExpressionNode.php
@@ -148,7 +148,7 @@ public function compile(TemplateCompiler $templateCompiler)
static::class,
var_export($then, true),
static::class,
- var_export($else, true)
+ var_export($else, true),
);
return [
@@ -157,8 +157,8 @@ public function compile(TemplateCompiler $templateCompiler)
'%s(%s::gatherContext($renderingContext, %s[1]), $renderingContext)',
$functionName,
static::class,
- $matchesVariable
- )
+ $matchesVariable,
+ ),
];
}
}
diff --git a/src/Core/Parser/SyntaxTree/ObjectAccessorNode.php b/src/Core/Parser/SyntaxTree/ObjectAccessorNode.php
index 81f6c2e17..066601950 100644
--- a/src/Core/Parser/SyntaxTree/ObjectAccessorNode.php
+++ b/src/Core/Parser/SyntaxTree/ObjectAccessorNode.php
@@ -92,8 +92,8 @@ public function convert(TemplateCompiler $templateCompiler): array
'initialization' => '',
'execution' => sprintf(
'$renderingContext->getVariableProvider()->getByPath(\'%s\')',
- $path
- )
+ $path,
+ ),
];
}
}
diff --git a/src/Core/Parser/SyntaxTree/RootNode.php b/src/Core/Parser/SyntaxTree/RootNode.php
index 6bb53350b..9c81fa972 100644
--- a/src/Core/Parser/SyntaxTree/RootNode.php
+++ b/src/Core/Parser/SyntaxTree/RootNode.php
@@ -38,7 +38,7 @@ public function convert(TemplateCompiler $templateCompiler): array
case 0:
return [
'initialization' => '',
- 'execution' => 'NULL'
+ 'execution' => 'NULL',
];
case 1:
$childNode = current($this->getChildNodes());
@@ -59,7 +59,7 @@ public function convert(TemplateCompiler $templateCompiler): array
return [
'initialization' => $initializationPhpCode,
- 'execution' => $outputVariableName
+ 'execution' => $outputVariableName,
];
}
}
diff --git a/src/Core/Parser/TemplateParser.php b/src/Core/Parser/TemplateParser.php
index 68b904cfe..9e03989ff 100644
--- a/src/Core/Parser/TemplateParser.php
+++ b/src/Core/Parser/TemplateParser.php
@@ -169,10 +169,10 @@ public function createParsingRelatedExceptionWithContext(\Exception $error, $tem
$character,
$error->getMessage(),
$error->getCode(),
- $templateCode
+ $templateCode,
),
$error->getCode(),
- $error
+ $error,
);
}
@@ -213,7 +213,7 @@ protected function parseTemplateSource($templateIdentifier, $templateSourceClosu
{
$parsedTemplate = $this->parse(
$templateSourceClosure($this, $this->renderingContext->getTemplatePaths()),
- $templateIdentifier
+ $templateIdentifier,
);
$parsedTemplate->setIdentifier($templateIdentifier);
$this->parsedTemplates[$templateIdentifier] = $parsedTemplate;
@@ -289,26 +289,26 @@ protected function buildObjectTree(array $splitTemplate, $context)
$matchedVariables['MethodIdentifier'],
$matchedVariables['Attributes'],
($matchedVariables['Selfclosing'] === '' ? false : true),
- $templateElement
+ $templateElement,
)) {
continue;
}
} catch (\TYPO3Fluid\Fluid\Core\ViewHelper\Exception $error) {
$this->textHandler(
$state,
- $this->renderingContext->getErrorHandler()->handleViewHelperError($error)
+ $this->renderingContext->getErrorHandler()->handleViewHelperError($error),
);
} catch (Exception $error) {
$this->textHandler(
$state,
- $this->renderingContext->getErrorHandler()->handleParserError($error)
+ $this->renderingContext->getErrorHandler()->handleParserError($error),
);
}
} elseif (preg_match(Patterns::$SCAN_PATTERN_TEMPLATE_CLOSINGVIEWHELPERTAG, $templateElement, $matchedVariables) > 0) {
if ($this->closingViewHelperTagHandler(
$state,
$matchedVariables['NamespaceIdentifier'],
- $matchedVariables['MethodIdentifier']
+ $matchedVariables['MethodIdentifier'],
)) {
continue;
}
@@ -319,7 +319,7 @@ protected function buildObjectTree(array $splitTemplate, $context)
if ($state->countNodeStack() !== 1) {
throw new Exception(
'Not all tags were closed!',
- 1238169398
+ 1238169398,
);
}
return $state;
@@ -352,7 +352,7 @@ protected function openingViewHelperTagHandler(ParsingState $state, $namespaceId
$state,
$namespaceIdentifier,
$methodIdentifier,
- $this->parseArguments($arguments, $viewHelper)
+ $this->parseArguments($arguments, $viewHelper),
);
if ($viewHelperNode && $selfclosing === true) {
@@ -390,7 +390,7 @@ protected function initializeViewHelperAndAddItToStack(ParsingState $state, $nam
$this->renderingContext,
$namespaceIdentifier,
$methodIdentifier,
- $argumentsObjectTree
+ $argumentsObjectTree,
);
$this->callInterceptor($currentViewHelperNode, InterceptorInterface::INTERCEPT_OPENING_VIEWHELPER, $state);
@@ -401,12 +401,12 @@ protected function initializeViewHelperAndAddItToStack(ParsingState $state, $nam
} catch (\TYPO3Fluid\Fluid\Core\ViewHelper\Exception $error) {
$this->textHandler(
$state,
- $this->renderingContext->getErrorHandler()->handleViewHelperError($error)
+ $this->renderingContext->getErrorHandler()->handleViewHelperError($error),
);
} catch (Exception $error) {
$this->textHandler(
$state,
- $this->renderingContext->getErrorHandler()->handleParserError($error)
+ $this->renderingContext->getErrorHandler()->handleParserError($error),
);
}
return null;
@@ -440,7 +440,7 @@ protected function closingViewHelperTagHandler(ParsingState $state, $namespaceId
throw new Exception(
'Templating tags not properly nested. Expected: ' . $expectedViewHelperClassName . '; Actual: ' .
$actualViewHelperClassName,
- 1224485398
+ 1224485398,
);
}
$this->callInterceptor($lastStackElement, InterceptorInterface::INTERCEPT_CLOSING_VIEWHELPER, $state);
@@ -494,7 +494,7 @@ protected function objectAccessorHandler(ParsingState $state, $objectAccessorStr
$state,
$singleMatch['NamespaceIdentifier'],
$singleMatch['MethodIdentifier'],
- $arguments
+ $arguments,
);
if ($viewHelperNode) {
$numberOfViewHelpers++;
@@ -668,7 +668,7 @@ protected function textAndShorthandSyntaxHandler(ParsingState $state, $text, $co
$matchedVariables['Object'],
$matchedVariables['Delimiter'],
(isset($matchedVariables['ViewHelper']) ? $matchedVariables['ViewHelper'] : ''),
- (isset($matchedVariables['AdditionalViewHelpers']) ? $matchedVariables['AdditionalViewHelpers'] : '')
+ (isset($matchedVariables['AdditionalViewHelpers']) ? $matchedVariables['AdditionalViewHelpers'] : ''),
);
} elseif ($context === self::CONTEXT_INSIDE_VIEWHELPER_ARGUMENTS
&& preg_match(Patterns::$SCAN_PATTERN_SHORTHANDSYNTAX_ARRAYS, $section, $matchedVariables) > 0
@@ -708,7 +708,7 @@ protected function textAndShorthandSyntaxHandler(ParsingState $state, $text, $co
} catch (ExpressionException $error) {
$this->textHandler(
$state,
- $this->renderingContext->getErrorHandler()->handleExpressionError($error)
+ $this->renderingContext->getErrorHandler()->handleExpressionError($error),
);
}
}
diff --git a/src/Core/Parser/TemplateProcessor/EscapingModifierTemplateProcessor.php b/src/Core/Parser/TemplateProcessor/EscapingModifierTemplateProcessor.php
index 042699f93..c769ec02d 100644
--- a/src/Core/Parser/TemplateProcessor/EscapingModifierTemplateProcessor.php
+++ b/src/Core/Parser/TemplateProcessor/EscapingModifierTemplateProcessor.php
@@ -50,7 +50,7 @@ public function preProcessSource($templateSource)
if (count($matches) > 1) {
throw new Exception(
'There is more than one escaping modifier defined. There can only be one {escapingEnabled=...} per template.',
- 1407331080
+ 1407331080,
);
}
if ($matches === []) {
diff --git a/src/Core/Rendering/RenderingContext.php b/src/Core/Rendering/RenderingContext.php
index 2a2a2093d..0639035df 100644
--- a/src/Core/Rendering/RenderingContext.php
+++ b/src/Core/Rendering/RenderingContext.php
@@ -136,8 +136,8 @@ public function __construct()
[
new EscapingModifierTemplateProcessor(),
new PassthroughSourceModifierTemplateProcessor(),
- new NamespaceDetectionTemplateProcessor()
- ]
+ new NamespaceDetectionTemplateProcessor(),
+ ],
);
$this->setViewHelperResolver(new ViewHelperResolver());
$this->setViewHelperInvoker(new ViewHelperInvoker());
diff --git a/src/Core/ViewHelper/AbstractConditionViewHelper.php b/src/Core/ViewHelper/AbstractConditionViewHelper.php
index 9a055f4a0..3ff2f53dc 100644
--- a/src/Core/ViewHelper/AbstractConditionViewHelper.php
+++ b/src/Core/ViewHelper/AbstractConditionViewHelper.php
@@ -232,7 +232,7 @@ final public function convert(TemplateCompiler $templateCompiler): array
$argumentInitializationCode .= sprintf(
'\'%s\' => %s,' . chr(10),
$argumentName,
- is_array($defaultValue) && empty($defaultValue) ? '[]' : var_export($defaultValue, true)
+ is_array($defaultValue) && empty($defaultValue) ? '[]' : var_export($defaultValue, true),
);
} elseif ($arguments[$argumentName] instanceof NodeInterface) {
// Argument *is* given to VH and is a node, resolve
@@ -241,7 +241,7 @@ final public function convert(TemplateCompiler $templateCompiler): array
$argumentInitializationCode .= sprintf(
'\'%s\' => %s,' . chr(10),
$argumentName,
- $converted['execution']
+ $converted['execution'],
);
} else {
// Argument *is* given to VH and is a simple type.
@@ -249,7 +249,7 @@ final public function convert(TemplateCompiler $templateCompiler): array
$argumentInitializationCode .= sprintf(
'\'%s\' => %s,' . chr(10),
$argumentName,
- $arguments[$argumentName]
+ $arguments[$argumentName],
);
}
}
@@ -267,7 +267,7 @@ final public function convert(TemplateCompiler $templateCompiler): array
$thenChildEncountered = true;
$argumentInitializationCode .= sprintf(
'\'__then\' => %s,' . chr(10),
- $templateCompiler->wrapChildNodesInClosure($childNode)
+ $templateCompiler->wrapChildNodesInClosure($childNode),
);
continue;
}
@@ -282,7 +282,7 @@ final public function convert(TemplateCompiler $templateCompiler): array
' ],' . chr(10),
$elseIfCounter,
$templateCompiler->wrapViewHelperNodeArgumentEvaluationInClosure($childNode, 'if'),
- $templateCompiler->wrapChildNodesInClosure($childNode)
+ $templateCompiler->wrapChildNodesInClosure($childNode),
);
$elseIfCounter++;
continue;
@@ -293,7 +293,7 @@ final public function convert(TemplateCompiler $templateCompiler): array
$elseChildEncountered = true;
$argumentInitializationCode .= sprintf(
'\'__else\' => %s,' . chr(10),
- $templateCompiler->wrapChildNodesInClosure($childNode)
+ $templateCompiler->wrapChildNodesInClosure($childNode),
);
}
}
@@ -304,7 +304,7 @@ final public function convert(TemplateCompiler $templateCompiler): array
// then the entire body is considered the "then" child.
$argumentInitializationCode .= sprintf(
'\'__then\' => %s,' . chr(10),
- $templateCompiler->wrapChildNodesInClosure($node)
+ $templateCompiler->wrapChildNodesInClosure($node),
);
}
@@ -322,7 +322,7 @@ final public function convert(TemplateCompiler $templateCompiler): array
'%s::renderStatic(%s, static fn() => \'\', $renderingContext)' . chr(10),
get_class($this),
$argumentsVariableName,
- )
+ ),
];
}
}
diff --git a/src/Core/ViewHelper/AbstractViewHelper.php b/src/Core/ViewHelper/AbstractViewHelper.php
index 54b9fc2f3..c7057c63a 100644
--- a/src/Core/ViewHelper/AbstractViewHelper.php
+++ b/src/Core/ViewHelper/AbstractViewHelper.php
@@ -165,7 +165,7 @@ protected function registerArgument($name, $type, $description, $required = fals
if (array_key_exists($name, $this->argumentDefinitions)) {
throw new Exception(
'Argument "' . $name . '" has already been defined, thus it should not be defined again.',
- 1253036401
+ 1253036401,
);
}
$this->argumentDefinitions[$name] = new ArgumentDefinition($name, $type, $description, $required, $defaultValue, $escape);
@@ -192,7 +192,7 @@ protected function overrideArgument($name, $type, $description, $required = fals
if (!array_key_exists($name, $this->argumentDefinitions)) {
throw new Exception(
'Argument "' . $name . '" has not been defined, thus it can\'t be overridden.',
- 1279212461
+ 1279212461,
);
}
$this->argumentDefinitions[$name] = new ArgumentDefinition($name, $type, $description, $required, $defaultValue, $escape);
@@ -265,8 +265,8 @@ protected function callRenderMethod()
'ViewHelper class "%s" does not declare a "render()" method and inherits the default "renderStatic". ' .
'Executing this ViewHelper would cause infinite recursion - please either implement "render()" or ' .
'"renderStatic()" on your ViewHelper class',
- get_class($this)
- )
+ get_class($this),
+ ),
);
}
@@ -346,7 +346,7 @@ public function validateArguments()
throw new \InvalidArgumentException(
'The argument "' . $argumentName . '" was registered with type "' . $type . '", but is of type "' .
$givenType . '" in view helper "' . get_class($this) . '".',
- 1256475113
+ 1256475113,
);
}
}
@@ -463,8 +463,8 @@ public function validateAdditionalArguments(array $arguments)
'Undeclared arguments passed to ViewHelper %s: %s. Valid arguments are: %s',
get_class($this),
implode(', ', array_keys($arguments)),
- implode(', ', array_keys($this->argumentDefinitions))
- )
+ implode(', ', array_keys($this->argumentDefinitions)),
+ ),
);
}
}
@@ -487,7 +487,7 @@ public function compile($argumentsName, $closureName, &$initializationPhpCode, V
'%s::renderStatic(%s, %s, $renderingContext)',
get_class($this),
$argumentsName,
- $closureName
+ $closureName,
);
}
@@ -541,7 +541,7 @@ public function convert(TemplateCompiler $templateCompiler): array
$renderChildrenClosureVariableName,
$viewHelperInitializationPhpCode,
$this->viewHelperNode,
- $templateCompiler
+ $templateCompiler,
);
$accumulatedArgumentInitializationCode = '';
@@ -556,7 +556,7 @@ public function convert(TemplateCompiler $templateCompiler): array
$argumentInitializationCode .= sprintf(
'\'%s\' => %s,' . chr(10),
$argumentName,
- is_array($defaultValue) && empty($defaultValue) ? '[]' : var_export($defaultValue, true)
+ is_array($defaultValue) && empty($defaultValue) ? '[]' : var_export($defaultValue, true),
);
} else {
// Argument *is* given to VH, resolve
@@ -569,13 +569,13 @@ public function convert(TemplateCompiler $templateCompiler): array
$argumentInitializationCode .= sprintf(
'\'%s\' => %s,' . chr(10),
$argumentName,
- $converted['execution']
+ $converted['execution'],
);
} else {
$argumentInitializationCode .= sprintf(
'\'%s\' => %s,' . chr(10),
$argumentName,
- $argumentValue
+ $argumentValue,
);
}
}
@@ -587,7 +587,7 @@ public function convert(TemplateCompiler $templateCompiler): array
$initializationPhpCode .= sprintf(
'%s = %s;' . chr(10),
$renderChildrenClosureVariableName,
- $templateCompiler->wrapChildNodesInClosure($this->viewHelperNode)
+ $templateCompiler->wrapChildNodesInClosure($this->viewHelperNode),
);
$initializationPhpCode .= $accumulatedArgumentInitializationCode . chr(10) . $argumentInitializationCode . $viewHelperInitializationPhpCode;
@@ -599,7 +599,7 @@ public function convert(TemplateCompiler $templateCompiler): array
'initialization' => $initializationPhpCode,
// @todo: compile() *should* return strings, but it's not enforced in the interface.
// The string cast is here to stay compatible in case something still returns for instance null.
- 'execution' => (string)$convertedViewHelperExecutionCode === '' ? "''" : $convertedViewHelperExecutionCode
+ 'execution' => (string)$convertedViewHelperExecutionCode === '' ? "''" : $convertedViewHelperExecutionCode,
];
}
}
diff --git a/src/Core/ViewHelper/TagBuilder.php b/src/Core/ViewHelper/TagBuilder.php
index 943ab430d..b6f63d799 100644
--- a/src/Core/ViewHelper/TagBuilder.php
+++ b/src/Core/ViewHelper/TagBuilder.php
@@ -197,7 +197,7 @@ public function addAttribute($attributeName, $attributeValue, $escapeSpecialChar
if (!in_array($attributeName, ['data', 'aria'], true)) {
throw new \InvalidArgumentException(
sprintf('Value of tag attribute "%s" cannot be of type array.', $attributeName),
- 1709565127
+ 1709565127,
);
}
diff --git a/src/Core/ViewHelper/Traits/CompileWithContentArgumentAndRenderStatic.php b/src/Core/ViewHelper/Traits/CompileWithContentArgumentAndRenderStatic.php
index 2adc3604d..9eb5bd7ee 100644
--- a/src/Core/ViewHelper/Traits/CompileWithContentArgumentAndRenderStatic.php
+++ b/src/Core/ViewHelper/Traits/CompileWithContentArgumentAndRenderStatic.php
@@ -72,7 +72,7 @@ public function render()
return static::renderStatic(
$this->arguments,
$this->buildRenderChildrenClosure(),
- $this->renderingContext
+ $this->renderingContext,
);
}
@@ -89,13 +89,13 @@ public function compile(
$closureName,
&$initializationPhpCode,
ViewHelperNode $node,
- TemplateCompiler $compiler
+ TemplateCompiler $compiler,
) {
$execution = sprintf(
'%s::renderStatic(%s, %s, $renderingContext)',
static::class,
$argumentsName,
- $closureName
+ $closureName,
);
$contentArgumentName = $this->resolveContentArgumentName();
@@ -107,7 +107,7 @@ public function compile(
$argumentsName,
$argumentsName,
$contentArgumentName,
- $closureName
+ $closureName,
);
return $execution;
}
@@ -152,7 +152,7 @@ public function resolveContentArgumentName()
}
throw new Exception(
sprintf('Attempting to compile %s failed. Chosen compile method requires that ViewHelper has ' .
- 'at least one registered and optional argument', __CLASS__)
+ 'at least one registered and optional argument', __CLASS__),
);
}
return $this->contentArgumentName;
diff --git a/src/Core/ViewHelper/Traits/CompileWithRenderStatic.php b/src/Core/ViewHelper/Traits/CompileWithRenderStatic.php
index 87e6eb4f9..7123f649b 100644
--- a/src/Core/ViewHelper/Traits/CompileWithRenderStatic.php
+++ b/src/Core/ViewHelper/Traits/CompileWithRenderStatic.php
@@ -31,7 +31,7 @@ public function render()
return static::renderStatic(
$this->arguments,
$this->buildRenderChildrenClosure(),
- $this->renderingContext
+ $this->renderingContext,
);
}
@@ -53,13 +53,13 @@ public function compile(
$closureName,
&$initializationPhpCode,
ViewHelperNode $node,
- TemplateCompiler $compiler
+ TemplateCompiler $compiler,
) {
return sprintf(
'%s::renderStatic(%s, %s, $renderingContext)',
static::class,
$argumentsName,
- $closureName
+ $closureName,
);
}
}
diff --git a/src/Core/ViewHelper/ViewHelperResolver.php b/src/Core/ViewHelper/ViewHelperResolver.php
index bdd52b452..eb4e440cb 100644
--- a/src/Core/ViewHelper/ViewHelperResolver.php
+++ b/src/Core/ViewHelper/ViewHelperResolver.php
@@ -35,7 +35,7 @@ class ViewHelperResolver
* @var array
*/
protected $namespaces = [
- 'f' => ['TYPO3Fluid\\Fluid\\ViewHelpers']
+ 'f' => ['TYPO3Fluid\\Fluid\\ViewHelpers'],
];
/**
@@ -250,7 +250,7 @@ public function resolveViewHelperClassName($namespaceIdentifier, $methodIdentifi
'Based on your spelling, the system would load the class "%s", however this class does not exist.',
$namespaceIdentifier,
$methodIdentifier,
- $resolvedViewHelperClassName
+ $resolvedViewHelperClassName,
), 1407060572);
}
$this->resolvedViewHelperClassNames[$namespaceIdentifier][$methodIdentifier] = $actualViewHelperClassName;
diff --git a/src/Core/ViewHelper/ViewHelperVariableContainer.php b/src/Core/ViewHelper/ViewHelperVariableContainer.php
index bd0f49bb9..a45d7ac86 100644
--- a/src/Core/ViewHelper/ViewHelperVariableContainer.php
+++ b/src/Core/ViewHelper/ViewHelperVariableContainer.php
@@ -57,12 +57,12 @@ public function addAll($viewHelperName, $variables)
throw new \InvalidArgumentException(
'Invalid argument type for $variables in ViewHelperVariableContainer->addAll(). Expects array/Traversable ' .
'but received ' . (is_object($variables) ? get_class($variables) : gettype($variables)),
- 1501425195
+ 1501425195,
);
}
$this->objects[$viewHelperName] = array_replace_recursive(
isset($this->objects[$viewHelperName]) ? $this->objects[$viewHelperName] : [],
- $variables instanceof \Traversable ? iterator_to_array($variables) : $variables
+ $variables instanceof \Traversable ? iterator_to_array($variables) : $variables,
);
}
diff --git a/src/Tools/ConsoleRunner.php b/src/Tools/ConsoleRunner.php
index 35d152c09..40442908b 100644
--- a/src/Tools/ConsoleRunner.php
+++ b/src/Tools/ConsoleRunner.php
@@ -54,7 +54,7 @@ class ConsoleRunner
self::ARGUMENT_TEMPLATEROOTPATHS => 'Template root paths, multiple paths can be passed separated by spaces',
self::ARGUMENT_PARTIALROOTPATHS => 'Partial root paths, multiple paths can be passed separated by spaces',
self::ARGUMENT_LAYOUTROOTPATHS => 'Layout root paths, multiple paths can be passed separated by spaces',
- self::ARGUMENT_RENDERINGCONTEXT => 'Class name of custom RenderingContext implementation to use when rendering'
+ self::ARGUMENT_RENDERINGCONTEXT => 'Class name of custom RenderingContext implementation to use when rendering',
];
/**
@@ -79,7 +79,7 @@ public function handleCommand(array $arguments)
call_user_func(explode('::', $arguments[self::ARGUMENT_BOOTSTRAP]));
} else {
throw new \InvalidArgumentException(
- 'Provided bootstrap argument is neither a file nor an executable, public, static function!'
+ 'Provided bootstrap argument is neither a file nor an executable, public, static function!',
);
}
}
@@ -150,18 +150,18 @@ protected function renderWarmupResult(FluidCacheWarmupResult $result)
"%s\n Compiled? %s\n Has Layout? %s\n",
$templatePathAndFilename,
$aspects[FluidCacheWarmupResult::RESULT_COMPILABLE] ? 'YES' : 'NO',
- $aspects[FluidCacheWarmupResult::RESULT_HASLAYOUT] ? 'YES' : 'NO'
+ $aspects[FluidCacheWarmupResult::RESULT_HASLAYOUT] ? 'YES' : 'NO',
);
if (isset($aspects[FluidCacheWarmupResult::RESULT_COMPILABLE])) {
$string .= sprintf(
" Compiled as: %s\n",
- $aspects[FluidCacheWarmupResult::RESULT_COMPILEDCLASS]
+ $aspects[FluidCacheWarmupResult::RESULT_COMPILEDCLASS],
);
}
if (isset($aspects[FluidCacheWarmupResult::RESULT_FAILURE])) {
$string .= sprintf(
" Compilation failure reason: %s\n",
- $aspects[FluidCacheWarmupResult::RESULT_FAILURE]
+ $aspects[FluidCacheWarmupResult::RESULT_FAILURE],
);
}
if (isset($aspects[FluidCacheWarmupResult::RESULT_MITIGATIONS])) {
@@ -261,7 +261,7 @@ protected function parseTemplatePathAndFilenameFromScgiHeaders($input)
protected function createErrorResponse($response, $code)
{
$headers = [
- 'HTTP/1.1 ' . $code . ' ' . $response
+ 'HTTP/1.1 ' . $code . ' ' . $response,
];
return implode("\n", $headers) . "\n\n" . $response;
}
@@ -278,7 +278,7 @@ protected function createResponse($response)
'Connection:keep-alive',
'Content-Type:text/html;charset=utf-8',
'Content-Length:' . strlen($response),
- 'Pragma:no-cache'
+ 'Pragma:no-cache',
];
return implode("\n", $headers) . "\n\n" . $response;
}
diff --git a/src/View/AbstractTemplateView.php b/src/View/AbstractTemplateView.php
index d2c211dbb..82f812b7c 100644
--- a/src/View/AbstractTemplateView.php
+++ b/src/View/AbstractTemplateView.php
@@ -190,7 +190,7 @@ public function render($actionName = null)
$templatePaths->getLayoutIdentifier($layoutName),
function ($parent, TemplatePaths $paths) use ($layoutName) {
return $paths->getLayoutSource($layoutName);
- }
+ },
);
} catch (PassthroughSourceException $error) {
return $error->getSource();
@@ -250,7 +250,7 @@ public function renderSection($sectionName, array $variables = [], $ignoreUnknow
return '';
}
return $renderingContext->getErrorHandler()->handleViewError(
- new InvalidSectionException('Section "' . $sectionName . '" does not exist.')
+ new InvalidSectionException('Section "' . $sectionName . '" does not exist.'),
);
}
$this->startRendering($renderingTypeOnNextLevel, $parsedTemplate, $renderingContext);
@@ -263,7 +263,7 @@ public function renderSection($sectionName, array $variables = [], $ignoreUnknow
return '';
}
return $renderingContext->getErrorHandler()->handleViewError(
- new InvalidSectionException('Section "' . $sectionName . '" does not exist.')
+ new InvalidSectionException('Section "' . $sectionName . '" does not exist.'),
);
}
/** @var ViewHelperNode $section */
@@ -272,7 +272,7 @@ public function renderSection($sectionName, array $variables = [], $ignoreUnknow
$renderingContext->getViewHelperVariableContainer()->add(
SectionViewHelper::class,
'isCurrentlyRenderingSection',
- true
+ true,
);
$this->startRendering($renderingTypeOnNextLevel, $parsedTemplate, $renderingContext);
@@ -301,7 +301,7 @@ public function renderPartial($partialName, $sectionName = null, array $variable
$templatePaths->getPartialIdentifier($partialName),
function ($parent, TemplatePaths $paths) use ($partialName) {
return $paths->getPartialSource($partialName);
- }
+ },
);
} catch (PassthroughSourceException $error) {
return $error->getSource();
@@ -383,7 +383,7 @@ protected function getCurrentParsedTemplate()
$templatePaths->getTemplateIdentifier($controllerName, $actionName),
function ($parent, TemplatePaths $paths) use ($controllerName, $actionName) {
return $paths->getTemplateSource($controllerName, $actionName);
- }
+ },
);
if ($parsedTemplate->isCompiled()) {
$parsedTemplate->addCompiledNamespaces($this->baseRenderingContext);
diff --git a/src/View/TemplatePaths.php b/src/View/TemplatePaths.php
index 768a76748..ead6ee67b 100644
--- a/src/View/TemplatePaths.php
+++ b/src/View/TemplatePaths.php
@@ -59,7 +59,7 @@ class TemplatePaths
protected $resolvedIdentifiers = [
self::NAME_TEMPLATES => [],
self::NAME_LAYOUTS => [],
- self::NAME_PARTIALS => []
+ self::NAME_PARTIALS => [],
];
/**
@@ -70,7 +70,7 @@ class TemplatePaths
protected $resolvedFiles = [
self::NAME_TEMPLATES => [],
self::NAME_LAYOUTS => [],
- self::NAME_PARTIALS => []
+ self::NAME_PARTIALS => [],
];
/**
@@ -128,7 +128,7 @@ public function toArray()
return [
self::CONFIG_TEMPLATEROOTPATHS => $this->sanitizePaths($this->getTemplateRootPaths()),
self::CONFIG_LAYOUTROOTPATHS => $this->sanitizePaths($this->getLayoutRootPaths()),
- self::CONFIG_PARTIALROOTPATHS => $this->sanitizePaths($this->getPartialRootPaths())
+ self::CONFIG_PARTIALROOTPATHS => $this->sanitizePaths($this->getPartialRootPaths()),
];
}
@@ -488,7 +488,7 @@ protected function extractPathArrays(array $paths)
$pathParts = [
self::CONFIG_TEMPLATEROOTPATHS,
self::CONFIG_LAYOUTROOTPATHS,
- self::CONFIG_PARTIALROOTPATHS
+ self::CONFIG_PARTIALROOTPATHS,
];
$pathCollections = [];
foreach ($pathParts as $pathPart) {
@@ -600,9 +600,9 @@ public function getTemplateSource($controller = 'Default', $action = 'Default')
$action,
$format,
$templateReference === null ? $controller . '/' . ucfirst($action) . '.' . $format : $templateReference,
- count($this->getTemplateRootPaths()) ? 'The following paths were checked: ' . implode(', ', $this->getTemplateRootPaths()) : 'No paths configured.'
+ count($this->getTemplateRootPaths()) ? 'The following paths were checked: ' . implode(', ', $this->getTemplateRootPaths()) : 'No paths configured.',
),
- 1257246929
+ 1257246929,
);
}
return file_get_contents($templateReference);
@@ -727,7 +727,7 @@ protected function resolveFileInPaths(array $paths, $relativePathAndFilename, $f
}
throw new InvalidTemplateResourceException(
'The Fluid template files "' . implode('", "', $tried) . '" could not be loaded.',
- 1225709595
+ 1225709595,
);
}
@@ -742,7 +742,7 @@ protected function clearResolvedIdentifiersAndTemplates($type = null)
$this->resolvedIdentifiers = $this->resolvedFiles = [
self::NAME_TEMPLATES => [],
self::NAME_LAYOUTS => [],
- self::NAME_PARTIALS => []
+ self::NAME_PARTIALS => [],
];
}
}
diff --git a/src/ViewHelpers/Cache/WarmupViewHelper.php b/src/ViewHelpers/Cache/WarmupViewHelper.php
index fb35c7ac4..0f930475a 100644
--- a/src/ViewHelpers/Cache/WarmupViewHelper.php
+++ b/src/ViewHelpers/Cache/WarmupViewHelper.php
@@ -80,7 +80,7 @@ public function initializeArguments()
'array',
'Array of variables to assign ONLY when compiling. See main class documentation.',
false,
- []
+ [],
);
}
@@ -103,7 +103,7 @@ public function render()
}
$originalVariableProvider = static::overlayVariablesIfNotSet(
$this->renderingContext,
- $this->arguments['variables']
+ $this->arguments['variables'],
);
$content = $this->renderChildren();
$this->renderingContext->setVariableProvider($originalVariableProvider);
@@ -143,7 +143,7 @@ protected static function overlayVariablesIfNotSet(RenderingContextInterface $re
$currentProvider = $renderingContext->getVariableProvider();
$chainedVariableProvider = new ChainedVariableProvider([
$currentProvider,
- new StandardVariableProvider($variables)
+ new StandardVariableProvider($variables),
]);
$renderingContext->setVariableProvider($chainedVariableProvider);
return $currentProvider;
diff --git a/src/ViewHelpers/CountViewHelper.php b/src/ViewHelpers/CountViewHelper.php
index a79bc69c8..9721cadf9 100644
--- a/src/ViewHelpers/CountViewHelper.php
+++ b/src/ViewHelpers/CountViewHelper.php
@@ -78,8 +78,8 @@ public static function renderStatic(array $arguments, \Closure $renderChildrenCl
throw new ViewHelper\Exception(
sprintf(
'Subject given to f:count() is not countable (type: %s)',
- is_object($countable) ? get_class($countable) : gettype($countable)
- )
+ is_object($countable) ? get_class($countable) : gettype($countable),
+ ),
);
}
return count($countable);
diff --git a/src/ViewHelpers/DebugViewHelper.php b/src/ViewHelpers/DebugViewHelper.php
index 1ccdadda1..aff03d190 100644
--- a/src/ViewHelpers/DebugViewHelper.php
+++ b/src/ViewHelpers/DebugViewHelper.php
@@ -110,7 +110,7 @@ protected static function dumpVariable($variable, $html, $level, $levels)
'%s"%s": %s',
str_repeat(' ', $level),
$property,
- static::dumpVariable($value, $html, $level + 1, $levels)
+ static::dumpVariable($value, $html, $level + 1, $levels),
);
}
}
@@ -120,7 +120,7 @@ protected static function dumpVariable($variable, $html, $level, $levels)
$string = sprintf(
'%s = %s
',
$typeLabel,
- htmlspecialchars(var_export($variable, true), ENT_COMPAT, 'UTF-8', false)
+ htmlspecialchars(var_export($variable, true), ENT_COMPAT, 'UTF-8', false),
);
} else {
$string = sprintf('%s
', $typeLabel);
@@ -132,7 +132,7 @@ protected static function dumpVariable($variable, $html, $level, $levels)
$string .= sprintf(
'
NULL = NULL
'
+ 'NULL = NULL
',
];
yield 'null' => [
'NULL = NULL
'
+ 'NULL = NULL
',
];
yield 'string' => [
'string = 'test'
"
+ "string = 'test'
",
];
yield 'html string' => [
'string = 'test<strong>bold</strong>'
"
+ "string = 'test<strong>bold</strong>'
",
];
yield 'array nested html string' => [
@@ -69,7 +69,7 @@ public static function renderDataProvider(): \Generator
],
],
'array: ' . PHP_EOL .
- ' "nested": string \'testbold\'' . PHP_EOL
+ ' "nested": string \'testbold\'' . PHP_EOL,
];
yield 'array nested html string html' => [
'array
string = 'test<strong>bold</strong>'
array
string = 'test<strong>bold</strong>'
array
string = \'test\'
array
string = \'test\'
ArrayIterator
string = \'bar\'
ArrayIterator
string = \'bar\'
ArrayObject
string = \'bar\'
ArrayObject
string = \'bar\'
TYPO3Fluid\Fluid\Tests\Functional\Fixtures\Various\UserWithoutToString
string = \'username\'
TYPO3Fluid\Fluid\Tests\Functional\Fixtures\Various\UserWithoutToString
string = \'username\'
string = \'DateTime\'
string = \'2016-07-12T13:08:35+00:00\'
integer = 1468328915
integer = 0
boolean = true
string = \'php://memory\'