@@ -39,7 +39,7 @@ |
||
39 | 39 | if ($path === 'random') { |
40 | 40 | return 'random' . sha1(rand(0, 999999999)); |
41 | 41 | } elseif ($path === 'incrementer') { |
42 | - return ++ $this->incrementer; |
|
42 | + return ++$this->incrementer; |
|
43 | 43 | } else { |
44 | 44 | return parent::getByPath($path); |
45 | 45 | } |
@@ -91,12 +91,12 @@ |
||
91 | 91 | $argumentName = $this->resolveContentArgumentName(); |
92 | 92 | $arguments = $this->arguments; |
93 | 93 | if (!empty($argumentName) && isset($arguments[$argumentName])) { |
94 | - $renderChildrenClosure = function () use ($arguments, $argumentName) { |
|
94 | + $renderChildrenClosure = function() use ($arguments, $argumentName) { |
|
95 | 95 | return $arguments[$argumentName]; |
96 | 96 | }; |
97 | 97 | } else { |
98 | 98 | $self = clone $this; |
99 | - $renderChildrenClosure = function () use ($self) { |
|
99 | + $renderChildrenClosure = function() use ($self) { |
|
100 | 100 | return $self->renderChildren(); |
101 | 101 | }; |
102 | 102 | } |
@@ -292,7 +292,7 @@ |
||
292 | 292 | try { |
293 | 293 | $parsedPartial = $renderingContext->getTemplateParser()->getOrParseAndStoreTemplate( |
294 | 294 | $templatePaths->getPartialIdentifier($partialName), |
295 | - function ($parent, TemplatePaths $paths) use ($partialName) { |
|
295 | + function($parent, TemplatePaths $paths) use ($partialName) { |
|
296 | 296 | return $paths->getPartialSource($partialName); |
297 | 297 | } |
298 | 298 | ); |
@@ -436,9 +436,9 @@ |
||
436 | 436 | return $x; |
437 | 437 | } |
438 | 438 | if (mb_strpos($x, '.') !== false) { |
439 | - return (float)$x; |
|
439 | + return (float) $x; |
|
440 | 440 | } else { |
441 | - return (int)$x; |
|
441 | + return (int) $x; |
|
442 | 442 | } |
443 | 443 | } |
444 | 444 |
@@ -89,6 +89,6 @@ |
||
89 | 89 | */ |
90 | 90 | public static function verdict(array $arguments, RenderingContextInterface $renderingContext) |
91 | 91 | { |
92 | - return (bool)$arguments['condition']; |
|
92 | + return (bool) $arguments['condition']; |
|
93 | 93 | } |
94 | 94 | } |
@@ -120,7 +120,7 @@ |
||
120 | 120 | */ |
121 | 121 | protected static function evaluateCondition($arguments = null) |
122 | 122 | { |
123 | - return isset($arguments['condition']) && (bool)($arguments['condition']); |
|
123 | + return isset($arguments['condition']) && (bool) ($arguments['condition']); |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | /** |
@@ -325,7 +325,7 @@ |
||
325 | 325 | $namespaces = (array) $this->namespaces[$namespaceIdentifier]; |
326 | 326 | |
327 | 327 | do { |
328 | - $name = rtrim((string)array_pop($namespaces), '\\') . '\\' . $className; |
|
328 | + $name = rtrim((string) array_pop($namespaces), '\\') . '\\' . $className; |
|
329 | 329 | } while (!class_exists($name) && count($namespaces)); |
330 | 330 | |
331 | 331 | return $name; |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | { |
177 | 177 | $this->ignoreEmptyAttributes = $ignoreEmptyAttributes; |
178 | 178 | if ($ignoreEmptyAttributes) { |
179 | - $this->attributes = array_filter($this->attributes, function ($item) { return trim((string) $item) !== ''; }); |
|
179 | + $this->attributes = array_filter($this->attributes, function($item) { return trim((string) $item) !== ''; }); |
|
180 | 180 | } |
181 | 181 | } |
182 | 182 | |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | return; |
206 | 206 | } |
207 | 207 | if ($escapeSpecialCharacters) { |
208 | - $attributeValue = htmlspecialchars((string)$attributeValue); |
|
208 | + $attributeValue = htmlspecialchars((string) $attributeValue); |
|
209 | 209 | } |
210 | 210 | $this->attributes[$attributeName] = $attributeValue; |
211 | 211 | } |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | return $this->templateSource = stream_get_contents($this->templateSource); |
594 | 594 | } |
595 | 595 | $templateReference = $this->resolveTemplateFileForControllerAndActionAndFormat($controller, $action); |
596 | - if (!file_exists((string)$templateReference) && $templateReference !== 'php://stdin') { |
|
596 | + if (!file_exists((string) $templateReference) && $templateReference !== 'php://stdin') { |
|
597 | 597 | $format = $this->getFormat(); |
598 | 598 | throw new InvalidTemplateResourceException( |
599 | 599 | sprintf( |
@@ -622,7 +622,7 @@ discard block |
||
622 | 622 | */ |
623 | 623 | protected function createIdentifierForFile($pathAndFilename, $prefix) |
624 | 624 | { |
625 | - $pathAndFilename = (string)$pathAndFilename; |
|
625 | + $pathAndFilename = (string) $pathAndFilename; |
|
626 | 626 | $templateModifiedTimestamp = $pathAndFilename !== 'php://stdin' && file_exists($pathAndFilename) ? filemtime($pathAndFilename) : 0; |
627 | 627 | return sprintf('%s_%s', $prefix, sha1($pathAndFilename . '|' . $templateModifiedTimestamp)); |
628 | 628 | } |