| @@ -5,7 +5,6 @@ | ||
| 5 | 5 | use TYPO3Fluid\Fluid\Core\Compiler\ViewHelperCompiler; | 
| 6 | 6 | use TYPO3Fluid\Fluid\Core\Exception; | 
| 7 | 7 | use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\ViewHelperNode; | 
| 8 | -use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; | |
| 9 | 8 | |
| 10 | 9 | /** | 
| 11 | 10 | * Class CompilableWithContentArgumentAndRenderStatic | 
| @@ -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 | } | 
| @@ -395,7 +395,7 @@ | ||
| 395 | 395 | * Sanitize a path, ensuring it is absolute and | 
| 396 | 396 | * if a directory, suffixed by a trailing slash. | 
| 397 | 397 | * | 
| 398 | - * @param string|array $path | |
| 398 | + * @param string $path | |
| 399 | 399 | * @return string | 
| 400 | 400 | */ | 
| 401 | 401 | protected function sanitizePath($path) | 
| @@ -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 | } | 
| @@ -6,8 +6,6 @@ | ||
| 6 | 6 | * See LICENSE.txt that was shipped with this package. | 
| 7 | 7 | */ | 
| 8 | 8 | |
| 9 | -use TYPO3Fluid\Fluid\Core\Compiler\TemplateCompiler; | |
| 10 | -use TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\ViewHelperNode; | |
| 11 | 9 | use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; | 
| 12 | 10 | use TYPO3Fluid\Fluid\Core\ViewHelper; | 
| 13 | 11 | use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper; | 
| @@ -13,7 +13,6 @@ | ||
| 13 | 13 | use TYPO3Fluid\Fluid\Core\Rendering\RenderingContext; | 
| 14 | 14 | use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface; | 
| 15 | 15 | use TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperResolver; | 
| 16 | -use TYPO3Fluid\Fluid\View\Exception\InvalidTemplateResourceException; | |
| 17 | 16 | use TYPO3Fluid\Fluid\ViewHelpers\SectionViewHelper; | 
| 18 | 17 | use TYPO3Fluid\Fluid\View\Exception\InvalidSectionException; | 
| 19 | 18 | |
| @@ -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 | ); | 
| @@ -176,7 +176,7 @@ | ||
| 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 | |
| @@ -99,7 +99,7 @@ discard block | ||
| 99 | 99 | * @param array $arguments | 
| 100 | 100 | * @param \Closure $renderChildrenClosure | 
| 101 | 101 | * @param RenderingContextInterface $renderingContext | 
| 102 | - * @return mixed | |
| 102 | + * @return string | |
| 103 | 103 | */ | 
| 104 | 104 | public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) | 
| 105 | 105 |      { | 
| @@ -137,7 +137,7 @@ discard block | ||
| 137 | 137 | * | 
| 138 | 138 | * @param array $elements The array / traversable object to be grouped | 
| 139 | 139 | * @param string $groupBy Group by this property | 
| 140 | -     * @return array The grouped array in the form array('keys' => array('key1' => [key1value], 'key2' => [key2value], ...), 'values' => array('key1' => array([key1value] => [element1]), ...), ...) | |
| 140 | +     * @return string The grouped array in the form array('keys' => array('key1' => [key1value], 'key2' => [key2value], ...), 'values' => array('key1' => array([key1value] => [element1]), ...), ...) | |
| 141 | 141 | * @throws ViewHelper\Exception | 
| 142 | 142 | */ | 
| 143 | 143 | protected static function groupElements(array $elements, $groupBy) | 
| @@ -670,7 +670,7 @@ | ||
| 670 | 670 |                  if (!empty($singleMatch['VariableIdentifier'])) { | 
| 671 | 671 | $arrayToBuild[$arrayKey] = new ObjectAccessorNode($singleMatch['VariableIdentifier']); | 
| 672 | 672 |                  } elseif (array_key_exists('Number', $singleMatch) && (!empty($singleMatch['Number']) || $singleMatch['Number'] === '0')) { | 
| 673 | - $arrayToBuild[$arrayKey] = (float)$singleMatch['Number']; | |
| 673 | + $arrayToBuild[$arrayKey] = (float) $singleMatch['Number']; | |
| 674 | 674 |                  } elseif ((array_key_exists('QuotedString', $singleMatch) && !empty($singleMatch['QuotedString']))) { | 
| 675 | 675 | $argumentString = $this->unquoteString($singleMatch['QuotedString']); | 
| 676 | 676 | $arrayToBuild[$arrayKey] = $this->buildArgumentObjectTree($argumentString); | 
| @@ -454,9 +454,9 @@ | ||
| 454 | 454 | return $x; | 
| 455 | 455 | } | 
| 456 | 456 |              if (strpos($x, '.') !== false) { | 
| 457 | - return (float)$x; | |
| 457 | + return (float) $x; | |
| 458 | 458 |              } else { | 
| 459 | - return (int)$x; | |
| 459 | + return (int) $x; | |
| 460 | 460 | } | 
| 461 | 461 | } | 
| 462 | 462 | |