diff --git a/typo3/sysext/fluid/Classes/Compatibility/DocbookGeneratorService.php b/typo3/sysext/fluid/Classes/Compatibility/DocbookGeneratorService.php index 53adb9043d90d2bc5f6ef6ebb6127c1fcd78c2b6..8eba3757cd048692f99cec7c90db848e5fbf7c2b 100644 --- a/typo3/sysext/fluid/Classes/Compatibility/DocbookGeneratorService.php +++ b/typo3/sysext/fluid/Classes/Compatibility/DocbookGeneratorService.php @@ -57,7 +57,7 @@ class DocbookGeneratorService extends \TYPO3\CMS\Fluid\Service\DocbookGenerator private function recursiveClassNameSearch($namespace, $directory, &$classNames) { $dh = opendir($directory); while (($file = readdir($dh)) !== FALSE) { - if (($file == '.' || $file == '..') || $file == '.svn') { + if ($file == '.' || $file == '..' || $file == '.svn') { continue; } if (is_file($directory . $file)) { @@ -66,7 +66,7 @@ class DocbookGeneratorService extends \TYPO3\CMS\Fluid\Service\DocbookGenerator } $classNames[] = $namespace . substr($file, 0, -4); } elseif (is_dir($directory . $file)) { - $this->recursiveClassNameSearch(($namespace . $file) . '_', ($directory . $file) . '/', $classNames); + $this->recursiveClassNameSearch($namespace . $file . '_', $directory . $file . '/', $classNames); } } closedir($dh); diff --git a/typo3/sysext/fluid/Classes/Core/Compiler/TemplateCompiler.php b/typo3/sysext/fluid/Classes/Core/Compiler/TemplateCompiler.php index 44fba96093f587e9ef7afde42dae23b9f40caaf3..32500ba86e01cb05ef9d8a80b50a2039d7193de7 100644 --- a/typo3/sysext/fluid/Classes/Core/Compiler/TemplateCompiler.php +++ b/typo3/sysext/fluid/Classes/Core/Compiler/TemplateCompiler.php @@ -80,7 +80,7 @@ class TemplateCompiler implements \TYPO3\CMS\Core\SingletonInterface { } $generatedRenderFunctions .= $this->generateCodeForSection($this->convertListOfSubNodes($parsingState->getRootNode()), 'render', 'Main Render function'); $convertedLayoutNameNode = $parsingState->hasLayout() ? $this->convert($parsingState->getLayoutNameNode()) : array('initialization' => '', 'execution' => 'NULL'); - $classDefinition = ('class FluidCache_' . $identifier) . ' extends TYPO3\\CMS\\Fluid\\Core\\Compiler\\AbstractCompiledTemplate'; + $classDefinition = 'class FluidCache_' . $identifier . ' extends TYPO3\\CMS\\Fluid\\Core\\Compiler\\AbstractCompiledTemplate'; $templateCode = '%s { public function getVariableContainer() { @@ -159,7 +159,7 @@ return %s; protected function convertTextNode(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode $node) { return array( 'initialization' => '', - 'execution' => ('\'' . $this->escapeTextForUseInSingleQuotes($node->getText())) . '\'' + 'execution' => '\'' . $this->escapeTextForUseInSingleQuotes($node->getText()) . '\'' ); } @@ -172,7 +172,7 @@ return %s; * @see convert() */ protected function convertViewHelperNode(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode $node) { - $initializationPhpCode = ('// Rendering ViewHelper ' . $node->getViewHelperClassName()) . chr(10); + $initializationPhpCode = '// Rendering ViewHelper ' . $node->getViewHelperClassName() . chr(10); // Build up $arguments array $argumentsVariableName = $this->variableName('arguments'); $initializationPhpCode .= sprintf('%s = array();', $argumentsVariableName) . chr(10); @@ -209,7 +209,7 @@ return %s; $initializationPhpCode .= sprintf('%s->setArguments(%s);', $viewHelperVariableName, $argumentsVariableName) . chr(10); $initializationPhpCode .= sprintf('%s->setRenderingContext($renderingContext);', $viewHelperVariableName) . chr(10); $initializationPhpCode .= sprintf('%s->setRenderChildrenClosure(%s);', $viewHelperVariableName, $renderChildrenClosureVariableName) . chr(10); - $initializationPhpCode .= ('// End of ViewHelper ' . $node->getViewHelperClassName()) . chr(10); + $initializationPhpCode .= '// End of ViewHelper ' . $node->getViewHelperClassName() . chr(10); return array( 'initialization' => $initializationPhpCode, 'execution' => sprintf('%s->initializeArgumentsAndRender()', $viewHelperVariableName) @@ -297,7 +297,7 @@ return %s; $convertedLeftSide = $this->convert($node->getLeftSide()); $convertedRightSide = $this->convert($node->getRightSide()); return array( - 'initialization' => ($initializationPhpCode . $convertedLeftSide['initialization']) . $convertedRightSide['initialization'], + 'initialization' => $initializationPhpCode . $convertedLeftSide['initialization'] . $convertedRightSide['initialization'], 'execution' => sprintf('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\BooleanNode::evaluateComparator(\'%s\', %s, %s)', $node->getComparator(), $convertedLeftSide['execution'], $convertedRightSide['execution']) ); } else { @@ -339,7 +339,7 @@ return %s; * @return string */ public function variableName($prefix) { - return ('$' . $prefix) . $this->variableCounter++; + return '$' . $prefix . $this->variableCounter++; } } diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/AbstractNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/AbstractNode.php index 717d065e22abc731c96c9577dc0ec866b3d19077..68e41563889cea31340bf7c651ef1d96be555bce 100644 --- a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/AbstractNode.php +++ b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/AbstractNode.php @@ -36,7 +36,7 @@ abstract class AbstractNode implements \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\N } else { if (is_object($output)) { if (!method_exists($output, '__toString')) { - throw new \TYPO3\CMS\Fluid\Core\Parser\Exception(('Cannot cast object of type "' . get_class($output)) . '" to string.', 1248356140); + throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Cannot cast object of type "' . get_class($output) . '" to string.', 1248356140); } $output = $output->__toString(); } else { @@ -45,7 +45,7 @@ abstract class AbstractNode implements \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\N $subNodeOutput = $subNode->evaluate($renderingContext); if (is_object($subNodeOutput)) { if (!method_exists($subNodeOutput, '__toString')) { - throw new \TYPO3\CMS\Fluid\Core\Parser\Exception(('Cannot cast object of type "' . get_class($subNodeOutput)) . '" to string.', 1273753083); + throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Cannot cast object of type "' . get_class($subNodeOutput) . '" to string.', 1273753083); } $output .= $subNodeOutput->__toString(); } else { diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/BooleanNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/BooleanNode.php index ab0dfa58020c33facb3fc8183578d332d2b2e842..1524e70948a68255b30762710f42970069b4abc5 100644 --- a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/BooleanNode.php +++ b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/BooleanNode.php @@ -230,7 +230,7 @@ class BooleanNode extends \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode { } return $evaluatedLeftSide <= $evaluatedRightSide; default: - throw new \TYPO3\CMS\Fluid\Core\Parser\Exception(('Comparator "' . $comparator) . '" is not implemented.', 1244234398); + throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Comparator "' . $comparator . '" is not implemented.', 1244234398); } } @@ -252,7 +252,7 @@ class BooleanNode extends \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode { if (is_object($evaluatedLeftSide) && is_object($evaluatedRightSide)) { return TRUE; } - if (((is_string($evaluatedLeftSide) || is_resource($evaluatedLeftSide)) || is_numeric($evaluatedLeftSide)) && ((is_string($evaluatedRightSide) || is_resource($evaluatedRightSide)) || is_numeric($evaluatedRightSide))) { + if ((is_string($evaluatedLeftSide) || is_resource($evaluatedLeftSide) || is_numeric($evaluatedLeftSide)) && (is_string($evaluatedRightSide) || is_resource($evaluatedRightSide) || is_numeric($evaluatedRightSide))) { return TRUE; } if (is_array($evaluatedLeftSide) && is_array($evaluatedRightSide)) { diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ObjectAccessorNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ObjectAccessorNode.php index b9c8f66eaea5a4c57ee63b1b37087859749e1e45..d637bdcb810ea4d0913b703845993b96688e88a7 100644 --- a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ObjectAccessorNode.php +++ b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ObjectAccessorNode.php @@ -80,7 +80,7 @@ class ObjectAccessorNode extends \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\Abstrac foreach ($propertyPathSegments as $pathSegment) { $propertyExists = FALSE; $propertyValue = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getPropertyInternal($subject, $pathSegment, FALSE, $propertyExists); - if (($propertyExists !== TRUE && (is_array($subject) || $subject instanceof \ArrayAccess)) && isset($subject[$pathSegment])) { + if ($propertyExists !== TRUE && (is_array($subject) || $subject instanceof \ArrayAccess) && isset($subject[$pathSegment])) { $subject = $subject[$pathSegment]; } else { $subject = $propertyValue; diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/TextNode.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/TextNode.php index c387dab864f12c4c557006ac3aade62742c1ea94..4dc5ee4315f45cada677240c567d38cf1cc8eaa3 100644 --- a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/TextNode.php +++ b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/TextNode.php @@ -29,7 +29,7 @@ class TextNode extends \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode { */ public function __construct($text) { if (!is_string($text)) { - throw new \TYPO3\CMS\Fluid\Core\Parser\Exception(('Text node requires an argument of type string, "' . gettype($text)) . '" given.'); + throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Text node requires an argument of type string, "' . gettype($text) . '" given.'); } $this->text = $text; } diff --git a/typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php b/typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php index faa12f498b0f6daace079b0e0797ffb524eb1899..596cd0946fbf884f8ed1b63e602930e538324bce 100644 --- a/typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php +++ b/typo3/sysext/fluid/Classes/Core/Parser/TemplateParser.php @@ -288,7 +288,7 @@ class TemplateParser { */ public function parse($templateString) { if (!is_string($templateString)) { - throw new \TYPO3\CMS\Fluid\Core\Parser\Exception(('Parse requires a template string as argument, ' . gettype($templateString)) . ' given.', 1224237899); + throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Parse requires a template string as argument, ' . gettype($templateString) . ' given.', 1224237899); } $this->reset(); $templateString = $this->extractNamespaceDefinitions($templateString); @@ -335,7 +335,7 @@ class TemplateParser { $namespaceIdentifier = $matchedVariables[1][$index]; $fullyQualifiedNamespace = $matchedVariables[2][$index]; if (key_exists($namespaceIdentifier, $this->namespaces)) { - throw new \TYPO3\CMS\Fluid\Core\Parser\Exception(('Namespace identifier "' . $namespaceIdentifier) . '" is already registered. Do not redeclare namespaces!', 1224241246); + throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Namespace identifier "' . $namespaceIdentifier . '" is already registered. Do not redeclare namespaces!', 1224241246); } $this->namespaces[$namespaceIdentifier] = $fullyQualifiedNamespace; } @@ -455,7 +455,7 @@ class TemplateParser { } foreach (array_keys($actualArguments) as $argumentName) { if (!in_array($argumentName, $expectedArgumentNames)) { - throw new \TYPO3\CMS\Fluid\Core\Parser\Exception(('Argument "' . $argumentName) . '" was not registered.', 1237823695); + throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Argument "' . $argumentName . '" was not registered.', 1237823695); } } } @@ -471,7 +471,7 @@ class TemplateParser { $actualArgumentNames = array_keys($actualArguments); foreach ($expectedArguments as $expectedArgument) { if ($expectedArgument->isRequired() && !in_array($expectedArgument->getName(), $actualArgumentNames)) { - throw new \TYPO3\CMS\Fluid\Core\Parser\Exception(('Required argument "' . $expectedArgument->getName()) . '" was not supplied.', 1237823699); + throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Required argument "' . $expectedArgument->getName() . '" was not supplied.', 1237823699); } } } @@ -507,7 +507,7 @@ class TemplateParser { $className = ucfirst($explodedViewHelperName[0]); } $className .= 'ViewHelper'; - $name = ($this->namespaces[$namespaceIdentifier] . $namespaceSeperator) . $className; + $name = $this->namespaces[$namespaceIdentifier] . $namespaceSeperator . $className; return $name; } @@ -529,7 +529,7 @@ class TemplateParser { throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('You closed a templating tag which you never opened!', 1224485838); } if ($lastStackElement->getViewHelperClassName() != $this->resolveViewHelperName($namespaceIdentifier, $methodIdentifier)) { - throw new \TYPO3\CMS\Fluid\Core\Parser\Exception((('Templating tags not properly nested. Expected: ' . $lastStackElement->getViewHelperClassName()) . '; Actual: ') . $this->resolveViewHelperName($namespaceIdentifier, $methodIdentifier), 1224485398); + throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('Templating tags not properly nested. Expected: ' . $lastStackElement->getViewHelperClassName() . '; Actual: ' . $this->resolveViewHelperName($namespaceIdentifier, $methodIdentifier), 1224485398); } $this->callInterceptor($lastStackElement, \TYPO3\CMS\Fluid\Core\Parser\InterceptorInterface::INTERCEPT_CLOSING_VIEWHELPER, $state); } @@ -764,7 +764,7 @@ class TemplateParser { } elseif (array_key_exists('Subarray', $singleMatch) && !empty($singleMatch['Subarray'])) { $arrayToBuild[$arrayKey] = $this->objectManager->create('TYPO3\\CMS\\Fluid\\Core\\Parser\\SyntaxTree\\ArrayNode', $this->recursiveArrayHandler($singleMatch['Subarray'])); } else { - throw new \TYPO3\CMS\Fluid\Core\Parser\Exception(('This exception should never be thrown, as the array value has to be of some type (Value given: "' . var_export($singleMatch, TRUE)) . '"). Please post your template to the bugtracker at forge.typo3.org.', 1225136013); + throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('This exception should never be thrown, as the array value has to be of some type (Value given: "' . var_export($singleMatch, TRUE) . '"). Please post your template to the bugtracker at forge.typo3.org.', 1225136013); } } return $arrayToBuild; diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractViewHelper.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractViewHelper.php index dffa43067c56f7315ec3c8e583b03036b4730aa0..576d2e139c33a5459152e1f2d8d6d0bb4d8706f4 100644 --- a/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractViewHelper.php +++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/AbstractViewHelper.php @@ -164,7 +164,7 @@ abstract class AbstractViewHelper { */ protected function registerArgument($name, $type, $description, $required = FALSE, $defaultValue = NULL) { if (array_key_exists($name, $this->argumentDefinitions)) { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception(('Argument "' . $name) . '" has already been defined, thus it should not be defined again.', 1253036401); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('Argument "' . $name . '" has already been defined, thus it should not be defined again.', 1253036401); } $this->argumentDefinitions[$name] = new \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition($name, $type, $description, $required, $defaultValue); return $this; @@ -185,7 +185,7 @@ abstract class AbstractViewHelper { */ protected function overrideArgument($name, $type, $description, $required = FALSE, $defaultValue = NULL) { if (!array_key_exists($name, $this->argumentDefinitions)) { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception(('Argument "' . $name) . '" has not been defined, thus it can\'t be overridden.', 1279212461); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('Argument "' . $name . '" has not been defined, thus it can\'t be overridden.', 1279212461); } $this->argumentDefinitions[$name] = new \TYPO3\CMS\Fluid\Core\ViewHelper\ArgumentDefinition($name, $type, $description, $required, $defaultValue); return $this; @@ -334,7 +334,7 @@ abstract class AbstractViewHelper { $dataType = 'array'; } if ($dataType === NULL) { - throw new \TYPO3\CMS\Fluid\Core\Parser\Exception(((('could not determine type of argument "' . $parameterName) . '" of the render-method in ViewHelper "') . get_class($this)) . '". Either the methods docComment is invalid or some PHP optimizer strips off comments.', 1242292003); + throw new \TYPO3\CMS\Fluid\Core\Parser\Exception('could not determine type of argument "' . $parameterName . '" of the render-method in ViewHelper "' . get_class($this) . '". Either the methods docComment is invalid or some PHP optimizer strips off comments.', 1242292003); } $description = ''; if (\TYPO3\CMS\Fluid\Fluid::$debugMode && isset($paramAnnotations[$i])) { @@ -369,19 +369,19 @@ abstract class AbstractViewHelper { continue; } if ($type === 'array') { - if ((!is_array($this->arguments[$argumentName]) && !$this->arguments[$argumentName] instanceof \ArrayAccess) && !$this->arguments[$argumentName] instanceof \Traversable) { - throw new \InvalidArgumentException(((((('The argument "' . $argumentName) . '" was registered with type "array", but is of type "') . gettype($this->arguments[$argumentName])) . '" in view helper "') . get_class($this)) . '"', 1237900529); + if (!is_array($this->arguments[$argumentName]) && !$this->arguments[$argumentName] instanceof \ArrayAccess && !$this->arguments[$argumentName] instanceof \Traversable) { + throw new \InvalidArgumentException('The argument "' . $argumentName . '" was registered with type "array", but is of type "' . gettype($this->arguments[$argumentName]) . '" in view helper "' . get_class($this) . '"', 1237900529); } } elseif ($type === 'boolean') { if (!is_bool($this->arguments[$argumentName])) { - throw new \InvalidArgumentException(((((('The argument "' . $argumentName) . '" was registered with type "boolean", but is of type "') . gettype($this->arguments[$argumentName])) . '" in view helper "') . get_class($this)) . '".', 1240227732); + throw new \InvalidArgumentException('The argument "' . $argumentName . '" was registered with type "boolean", but is of type "' . gettype($this->arguments[$argumentName]) . '" in view helper "' . get_class($this) . '".', 1240227732); } } elseif (class_exists($type, FALSE)) { if (!$this->arguments[$argumentName] instanceof $type) { if (is_object($this->arguments[$argumentName])) { - throw new \InvalidArgumentException(((((((('The argument "' . $argumentName) . '" was registered with type "') . $type) . '", but is of type "') . get_class($this->arguments[$argumentName])) . '" in view helper "') . get_class($this)) . '".', 1256475114); + throw new \InvalidArgumentException('The argument "' . $argumentName . '" was registered with type "' . $type . '", but is of type "' . get_class($this->arguments[$argumentName]) . '" in view helper "' . get_class($this) . '".', 1256475114); } else { - throw new \InvalidArgumentException(((((((('The argument "' . $argumentName) . '" was registered with type "') . $type) . '", but is of type "') . gettype($this->arguments[$argumentName])) . '" in view helper "') . get_class($this)) . '".', 1256475113); + throw new \InvalidArgumentException('The argument "' . $argumentName . '" was registered with type "' . $type . '", but is of type "' . gettype($this->arguments[$argumentName]) . '" in view helper "' . get_class($this) . '".', 1256475113); } } } diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/Arguments.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/Arguments.php index 06302d6f28e0f24176ae59d8ff3afcf9b627e1dd..1629b99460fa37a8e287b6e8c03ae6610a701137 100644 --- a/typo3/sysext/fluid/Classes/Core/ViewHelper/Arguments.php +++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/Arguments.php @@ -74,7 +74,7 @@ class Arguments implements ArrayAccess { * @param object $value */ public function offsetSet($key, $value) { - throw new \TYPO3\CMS\Fluid\Core\Exception(('Tried to set argument "' . $key) . '", but setting arguments is forbidden.', 1236080693); + throw new \TYPO3\CMS\Fluid\Core\Exception('Tried to set argument "' . $key . '", but setting arguments is forbidden.', 1236080693); } /** @@ -83,7 +83,7 @@ class Arguments implements ArrayAccess { * @param string $key */ public function offsetUnset($key) { - throw new \TYPO3\CMS\Fluid\Core\Exception(('Tried to unset argument "' . $key) . '", but setting arguments is forbidden.', 1236080702); + throw new \TYPO3\CMS\Fluid\Core\Exception('Tried to unset argument "' . $key . '", but setting arguments is forbidden.', 1236080702); } /** diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/TagBasedViewHelper.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/TagBasedViewHelper.php index d3d2b4c277fff02b910afcde65880a96089121f8..156b191ae52420a13bd5563af9f3efdcf74c1fae 100644 --- a/typo3/sysext/fluid/Classes/Core/ViewHelper/TagBasedViewHelper.php +++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/TagBasedViewHelper.php @@ -30,7 +30,7 @@ abstract class TagBasedViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Abstr * Constructor */ public function __construct() { - \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(('the ViewHelper "' . get_class($this)) . '" extends "TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBasedViewHelper". This is deprecated since TYPO3 4.5. Please extend the class "TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractTagBasedViewHelper"'); + \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('the ViewHelper "' . get_class($this) . '" extends "TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\TagBasedViewHelper". This is deprecated since TYPO3 4.5. Please extend the class "TYPO3\\CMS\\Fluid\\Core\\ViewHelper\\AbstractTagBasedViewHelper"'); parent::__construct(); } diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/TagBuilder.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/TagBuilder.php index ba3690fdd58b52f7cec25e3c13525551fafa4032..8e136e0c13625853159464c2758b8e37d27b3965 100644 --- a/typo3/sysext/fluid/Classes/Core/ViewHelper/TagBuilder.php +++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/TagBuilder.php @@ -190,10 +190,10 @@ class TagBuilder { } $output = '<' . $this->tagName; foreach ($this->attributes as $attributeName => $attributeValue) { - $output .= (((' ' . $attributeName) . '="') . $attributeValue) . '"'; + $output .= ' ' . $attributeName . '="' . $attributeValue . '"'; } if ($this->hasContent() || $this->forceClosingTag) { - $output .= ((('>' . $this->content) . '</') . $this->tagName) . '>'; + $output .= '>' . $this->content . '</' . $this->tagName . '>'; } else { $output .= ' />'; } diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/TemplateVariableContainer.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/TemplateVariableContainer.php index 5de01cfb0ea5749445dcb77bea7fb5293919d665..ceadbfe35d2092e4f2ef4b17a55ce7212649db26 100644 --- a/typo3/sysext/fluid/Classes/Core/ViewHelper/TemplateVariableContainer.php +++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/TemplateVariableContainer.php @@ -58,7 +58,7 @@ class TemplateVariableContainer implements \ArrayAccess { throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException('Duplicate variable declarations!', 1224479063); } if (in_array(strtolower($identifier), self::$reservedVariableNames)) { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException(('"' . $identifier) . '" is a reserved variable name and can\'t be used as variable identifier.', 1256730379); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException('"' . $identifier . '" is a reserved variable name and can\'t be used as variable identifier.', 1256730379); } $this->variables[$identifier] = $value; } @@ -75,7 +75,7 @@ class TemplateVariableContainer implements \ArrayAccess { return $this->variables; } if (!array_key_exists($identifier, $this->variables)) { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException(('Tried to get a variable "' . $identifier) . '" which is not stored in the context!', 1224479370); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException('Tried to get a variable "' . $identifier . '" which is not stored in the context!', 1224479370); } return $this->variables[$identifier]; } @@ -89,7 +89,7 @@ class TemplateVariableContainer implements \ArrayAccess { */ public function remove($identifier) { if (!array_key_exists($identifier, $this->variables)) { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException(('Tried to remove a variable "' . $identifier) . '" which is not stored in the context!', 1224479372); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException('Tried to remove a variable "' . $identifier . '" which is not stored in the context!', 1224479372); } unset($this->variables[$identifier]); } diff --git a/typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperVariableContainer.php b/typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperVariableContainer.php index 36f82963a8bf7bc2ee037f0132c9746d7f5564a3..86a19615627de3467e70983bfbca811bb1b274bc 100644 --- a/typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperVariableContainer.php +++ b/typo3/sysext/fluid/Classes/Core/ViewHelper/ViewHelperVariableContainer.php @@ -43,7 +43,7 @@ class ViewHelperVariableContainer { */ public function add($viewHelperName, $key, $value) { if ($this->exists($viewHelperName, $key)) { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException(((('The key "' . $viewHelperName) . '->') . $key) . '" was already stored and you cannot override it.', 1243352010); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException('The key "' . $viewHelperName . '->' . $key . '" was already stored and you cannot override it.', 1243352010); } $this->addOrUpdate($viewHelperName, $key, $value); } @@ -76,7 +76,7 @@ class ViewHelperVariableContainer { */ public function get($viewHelperName, $key) { if (!$this->exists($viewHelperName, $key)) { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException(((('No value found for key "' . $viewHelperName) . '->') . $key) . '"', 1243325768); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException('No value found for key "' . $viewHelperName . '->' . $key . '"', 1243325768); } return $this->objects[$viewHelperName][$key]; } @@ -104,7 +104,7 @@ class ViewHelperVariableContainer { */ public function remove($viewHelperName, $key) { if (!$this->exists($viewHelperName, $key)) { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException(((('No value found for key "' . $viewHelperName) . '->') . $key) . '", thus the key cannot be removed.', 1243352249); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception\InvalidVariableException('No value found for key "' . $viewHelperName . '->' . $key . '", thus the key cannot be removed.', 1243352249); } unset($this->objects[$viewHelperName][$key]); } diff --git a/typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetController.php b/typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetController.php index 5672caacd0f7ce4a0f54981968d5ad4c94e420ba..ac416202cad51c6562d7209a666e12a5e155ee9b 100644 --- a/typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetController.php +++ b/typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetController.php @@ -65,7 +65,7 @@ abstract class AbstractWidgetController extends \TYPO3\CMS\Extbase\Mvc\Controlle protected function setViewConfiguration(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view) { $extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK); $widgetViewHelperClassName = $this->request->getWidgetContext()->getWidgetViewHelperClassName(); - if ((isset($extbaseFrameworkConfiguration['view']['widget'][$widgetViewHelperClassName]['template']) && strlen($extbaseFrameworkConfiguration['view']['widget'][$widgetViewHelperClassName]['template']) > 0) && method_exists($view, 'setTemplateRootPath')) { + if (isset($extbaseFrameworkConfiguration['view']['widget'][$widgetViewHelperClassName]['template']) && strlen($extbaseFrameworkConfiguration['view']['widget'][$widgetViewHelperClassName]['template']) > 0 && method_exists($view, 'setTemplateRootPath')) { $view->setTemplateRootPath(\TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($extbaseFrameworkConfiguration['view']['widget'][$widgetViewHelperClassName]['template'])); } } diff --git a/typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetViewHelper.php b/typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetViewHelper.php index 8a40342618dd2e49589fccb8171cdea368b081e2..0f1fd408495fa23cf703d71544578d9dbeccb10f 100644 --- a/typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetViewHelper.php +++ b/typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetViewHelper.php @@ -157,9 +157,9 @@ abstract class AbstractWidgetViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper protected function initiateSubRequest() { if (!$this->controller instanceof \TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetController) { if (isset($this->controller)) { - throw new \TYPO3\CMS\Fluid\Core\Widget\Exception\MissingControllerException(((('initiateSubRequest() can not be called if there is no valid controller extending TYPO3\\CMS\\Fluid\\Core\\Widget\\AbstractWidgetController. Got "' . get_class($this->controller)) . '" in class "') . get_class($this)) . '".', 1289422564); + throw new \TYPO3\CMS\Fluid\Core\Widget\Exception\MissingControllerException('initiateSubRequest() can not be called if there is no valid controller extending TYPO3\\CMS\\Fluid\\Core\\Widget\\AbstractWidgetController. Got "' . get_class($this->controller) . '" in class "' . get_class($this) . '".', 1289422564); } - throw new \TYPO3\CMS\Fluid\Core\Widget\Exception\MissingControllerException(('initiateSubRequest() can not be called if there is no controller inside $this->controller. Make sure to add a corresponding injectController method to your WidgetViewHelper class "' . get_class($this)) . '".', 1284401632); + throw new \TYPO3\CMS\Fluid\Core\Widget\Exception\MissingControllerException('initiateSubRequest() can not be called if there is no controller inside $this->controller. Make sure to add a corresponding injectController method to your WidgetViewHelper class "' . get_class($this) . '".', 1284401632); } $subRequest = $this->objectManager->create('TYPO3\\CMS\\Fluid\\Core\\Widget\\WidgetRequest'); $subRequest->setWidgetContext($this->widgetContext); diff --git a/typo3/sysext/fluid/Classes/Core/Widget/AjaxWidgetContextHolder.php b/typo3/sysext/fluid/Classes/Core/Widget/AjaxWidgetContextHolder.php index 7ab17e78eec4cfa68036b0773e3c706e2e06b304..84ef9e79da307f0d92eb3a6885ab901ea18199b6 100644 --- a/typo3/sysext/fluid/Classes/Core/Widget/AjaxWidgetContextHolder.php +++ b/typo3/sysext/fluid/Classes/Core/Widget/AjaxWidgetContextHolder.php @@ -71,7 +71,7 @@ class AjaxWidgetContextHolder implements \TYPO3\CMS\Core\SingletonInterface { */ public function get($ajaxWidgetId) { if (!isset($this->widgetContexts[$ajaxWidgetId])) { - throw new \TYPO3\CMS\Fluid\Core\Widget\Exception\WidgetContextNotFoundException(('No widget context was found for the Ajax Widget Identifier "' . $ajaxWidgetId) . '". This only happens if AJAX URIs are called without including the widget on a page.', 1284793775); + throw new \TYPO3\CMS\Fluid\Core\Widget\Exception\WidgetContextNotFoundException('No widget context was found for the Ajax Widget Identifier "' . $ajaxWidgetId . '". This only happens if AJAX URIs are called without including the widget on a page.', 1284793775); } return $this->widgetContexts[$ajaxWidgetId]; } diff --git a/typo3/sysext/fluid/Classes/Core/Widget/WidgetRequest.php b/typo3/sysext/fluid/Classes/Core/Widget/WidgetRequest.php index 4453c227fb796e2f1f398b4c6634c71c4f3d25ee..88b989994c8f968015b74ad22a5122160bf7db20 100644 --- a/typo3/sysext/fluid/Classes/Core/Widget/WidgetRequest.php +++ b/typo3/sysext/fluid/Classes/Core/Widget/WidgetRequest.php @@ -52,7 +52,7 @@ class WidgetRequest extends \TYPO3\CMS\Extbase\Mvc\Web\Request { * @return string */ public function getArgumentPrefix() { - return (($this->widgetContext->getParentPluginNamespace() . '[') . $this->widgetContext->getWidgetIdentifier()) . ']'; + return $this->widgetContext->getParentPluginNamespace() . '[' . $this->widgetContext->getWidgetIdentifier() . ']'; } } diff --git a/typo3/sysext/fluid/Classes/View/StandaloneView.php b/typo3/sysext/fluid/Classes/View/StandaloneView.php index 9e940691487e5c519c2a6a94522ca4d70d1b0b7c..9f5697dcfc57298723ffc10ee2e17dfde8ff73ce 100644 --- a/typo3/sysext/fluid/Classes/View/StandaloneView.php +++ b/typo3/sysext/fluid/Classes/View/StandaloneView.php @@ -262,7 +262,7 @@ class StandaloneView extends \TYPO3\CMS\Fluid\View\AbstractTemplateView { } if ($this->templateSource === NULL) { if (!file_exists($this->templatePathAndFilename)) { - throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException(('Template could not be found at "' . $this->templatePathAndFilename) . '".', 1288087061); + throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException('Template could not be found at "' . $this->templatePathAndFilename . '".', 1288087061); } $this->templateSource = file_get_contents($this->templatePathAndFilename); } @@ -294,7 +294,7 @@ class StandaloneView extends \TYPO3\CMS\Fluid\View\AbstractTemplateView { $layoutPathAndFilename = $this->getLayoutPathAndFilename($layoutName); $layoutSource = file_get_contents($layoutPathAndFilename); if ($layoutSource === FALSE) { - throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException(('"' . $layoutPathAndFilename) . '" is not a valid template resource URI.', 1312215888); + throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException('"' . $layoutPathAndFilename . '" is not a valid template resource URI.', 1312215888); } return $layoutSource; } @@ -314,17 +314,17 @@ class StandaloneView extends \TYPO3\CMS\Fluid\View\AbstractTemplateView { protected function getLayoutPathAndFilename($layoutName = 'Default') { $layoutRootPath = $this->getLayoutRootPath(); if (!is_dir($layoutRootPath)) { - throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException(('Layout root path "' . $layoutRootPath) . '" does not exist.', 1288092521); + throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException('Layout root path "' . $layoutRootPath . '" does not exist.', 1288092521); } $possibleLayoutPaths = array(); - $possibleLayoutPaths[] = \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath(((($layoutRootPath . '/') . $layoutName) . '.') . $this->getRequest()->getFormat()); - $possibleLayoutPaths[] = \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath(($layoutRootPath . '/') . $layoutName); + $possibleLayoutPaths[] = \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath($layoutRootPath . '/' . $layoutName . '.' . $this->getRequest()->getFormat()); + $possibleLayoutPaths[] = \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath($layoutRootPath . '/' . $layoutName); foreach ($possibleLayoutPaths as $layoutPathAndFilename) { if (file_exists($layoutPathAndFilename)) { return $layoutPathAndFilename; } } - throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException(('Could not load layout file. Tried following paths: "' . implode('", "', $possibleLayoutPaths)) . '".', 1288092555); + throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException('Could not load layout file. Tried following paths: "' . implode('", "', $possibleLayoutPaths) . '".', 1288092555); } /** @@ -352,7 +352,7 @@ class StandaloneView extends \TYPO3\CMS\Fluid\View\AbstractTemplateView { $partialPathAndFilename = $this->getPartialPathAndFilename($partialName); $partialSource = file_get_contents($partialPathAndFilename); if ($partialSource === FALSE) { - throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException(('"' . $partialPathAndFilename) . '" is not a valid template resource URI.', 1257246929); + throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException('"' . $partialPathAndFilename . '" is not a valid template resource URI.', 1257246929); } return $partialSource; } @@ -367,17 +367,17 @@ class StandaloneView extends \TYPO3\CMS\Fluid\View\AbstractTemplateView { protected function getPartialPathAndFilename($partialName) { $partialRootPath = $this->getPartialRootPath(); if (!is_dir($partialRootPath)) { - throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException(('Partial root path "' . $partialRootPath) . '" does not exist.', 1288094648); + throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException('Partial root path "' . $partialRootPath . '" does not exist.', 1288094648); } $possiblePartialPaths = array(); - $possiblePartialPaths[] = \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath(((($partialRootPath . '/') . $partialName) . '.') . $this->getRequest()->getFormat()); - $possiblePartialPaths[] = \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath(($partialRootPath . '/') . $partialName); + $possiblePartialPaths[] = \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath($partialRootPath . '/' . $partialName . '.' . $this->getRequest()->getFormat()); + $possiblePartialPaths[] = \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath($partialRootPath . '/' . $partialName); foreach ($possiblePartialPaths as $partialPathAndFilename) { if (file_exists($partialPathAndFilename)) { return $partialPathAndFilename; } } - throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException(('Could not load partial file. Tried following paths: "' . implode('", "', $possiblePartialPaths)) . '".', 1288092555); + throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException('Could not load partial file. Tried following paths: "' . implode('", "', $possiblePartialPaths) . '".', 1288092555); } /** @@ -391,7 +391,7 @@ class StandaloneView extends \TYPO3\CMS\Fluid\View\AbstractTemplateView { */ protected function createIdentifierForFile($pathAndFilename, $prefix) { $templateModifiedTimestamp = filemtime($pathAndFilename); - $templateIdentifier = sprintf('Standalone_%s_%s', $prefix, sha1(($pathAndFilename . '|') . $templateModifiedTimestamp)); + $templateIdentifier = sprintf('Standalone_%s_%s', $prefix, sha1($pathAndFilename . '|' . $templateModifiedTimestamp)); $templateIdentifier = str_replace('/', '_', str_replace('.', '_', $templateIdentifier)); return $templateIdentifier; } diff --git a/typo3/sysext/fluid/Classes/View/TemplateView.php b/typo3/sysext/fluid/Classes/View/TemplateView.php index 1be8746d648a6fcd1cf9736fff3b73939ab7daca..5a04ebf25b1fd0cedcfd847fdff214b45bd25dcc 100644 --- a/typo3/sysext/fluid/Classes/View/TemplateView.php +++ b/typo3/sysext/fluid/Classes/View/TemplateView.php @@ -185,7 +185,7 @@ class TemplateView extends \TYPO3\CMS\Fluid\View\AbstractTemplateView { $templatePathAndFilename = $this->getTemplatePathAndFilename($actionName); $templateSource = file_get_contents($templatePathAndFilename); if ($templateSource === FALSE) { - throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException(('"' . $templatePathAndFilename) . '" is not a valid template resource URI.', 1257246929); + throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException('"' . $templatePathAndFilename . '" is not a valid template resource URI.', 1257246929); } return $templateSource; } @@ -215,15 +215,15 @@ class TemplateView extends \TYPO3\CMS\Fluid\View\AbstractTemplateView { // additional check for deprecated template filename for case insensitive file systems (Windows) $realFileName = basename(realpath($templatePathAndFilename)); if ($realFileName !== ucfirst($realFileName)) { - \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(((('the template filename "' . \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath(realpath($templatePathAndFilename))) . '" is lowercase. This is deprecated since TYPO3 4.4. Please rename the template to "') . basename($templatePathAndFilename)) . '"'); + \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('the template filename "' . \TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath(realpath($templatePathAndFilename)) . '" is lowercase. This is deprecated since TYPO3 4.4. Please rename the template to "' . basename($templatePathAndFilename) . '"'); } return $templatePathAndFilename; } elseif (file_exists($fallbackPath)) { - \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(((('the template filename "' . $fallbackPath) . '" is lowercase. This is deprecated since TYPO3 4.4. Please rename the template to "') . basename($templatePathAndFilename)) . '"'); + \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('the template filename "' . $fallbackPath . '" is lowercase. This is deprecated since TYPO3 4.4. Please rename the template to "' . basename($templatePathAndFilename) . '"'); return $fallbackPath; } } - throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException(('Template could not be loaded. I tried "' . implode('", "', $paths)) . '"', 1225709595); + throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException('Template could not be loaded. I tried "' . implode('", "', $paths) . '"', 1225709595); } /** @@ -255,7 +255,7 @@ class TemplateView extends \TYPO3\CMS\Fluid\View\AbstractTemplateView { $layoutPathAndFilename = $this->getLayoutPathAndFilename($layoutName); $layoutSource = file_get_contents($layoutPathAndFilename); if ($layoutSource === FALSE) { - throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException(('"' . $layoutPathAndFilename) . '" is not a valid template resource URI.', 1257246929); + throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException('"' . $layoutPathAndFilename . '" is not a valid template resource URI.', 1257246929); } return $layoutSource; } @@ -285,11 +285,11 @@ class TemplateView extends \TYPO3\CMS\Fluid\View\AbstractTemplateView { if (file_exists($layoutPathAndFilename)) { return $layoutPathAndFilename; } elseif (file_exists($fallbackPath)) { - \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog(((('the layout filename "' . $fallbackPath) . '" is lowercase. This is deprecated since TYPO3 4.6. Please rename the layout to "') . basename($layoutPathAndFilename)) . '"'); + \TYPO3\CMS\Core\Utility\GeneralUtility::deprecationLog('the layout filename "' . $fallbackPath . '" is lowercase. This is deprecated since TYPO3 4.6. Please rename the layout to "' . basename($layoutPathAndFilename) . '"'); return $fallbackPath; } } - throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException(('The template files "' . implode('", "', $paths)) . '" could not be loaded.', 1225709595); + throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException('The template files "' . implode('", "', $paths) . '" could not be loaded.', 1225709595); } /** @@ -316,7 +316,7 @@ class TemplateView extends \TYPO3\CMS\Fluid\View\AbstractTemplateView { $partialPathAndFilename = $this->getPartialPathAndFilename($partialName); $partialSource = file_get_contents($partialPathAndFilename); if ($partialSource === FALSE) { - throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException(('"' . $partialPathAndFilename) . '" is not a valid template resource URI.', 1257246929); + throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException('"' . $partialPathAndFilename . '" is not a valid template resource URI.', 1257246929); } return $partialSource; } @@ -336,7 +336,7 @@ class TemplateView extends \TYPO3\CMS\Fluid\View\AbstractTemplateView { return $partialPathAndFilename; } } - throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException(('The template files "' . implode('", "', $paths)) . '" could not be loaded.', 1225709595); + throw new \TYPO3\CMS\Fluid\View\Exception\InvalidTemplateResourceException('The template files "' . implode('", "', $paths) . '" could not be loaded.', 1225709595); } /** @@ -473,7 +473,7 @@ class TemplateView extends \TYPO3\CMS\Fluid\View\AbstractTemplateView { } $controllerName = $request->getControllerName(); $templateModifiedTimestamp = filemtime($pathAndFilename); - $templateIdentifier = sprintf('%s_%s_%s_%s', $extensionName, $controllerName, $prefix, sha1(($pathAndFilename . '|') . $templateModifiedTimestamp)); + $templateIdentifier = sprintf('%s_%s_%s_%s', $extensionName, $controllerName, $prefix, sha1($pathAndFilename . '|' . $templateModifiedTimestamp)); return $templateIdentifier; } diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/BaseViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/BaseViewHelper.php index 2cbe1afbc246b445805af6548b244015dcceb1f9..c18465596dd711b0da90f1d0f0a3a43d3851983f 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/BaseViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/BaseViewHelper.php @@ -39,7 +39,7 @@ class BaseViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper * @api */ public function render() { - return ('<base href="' . $this->controllerContext->getRequest()->getBaseUri()) . '" />'; + return '<base href="' . $this->controllerContext->getRequest()->getBaseUri() . '" />'; } } diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/CshViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/CshViewHelper.php index e15bca2cd581071c6e737d577bc51ece33c82354..229a76d31c549cfd594e781441742b4adedd88e1 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/CshViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/CshViewHelper.php @@ -62,7 +62,7 @@ class CshViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewH $table = '_MOD_' . $moduleName; } $cshButton = \TYPO3\CMS\Backend\Utility\BackendUtility::cshItem($table, $field, $GLOBALS['BACK_PATH'], '', $iconOnly, $styleAttributes); - return ('<div class="docheader-csh">' . $cshButton) . '</div>'; + return '<div class="docheader-csh">' . $cshButton . '</div>'; } } diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/IconViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/IconViewHelper.php index e9de120ea1e3b4bf7257ba07af2922d00801bc51..52177d7d31422dde42d765cab514a2f1afae60e4 100755 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/IconViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/IconViewHelper.php @@ -52,7 +52,7 @@ class IconViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendView * @return string the rendered icon link */ public function render($uri, $icon = 'actions-document-close', $title = '') { - return ((('<a href="' . $uri) . '">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon($icon, array('title' => $title))) . '</a>'; + return '<a href="' . $uri . '">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon($icon, array('title' => $title)) . '</a>'; } } diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/ShortcutViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/ShortcutViewHelper.php index bc1fe18c52c431ff94e2231678bef68e10e2f3de..c14cdc8968e87db5adaf8ac5b2e4ca6b8405d14b 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/ShortcutViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Buttons/ShortcutViewHelper.php @@ -60,7 +60,7 @@ class ShortcutViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackend $extensionName = $currentRequest->getControllerExtensionName(); $moduleName = $currentRequest->getPluginName(); if (count($getVars) === 0) { - $modulePrefix = strtolower((('tx_' . $extensionName) . '_') . $moduleName); + $modulePrefix = strtolower('tx_' . $extensionName . '_' . $moduleName); $getVars = array('id', 'M', $modulePrefix); } $getList = implode(',', $getVars); diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/ContainerViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/ContainerViewHelper.php index e56bbd0f5a1e08e0c1139d87bd2f1c5e0d4a0877..7a0c2871a9d3841141d94004ae5c873e406badcf 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/ContainerViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/ContainerViewHelper.php @@ -67,13 +67,13 @@ class ContainerViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBacken $doc = $this->getDocInstance(); $pageRenderer = $doc->getPageRenderer(); if ($enableJumpToUrl) { - $doc->JScode .= (' + $doc->JScode .= ' <script language="javascript" type="text/javascript"> script_ended = 0; function jumpToUrl(URL) { document.location = URL; } - ' . $doc->redirectUrls()) . ' + ' . $doc->redirectUrls() . ' </script> '; } diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuViewHelper.php index 3d1de1eb84345f75b7d7c912dd4675b4cc05444a..59b99e153eba5d0e10404a5b70e732cbbdc7c50f 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/Menus/ActionMenuViewHelper.php @@ -88,7 +88,7 @@ class ActionMenuViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagB } } $this->tag->setContent($options); - return ('<div class="docheader-funcmenu">' . $this->tag->render()) . '</div>'; + return '<div class="docheader-funcmenu">' . $this->tag->render() . '</div>'; } } diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/PageInfoViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/PageInfoViewHelper.php index c86aec25afa32c0b5ebc70e3949b381a7423765a..6fb94145f62acff12667ffa0440aa0d19a1916c1 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/PageInfoViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/PageInfoViewHelper.php @@ -55,7 +55,7 @@ class PageInfoViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackend } else { // On root-level of page tree // Make Icon - $iconImg = ((('<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($this->backPath, 'gfx/i/_icon_website.gif')) . ' alt="') . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'])) . '" />'; + $iconImg = '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($this->backPath, 'gfx/i/_icon_website.gif') . ' alt="' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '" />'; if ($BE_USER->user['admin']) { $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($iconImg, 'pages', 0); } else { @@ -63,7 +63,7 @@ class PageInfoViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackend } } // Setting icon with clickmenu + uid - $pageInfo = (($theIcon . '<em>[pid: ') . $pageRecord['uid']) . ']</em>'; + $pageInfo = $theIcon . '<em>[pid: ' . $pageRecord['uid'] . ']</em>'; return $pageInfo; } diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Be/PagePathViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Be/PagePathViewHelper.php index 96fbfc78239e1ac3ff24a846e7bcbfd4cb99f17e..63915f5ea4ef9ba1e70d467ecc99d9e1e414ef6b 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Be/PagePathViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Be/PagePathViewHelper.php @@ -57,7 +57,7 @@ class PagePathViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackend $cropLength = empty($GLOBALS['BE_USER']->uc['titleLen']) ? 50 : $GLOBALS['BE_USER']->uc['titleLen']; $croppedTitle = \TYPO3\CMS\Core\Utility\GeneralUtility::fixed_lgd_cs($title, -$cropLength); if ($croppedTitle !== $title) { - $pagePath .= ((('<abbr title="' . htmlspecialchars($title)) . '">') . htmlspecialchars($croppedTitle)) . '</abbr>'; + $pagePath .= '<abbr title="' . htmlspecialchars($title) . '">' . htmlspecialchars($croppedTitle) . '</abbr>'; } else { $pagePath .= htmlspecialchars($title); } diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php index 2512cb7ee433d8ddcd8a2fc940a0d5440a3144b0..aa416ca4f60686623a36c6d7b6a1cebc7075bc9b 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php @@ -107,7 +107,7 @@ class CObjectViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHel $setup = $this->typoScriptSetup; foreach ($pathSegments as $segment) { if (!array_key_exists(($segment . '.'), $setup)) { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception(('TypoScript object path "' . htmlspecialchars($typoscriptObjectPath)) . '" does not exist', 1253191023); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('TypoScript object path "' . htmlspecialchars($typoscriptObjectPath) . '" does not exist', 1253191023); } $setup = $setup[$segment . '.']; } diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/CountViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/CountViewHelper.php index 9ebcfecec16bcf0d25f4a5052af255e61959d812..d18bb7be1ae2cd3dc000a365e1c0308e2dad2e56 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/CountViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/CountViewHelper.php @@ -50,7 +50,7 @@ class CountViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelpe $subject = $this->renderChildren(); } if (is_object($subject) && !$subject instanceof \Countable) { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception(('CountViewHelper only supports arrays and objects implementing Countable interface. Given: "' . get_class($subject)) . '"', 1279808078); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('CountViewHelper only supports arrays and objects implementing Countable interface. Given: "' . get_class($subject) . '"', 1279808078); } return count($subject); } diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php index 407742167022959d69151c6c100e143de7eb21de..0189f14dabb1992eb15a579109d3f17ae58115d7 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/FlashMessagesViewHelper.php @@ -118,7 +118,7 @@ class FlashMessagesViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractT case self::RENDER_MODE_DIV: return $this->renderDiv($flashMessages); default: - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception(('Invalid render mode "' . $renderMode) . '" passed to FlashMessageViewhelper', 1290697924); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('Invalid render mode "' . $renderMode . '" passed to FlashMessageViewhelper', 1290697924); } } @@ -135,7 +135,7 @@ class FlashMessagesViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractT } $tagContent = ''; foreach ($flashMessages as $singleFlashMessage) { - $tagContent .= ('<li>' . htmlspecialchars($singleFlashMessage->getMessage())) . '</li>'; + $tagContent .= '<li>' . htmlspecialchars($singleFlashMessage->getMessage()) . '</li>'; } $this->tag->setContent($tagContent); return $this->tag->render(); diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php index c20bec94fd0ef52d7aebe81b9f0deb07bcc0de4d..fe0d5502162ad6714b6b939027b85b50540c9558 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php @@ -81,7 +81,7 @@ abstract class AbstractFormFieldViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\ $propertySegments = explode('.', $this->arguments['property']); $propertyPath = ''; foreach ($propertySegments as $segment) { - $propertyPath .= ('[' . $segment) . ']'; + $propertyPath .= '[' . $segment . ']'; } $name = $formObjectName . $propertyPath; } else { @@ -159,7 +159,7 @@ abstract class AbstractFormFieldViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\ // If Count == 2 -> we need to go through the for-loop exactly once for ($i = 1; $i < count($propertySegments); $i++) { $object = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getPropertyPath($formObject, implode('.', array_slice($propertySegments, 0, $i))); - $objectName .= ('[' . $propertySegments[($i - 1)]) . ']'; + $objectName .= '[' . $propertySegments[($i - 1)] . ']'; $hiddenIdentityField = $this->renderHiddenIdentityField($object, $objectName); // Add the hidden identity field to the ViewHelperVariableContainer $additionalIdentityProperties = $this->viewHelperVariableContainer->get('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'additionalIdentityProperties'); @@ -286,7 +286,7 @@ abstract class AbstractFormFieldViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\ if (!in_array($fieldName, $hiddenFieldNames)) { $hiddenFieldNames[] = $fieldName; $this->viewHelperVariableContainer->addOrUpdate('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'renderedHiddenFields', $hiddenFieldNames); - return ('<input type="hidden" name="' . htmlspecialchars($fieldName)) . '" value="" />'; + return '<input type="hidden" name="' . htmlspecialchars($fieldName) . '" value="" />'; } return ''; } diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormViewHelper.php index 3ffbc86a1893a61ebc417221eeec746d3c3f259b..9f6973c055659e2b9b9be4e2a8116c162c1ca1bb 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormViewHelper.php @@ -51,7 +51,7 @@ abstract class AbstractFormViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\A return $fieldName; } $fieldNameSegments = explode('[', $fieldName, 2); - $fieldName = (($fieldNamePrefix . '[') . $fieldNameSegments[0]) . ']'; + $fieldName = $fieldNamePrefix . '[' . $fieldNameSegments[0] . ']'; if (count($fieldNameSegments) > 1) { $fieldName .= '[' . $fieldNameSegments[1]; } @@ -67,18 +67,18 @@ abstract class AbstractFormViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\A * @see Tx_Fluid_MVC_Controller_Argument::setValue() */ protected function renderHiddenIdentityField($object, $name) { - if ((!is_object($object) || !$object instanceof \TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject) || $object->_isNew() && !$object->_isClone()) { + if (!is_object($object) || !$object instanceof \TYPO3\CMS\Extbase\DomainObject\AbstractDomainObject || $object->_isNew() && !$object->_isClone()) { return ''; } // Intentionally NOT using PersistenceManager::getIdentifierByObject here!! // Using that one breaks re-submission of data in forms in case of an error. $identifier = $object->getUid(); if ($identifier === NULL) { - return (((chr(10) . '<!-- Object of type ') . get_class($object)) . ' is without identity -->') . chr(10); + return chr(10) . '<!-- Object of type ' . get_class($object) . ' is without identity -->' . chr(10); } $name = $this->prefixFieldName($name) . '[__identity]'; $this->registerFieldNameForFormTokenGeneration($name); - return (((((chr(10) . '<input type="hidden" name="') . $name) . '" value="') . $identifier) . '" />') . chr(10); + return chr(10) . '<input type="hidden" name="' . $name . '" value="' . $identifier . '" />' . chr(10); } /** diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/CheckboxViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/CheckboxViewHelper.php index 9f017449b68b9203d2c8239db0ba66ea96a47119..e52988217d31d301375911759ed8a3a0b8f8ac5c 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/CheckboxViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/CheckboxViewHelper.php @@ -80,7 +80,7 @@ class CheckboxViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormF $checked = in_array($valueAttribute, $propertyValue); $nameAttribute .= '[]'; } else { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception(((('Checkbox viewhelpers can only be bound to properties of type boolean or array. Property "' . $this->arguments['property']) . '" is of type "') . (is_object($propertyValue) ? get_class($propertyValue) : gettype($propertyValue))) . '".', 1248261038); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('Checkbox viewhelpers can only be bound to properties of type boolean or array. Property "' . $this->arguments['property'] . '" is of type "' . (is_object($propertyValue) ? get_class($propertyValue) : gettype($propertyValue)) . '".', 1248261038); } } $this->registerFieldNameForFormTokenGeneration($nameAttribute); diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php index 4bd1889493658fdf8a2ea1856c4fa615a3c66cf3..0db302ee5954e39568a9ea14f33bbf2c21e1283c 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/SelectViewHelper.php @@ -152,7 +152,7 @@ class SelectViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFie if (method_exists($key, '__toString')) { $key = (string) $key; } else { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception(('Identifying value for object of class "' . get_class($value)) . '" was an object.', 1247827428); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('Identifying value for object of class "' . get_class($value) . '" was an object.', 1247827428); } } } elseif ($this->persistenceManager->getBackend()->getIdentifierByObject($value) !== NULL) { @@ -160,7 +160,7 @@ class SelectViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFie } elseif (method_exists($value, '__toString')) { $key = (string) $value; } else { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception(('No identifying value for object of class "' . get_class($value)) . '" found.', 1247826696); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('No identifying value for object of class "' . get_class($value) . '" found.', 1247826696); } if ($this->hasArgument('optionLabelField')) { $value = \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getPropertyPath($value, $this->arguments['optionLabelField']); @@ -168,7 +168,7 @@ class SelectViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFie if (method_exists($value, '__toString')) { $value = (string) $value; } else { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception(('Label value for object of class "' . get_class($value)) . '" was an object without a __toString() method.', 1247827553); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('Label value for object of class "' . get_class($value) . '" was an object without a __toString() method.', 1247827553); } } } elseif (method_exists($value, '__toString')) { @@ -254,11 +254,11 @@ class SelectViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFie * @return string the rendered option tag */ protected function renderOptionTag($value, $label, $isSelected) { - $output = ('<option value="' . htmlspecialchars($value)) . '"'; + $output = '<option value="' . htmlspecialchars($value) . '"'; if ($isSelected) { $output .= ' selected="selected"'; } - $output .= ('>' . htmlspecialchars($label)) . '</option>'; + $output .= '>' . htmlspecialchars($label) . '</option>'; return $output; } diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Form/UploadViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Form/UploadViewHelper.php index 4d5f22b1948d77a7b26a98801d77462b4ba4d239..e2103f4548a52b70f2f05fe522c7dfdb75fa0b77 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Form/UploadViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Form/UploadViewHelper.php @@ -65,7 +65,7 @@ class UploadViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFie $name = $this->getName(); $allowedFields = array('name', 'type', 'tmp_name', 'error', 'size'); foreach ($allowedFields as $fieldName) { - $this->registerFieldNameForFormTokenGeneration((($name . '[') . $fieldName) . ']'); + $this->registerFieldNameForFormTokenGeneration($name . '[' . $fieldName . ']'); } $this->tag->addAttribute('type', 'file'); $this->tag->addAttribute('name', $name); diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php index 5425cb7182bbbaad7c2c20d6408cdf3f88a370fd..1788bf9767ad2138929bfb771246e2f6fc939da6 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/FormViewHelper.php @@ -174,7 +174,7 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH $content .= $this->renderHiddenReferrerFields(); $content .= $this->renderRequestHashField(); // Render hmac after everything else has been rendered - $content .= (chr(10) . '</div>') . chr(10); + $content .= chr(10) . '</div>' . chr(10); $content .= $formContent; $this->tag->setContent($content); $this->removeFieldNamePrefixFromViewHelperVariableContainer(); @@ -233,15 +233,15 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH $actionName = $request->getControllerActionName(); $result = chr(10); if ($this->configurationManager->isFeatureEnabled('rewrittenPropertyMapper')) { - $result .= (((('<input type="hidden" name="' . $this->prefixFieldName('__referrer[@extension]')) . '" value="') . $extensionName) . '" />') . chr(10); - $result .= (((('<input type="hidden" name="' . $this->prefixFieldName('__referrer[@controller]')) . '" value="') . $controllerName) . '" />') . chr(10); - $result .= (((('<input type="hidden" name="' . $this->prefixFieldName('__referrer[@action]')) . '" value="') . $actionName) . '" />') . chr(10); - $result .= (((('<input type="hidden" name="' . $this->prefixFieldName('__referrer[arguments]')) . '" value="') . htmlspecialchars($this->hashService->appendHmac(base64_encode(serialize($request->getArguments()))))) . '" />') . chr(10); + $result .= '<input type="hidden" name="' . $this->prefixFieldName('__referrer[@extension]') . '" value="' . $extensionName . '" />' . chr(10); + $result .= '<input type="hidden" name="' . $this->prefixFieldName('__referrer[@controller]') . '" value="' . $controllerName . '" />' . chr(10); + $result .= '<input type="hidden" name="' . $this->prefixFieldName('__referrer[@action]') . '" value="' . $actionName . '" />' . chr(10); + $result .= '<input type="hidden" name="' . $this->prefixFieldName('__referrer[arguments]') . '" value="' . htmlspecialchars($this->hashService->appendHmac(base64_encode(serialize($request->getArguments())))) . '" />' . chr(10); } else { // @deprecated since Extbase 1.4.0, will be removed with Extbase 1.6.0. - $result .= (((('<input type="hidden" name="' . $this->prefixFieldName('__referrer[extensionName]')) . '" value="') . $extensionName) . '" />') . chr(10); - $result .= (((('<input type="hidden" name="' . $this->prefixFieldName('__referrer[controllerName]')) . '" value="') . $controllerName) . '" />') . chr(10); - $result .= (((('<input type="hidden" name="' . $this->prefixFieldName('__referrer[actionName]')) . '" value="') . $actionName) . '" />') . chr(10); + $result .= '<input type="hidden" name="' . $this->prefixFieldName('__referrer[extensionName]') . '" value="' . $extensionName . '" />' . chr(10); + $result .= '<input type="hidden" name="' . $this->prefixFieldName('__referrer[controllerName]') . '" value="' . $controllerName . '" />' . chr(10); + $result .= '<input type="hidden" name="' . $this->prefixFieldName('__referrer[actionName]') . '" value="' . $actionName . '" />' . chr(10); } return $result; } @@ -371,7 +371,7 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH $this->postProcessUriArgumentsForRequesthash($this->formActionUriArguments, $formFieldNames); $requestHash = $this->requestHashService->generateRequestHash($formFieldNames, $this->getFieldNamePrefix()); // in v4, we need to prefix __hmac as well to make it show up in the request object. - return ((('<input type="hidden" name="' . $this->prefixFieldName('__hmac')) . '" value="') . htmlspecialchars($requestHash)) . '" />'; + return '<input type="hidden" name="' . $this->prefixFieldName('__hmac') . '" value="' . htmlspecialchars($requestHash) . '" />'; } /** @@ -383,10 +383,10 @@ class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormViewH } foreach ($arguments as $argumentName => $argumentValue) { if (is_array($argumentValue)) { - $prefix = $level == 0 ? $argumentName : (($currentPrefix . '[') . $argumentName) . ']'; + $prefix = $level == 0 ? $argumentName : $currentPrefix . '[' . $argumentName . ']'; $this->postProcessUriArgumentsForRequestHash($argumentValue, $results, $prefix, $level + 1); } else { - $results[] = $level == 0 ? $argumentName : (($currentPrefix . '[') . $argumentName) . ']'; + $results[] = $level == 0 ? $argumentName : $currentPrefix . '[' . $argumentName . ']'; } } } diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Format/CropViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Format/CropViewHelper.php index 30ef472786ab9ef7e6e9f4c8d8832c11b7156685..16150c97ca485955d1a56c6bf397b09e920ad040 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Format/CropViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Format/CropViewHelper.php @@ -98,9 +98,9 @@ class CropViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper $this->simulateFrontendEnvironment(); } if ($respectHtml) { - $content = $this->contentObject->cropHTML($stringToTruncate, ((($maxCharacters . '|') . $append) . '|') . $respectWordBoundaries); + $content = $this->contentObject->cropHTML($stringToTruncate, $maxCharacters . '|' . $append . '|' . $respectWordBoundaries); } else { - $content = $this->contentObject->crop($stringToTruncate, ((($maxCharacters . '|') . $append) . '|') . $respectWordBoundaries); + $content = $this->contentObject->crop($stringToTruncate, $maxCharacters . '|' . $append . '|' . $respectWordBoundaries); } if (TYPO3_MODE === 'BE') { $this->resetFrontendEnvironment(); diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Format/CurrencyViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Format/CurrencyViewHelper.php index e992770f4eb8f936d0820f43836724dae262223c..f40545ba3dbadfcf63ce7544383c677258c0a24a 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Format/CurrencyViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Format/CurrencyViewHelper.php @@ -61,9 +61,9 @@ class CurrencyViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHe if ($currencySign !== '') { $currencySeparator = $separateCurrency ? ' ' : ''; if ($prependCurrency === TRUE) { - $output = ($currencySign . $currencySeparator) . $output; + $output = $currencySign . $currencySeparator . $output; } else { - $output = ($output . $currencySeparator) . $currencySign; + $output = $output . $currencySeparator . $currencySign; } } return $output; diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Format/DateViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Format/DateViewHelper.php index c018d84d8414e4f30482342955dc621586d9c07e..2283a7125c107b0d2978f731e8dc057f197e9450 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Format/DateViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Format/DateViewHelper.php @@ -91,7 +91,7 @@ class DateViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper try { $date = new \DateTime($date); } catch (\Exception $exception) { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception(('"' . $date) . '" could not be parsed by DateTime constructor.', 1241722579); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('"' . $date . '" could not be parsed by DateTime constructor.', 1241722579); } } return $date->format($format); diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php index 1e3838f575770ccbb08937816e6acb72ac224fd6..ae2e30210608efbd11aa06f1e12e0633092e49b1 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/ImageViewHelper.php @@ -123,7 +123,7 @@ class ImageViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedV $imageInfo = $this->contentObject->getImgResource($src, $setup); $GLOBALS['TSFE']->lastImageInfo = $imageInfo; if (!is_array($imageInfo)) { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception(('Could not get image resource for "' . htmlspecialchars($src)) . '".', 1253191060); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('Could not get image resource for "' . htmlspecialchars($src) . '".', 1253191060); } $imageInfo[3] = \TYPO3\CMS\Core\Utility\GeneralUtility::png_to_gif_by_imagemagick($imageInfo[3]); $GLOBALS['TSFE']->imagesOnPage[] = $imageInfo[3]; diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Link/ExternalViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Link/ExternalViewHelper.php index 604f59ef1f7fc00d3a4d4b587df43748c536e251..8d931026f3ce2b868e22f9ff8531852f9e261ab4 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Link/ExternalViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Link/ExternalViewHelper.php @@ -61,7 +61,7 @@ class ExternalViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBas public function render($uri, $defaultScheme = 'http') { $scheme = parse_url($uri, PHP_URL_SCHEME); if ($scheme === NULL && $defaultScheme !== '') { - $uri = ($defaultScheme . '://') . $uri; + $uri = $defaultScheme . '://' . $uri; } $this->tag->addAttribute('href', $uri); $this->tag->setContent($this->renderChildren()); diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ExternalViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ExternalViewHelper.php index f67442851eb37de2eb6c47f26f9eb145a91318ea..787212539a0c13dbde69bc88029d69d8c45b1ff9 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ExternalViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ExternalViewHelper.php @@ -43,7 +43,7 @@ class ExternalViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHe public function render($uri, $defaultScheme = 'http') { $scheme = parse_url($uri, PHP_URL_SCHEME); if ($scheme === NULL && $defaultScheme !== '') { - $uri = ($defaultScheme . '://') . $uri; + $uri = $defaultScheme . '://' . $uri; } return $uri; } diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ImageViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ImageViewHelper.php index ea7f276ec1149821fa4d32f3409d0e4612f97db8..febf1b5faa91b7c8660d4c2c3719d531586e82b6 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ImageViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ImageViewHelper.php @@ -94,7 +94,7 @@ class ImageViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelpe $imageInfo = $this->contentObject->getImgResource($src, $setup); $GLOBALS['TSFE']->lastImageInfo = $imageInfo; if (!is_array($imageInfo)) { - throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception(('Could not get image resource for "' . htmlspecialchars($src)) . '".', 1277367645); + throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception('Could not get image resource for "' . htmlspecialchars($src) . '".', 1277367645); } $imageInfo[3] = \TYPO3\CMS\Core\Utility\GeneralUtility::png_to_gif_by_imagemagick($imageInfo[3]); $GLOBALS['TSFE']->imagesOnPage[] = $imageInfo[3]; diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ResourceViewHelper.php b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ResourceViewHelper.php index e9b226777defd63a9f434794a449d04448875e94..52042e8a9024b5a10b3b2317c836b46266ef4acd 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ResourceViewHelper.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Uri/ResourceViewHelper.php @@ -41,10 +41,10 @@ class ResourceViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHe if ($extensionName === NULL) { $extensionName = $this->controllerContext->getRequest()->getControllerExtensionName(); } - $uri = (('EXT:' . \TYPO3\CMS\Core\Utility\GeneralUtility::camelCaseToLowerCaseUnderscored($extensionName)) . '/Resources/Public/') . $path; + $uri = 'EXT:' . \TYPO3\CMS\Core\Utility\GeneralUtility::camelCaseToLowerCaseUnderscored($extensionName) . '/Resources/Public/' . $path; $uri = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($uri); $uri = substr($uri, strlen(PATH_site)); - if ((TYPO3_MODE === 'BE' && $absolute === FALSE) && $uri !== FALSE) { + if (TYPO3_MODE === 'BE' && $absolute === FALSE && $uri !== FALSE) { $uri = '../' . $uri; } if ($absolute === TRUE) { diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/AutocompleteController.php b/typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/AutocompleteController.php index 736d77100e7610f7465f6a81e4ad2ada14253078..22ee4352e6d593444465ca92c0e4e02604fe259e 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/AutocompleteController.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/AutocompleteController.php @@ -41,9 +41,9 @@ class AutocompleteController extends \TYPO3\CMS\Fluid\Core\Widget\AbstractWidget $query = $this->widgetConfiguration['objects']->getQuery(); $constraint = $query->getConstraint(); if ($constraint !== NULL) { - $query->matching($query->logicalAnd($constraint, $query->like($searchProperty, ('%' . $term) . '%', FALSE))); + $query->matching($query->logicalAnd($constraint, $query->like($searchProperty, '%' . $term . '%', FALSE))); } else { - $query->matching($query->like($searchProperty, ('%' . $term) . '%', FALSE)); + $query->matching($query->like($searchProperty, '%' . $term . '%', FALSE)); } $results = $query->execute(); $output = array(); diff --git a/typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/PaginateController.php b/typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/PaginateController.php index 3bdb7e649f84825081854fcd188d0f45016fd106..a77fce3c09005e92c70c7d6dc938e4ed92152797 100644 --- a/typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/PaginateController.php +++ b/typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/PaginateController.php @@ -103,7 +103,7 @@ class PaginateController extends \TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetCont } $delta = floor($maximumNumberOfLinks / 2); $this->displayRangeStart = $this->currentPage - $delta; - $this->displayRangeEnd = ($this->currentPage + $delta) + ($maximumNumberOfLinks % 2 === 0 ? 1 : 0); + $this->displayRangeEnd = $this->currentPage + $delta + ($maximumNumberOfLinks % 2 === 0 ? 1 : 0); if ($this->displayRangeStart < 1) { $this->displayRangeEnd -= $this->displayRangeStart - 1; } diff --git a/typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserPatternTest.php b/typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserPatternTest.php index 3d37a1eeab5bc67410938aeb662f97b6269f7069..41f0860723816668a7bfc673fa2a2eefbdcb7b05 100644 --- a/typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserPatternTest.php +++ b/typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserPatternTest.php @@ -63,7 +63,7 @@ class TemplateParserPatternTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCa $expected = array('Hallo ', '<f:testing>', '<![CDATA[<f:notparsed>]]>', '</f:testing>'); $this->assertEquals(preg_split($pattern, $source, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY), $expected, 'The SPLIT_PATTERN_DYNAMICTAGS pattern did not split the input string correctly if there is a CDATA section the parser should ignore.'); $veryLongViewHelper = '<f:form enctype="multipart/form-data" onsubmit="void(0)" onreset="void(0)" action="someAction" arguments="{arg1: \'val1\', arg2: \'val2\'}" controller="someController" package="YourCompanyName.somePackage" subpackage="YourCompanyName.someSubpackage" section="someSection" format="txt" additionalParams="{param1: \'val1\', param2: \'val2\'}" absolute="true" addQueryString="true" argumentsToBeExcludedFromQueryString="{0: \'foo\'}" />'; - $source = (($veryLongViewHelper . 'Begin') . $veryLongViewHelper) . 'End'; + $source = $veryLongViewHelper . 'Begin' . $veryLongViewHelper . 'End'; $expected = array($veryLongViewHelper, 'Begin', $veryLongViewHelper, 'End'); $this->assertEquals(preg_split($pattern, $source, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY), $expected, 'The SPLIT_PATTERN_DYNAMICTAGS pattern did not split the input string correctly if the VH has lots of arguments.'); } diff --git a/typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserTest.php b/typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserTest.php index cde7bfb8194a8ab5576efdd055c70b25f1ca4e7c..52cef1b7ba07de602c1d92e5b416c2a9c65ca90e 100644 --- a/typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserTest.php +++ b/typo3/sysext/fluid/Tests/Unit/Core/Parser/TemplateParserTest.php @@ -109,8 +109,8 @@ class TemplateParserTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase { * @test */ public function splitTemplateAtDynamicTagsReturnsCorrectlySplitTemplate($templateName) { - $template = file_get_contents(((dirname(__FILE__) . '/Fixtures/') . $templateName) . '.html', FILE_TEXT); - $expectedResult = require ((dirname(__FILE__) . '/Fixtures/') . $templateName) . '-split.php'; + $template = file_get_contents(dirname(__FILE__) . '/Fixtures/' . $templateName . '.html', FILE_TEXT); + $expectedResult = require dirname(__FILE__) . '/Fixtures/' . $templateName . '-split.php'; $templateParser = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\Core\\Parser\\TemplateParser', array('dummy')); $this->assertSame($expectedResult, $templateParser->_call('splitTemplateAtDynamicTags', $template), 'Filed for ' . $templateName); } diff --git a/typo3/sysext/fluid/Tests/Unit/View/TemplateViewTest.php b/typo3/sysext/fluid/Tests/Unit/View/TemplateViewTest.php index ce97f42474de35e90c587c1655db40dd4d9d4097..cfe0f02105800a4654788cd38a9baa2f7b3ae751 100644 --- a/typo3/sysext/fluid/Tests/Unit/View/TemplateViewTest.php +++ b/typo3/sysext/fluid/Tests/Unit/View/TemplateViewTest.php @@ -93,7 +93,7 @@ class TemplateViewTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase { * @param $format */ protected function setupMockControllerContextForPathResolving($packageKey, $subPackageKey, $controllerName, $format) { - $controllerObjectName = ((("TYPO3\\{$packageKey}\\" . ($subPackageKey != $subPackageKey . '\\' ?: '')) . 'Controller\\') . $controllerName) . 'Controller'; + $controllerObjectName = "TYPO3\\{$packageKey}\\" . ($subPackageKey != $subPackageKey . '\\' ?: '') . 'Controller\\' . $controllerName . 'Controller'; $mockRequest = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\Web\\Request'); $mockRequest->expects($this->any())->method('getControllerPackageKey')->will($this->returnValue($packageKey)); $mockRequest->expects($this->any())->method('getControllerSubPackageKey')->will($this->returnValue($subPackageKey)); diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/BaseViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/BaseViewHelperTest.php index 0cdebd42e01c69e26a7f31007294f386d53e3bac..01101c835400e9f1daba28637248b2b19b0b256c 100644 --- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/BaseViewHelperTest.php +++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/BaseViewHelperTest.php @@ -25,7 +25,7 @@ class BaseViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel $this->request->expects($this->any())->method('getBaseUri')->will($this->returnValue($baseUri)); $viewHelper = new \Tx_Fluid_ViewHelpers_BaseViewHelper(); $this->injectDependenciesIntoViewHelper($viewHelper); - $expectedResult = ('<base href="' . $baseUri) . '" />'; + $expectedResult = '<base href="' . $baseUri . '" />'; $actualResult = $viewHelper->render(); $this->assertSame($expectedResult, $actualResult); } diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php index 7ccb01409a44554ba16cfc0aaee6113927f64183..ef751ced41fb8bbfaf3503693ef72a55f34bc307 100644 --- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php +++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php @@ -26,7 +26,7 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe $mockPersistenceManager->expects($this->any())->method('getIdentifierByObject')->will($this->returnValue('6f487e40-4483-11de-8a39-0800200c9a66')); $className = 'Object' . uniqid(); $fullClassName = 'TYPO3\\Fluid\\ViewHelpers\\Form\\' . $className; - eval(('namespace TYPO3\\Fluid\\ViewHelpers\\Form; class ' . $className) . ' { + eval('namespace TYPO3\\Fluid\\ViewHelpers\\Form; class ' . $className . ' { public function __clone() {} }'); $object = $this->getMock($fullClassName); @@ -115,16 +115,16 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe $formViewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Form\\AbstractFormFieldViewHelper', array('isObjectAccessorMode', 'addAdditionalIdentityPropertiesIfNeeded'), array(), '', FALSE); $this->injectDependenciesIntoViewHelper($formViewHelper); $className = 'test_' . uniqid(); - $mockObject = eval((((((' - class ' . $className) . ' { + $mockObject = eval(' + class ' . $className . ' { public function getSomething() { return "MyString"; } public function getValue() { - return new ') . $className) . '; + return new ' . $className . '; } } - return new ') . $className) . '; + return new ' . $className . '; '); $formViewHelper->expects($this->any())->method('isObjectAccessorMode')->will($this->returnValue(TRUE)); $formViewHelper->expects($this->once())->method('addAdditionalIdentityPropertiesIfNeeded'); @@ -315,16 +315,16 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe */ public function addAdditionalIdentityPropertiesIfNeededCallsRenderIdentityFieldWithTheRightParameters() { $className = 'test_' . uniqid(); - $mockFormObject = eval((((((' - class ' . $className) . ' { + $mockFormObject = eval(' + class ' . $className . ' { public function getSomething() { return "MyString"; } public function getValue() { - return new ') . $className) . '; + return new ' . $className . '; } } - return new ') . $className) . '; + return new ' . $className . '; '); $property = 'value.something'; $objectName = 'myObject'; @@ -344,16 +344,16 @@ class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHe */ public function addAdditionalIdentityPropertiesIfNeededCallsRenderIdentityFieldWithTheRightParametersWithMoreHierarchyLevels() { $className = 'test_' . uniqid(); - $mockFormObject = eval((((((' - class ' . $className) . ' { + $mockFormObject = eval(' + class ' . $className . ' { public function getSomething() { return "MyString"; } public function getValue() { - return new ') . $className) . '; + return new ' . $className . '; } } - return new ') . $className) . '; + return new ' . $className . '; '); $property = 'value.value.something'; $objectName = 'myObject'; diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormViewHelperTest.php index 627f4280365d58fae07c611305be692e20fc458d..e48e1de546ca45a818f05e45327db01044ae3f7a 100644 --- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormViewHelperTest.php +++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormViewHelperTest.php @@ -32,11 +32,11 @@ class AbstractFormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers */ public function renderHiddenIdentityFieldReturnsAHiddenInputFieldContainingTheObjectsUID() { $className = 'Object' . uniqid(); - eval(('class ' . $className) . ' extends TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity { + eval('class ' . $className . ' extends TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity { }'); $object = $this->getAccessibleMock($className, array('dummy')); $object->_set('uid', 123); - $expectedResult = (chr(10) . '<input type="hidden" name="prefix[theName][__identity]" value="123" />') . chr(10); + $expectedResult = chr(10) . '<input type="hidden" name="prefix[theName][__identity]" value="123" />' . chr(10); $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', array('prefixFieldName', 'registerFieldNameForFormTokenGeneration'), array(), '', FALSE); $viewHelper->expects($this->any())->method('prefixFieldName')->with('theName')->will($this->returnValue('prefix[theName]')); $actualResult = $viewHelper->_call('renderHiddenIdentityField', $object, 'theName'); @@ -48,12 +48,12 @@ class AbstractFormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers */ public function renderHiddenIdentityFieldReturnsAHiddenInputFieldIfObjectIsNewButAClone() { $className = 'Object' . uniqid(); - eval(('class ' . $className) . ' extends TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity { + eval('class ' . $className . ' extends TYPO3\\CMS\\Extbase\\DomainObject\\AbstractEntity { }'); $object = $this->getAccessibleMock($className, array('dummy')); $object->_set('uid', 123); $object = clone $object; - $expectedResult = (chr(10) . '<input type="hidden" name="prefix[theName][__identity]" value="123" />') . chr(10); + $expectedResult = chr(10) . '<input type="hidden" name="prefix[theName][__identity]" value="123" />' . chr(10); $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', array('prefixFieldName', 'registerFieldNameForFormTokenGeneration'), array(), '', FALSE); $viewHelper->expects($this->any())->method('prefixFieldName')->with('theName')->will($this->returnValue('prefix[theName]')); $actualResult = $viewHelper->_call('renderHiddenIdentityField', $object, 'theName'); diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php index 3d2d24eeadb2c0eaa13594c97e0e7a18ee862817..6f48abbc2ce3786e68236c8c9195a6eabda514b5 100644 --- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php +++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php @@ -47,7 +47,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\ public function selectCreatesExpectedOptions() { $this->tagBuilder->expects($this->once())->method('addAttribute')->with('name', 'myName'); $this->viewHelper->expects($this->once())->method('registerFieldNameForFormTokenGeneration')->with('myName'); - $this->tagBuilder->expects($this->once())->method('setContent')->with((('<option value="value1">label1</option>' . chr(10)) . '<option value="value2" selected="selected">label2</option>') . chr(10)); + $this->tagBuilder->expects($this->once())->method('setContent')->with('<option value="value1">label1</option>' . chr(10) . '<option value="value2" selected="selected">label2</option>' . chr(10)); $this->tagBuilder->expects($this->once())->method('render'); $this->arguments['options'] = array( 'value1' => 'label1', @@ -82,7 +82,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\ public function OrderOfOptionsIsNotAlteredByDefault() { $this->tagBuilder->expects($this->once())->method('addAttribute')->with('name', 'myName'); $this->viewHelper->expects($this->once())->method('registerFieldNameForFormTokenGeneration')->with('myName'); - $this->tagBuilder->expects($this->once())->method('setContent')->with((((('<option value="value3">label3</option>' . chr(10)) . '<option value="value1">label1</option>') . chr(10)) . '<option value="value2" selected="selected">label2</option>') . chr(10)); + $this->tagBuilder->expects($this->once())->method('setContent')->with('<option value="value3">label3</option>' . chr(10) . '<option value="value1">label1</option>' . chr(10) . '<option value="value2" selected="selected">label2</option>' . chr(10)); $this->tagBuilder->expects($this->once())->method('render'); $this->arguments['options'] = array( 'value3' => 'label3', @@ -102,7 +102,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\ public function optionsAreSortedByLabelIfSortByOptionLabelIsSet() { $this->tagBuilder->expects($this->once())->method('addAttribute')->with('name', 'myName'); $this->viewHelper->expects($this->once())->method('registerFieldNameForFormTokenGeneration')->with('myName'); - $this->tagBuilder->expects($this->once())->method('setContent')->with((((('<option value="value1">label1</option>' . chr(10)) . '<option value="value2" selected="selected">label2</option>') . chr(10)) . '<option value="value3">label3</option>') . chr(10)); + $this->tagBuilder->expects($this->once())->method('setContent')->with('<option value="value1">label1</option>' . chr(10) . '<option value="value2" selected="selected">label2</option>' . chr(10) . '<option value="value3">label3</option>' . chr(10)); $this->tagBuilder->expects($this->once())->method('render'); $this->arguments['options'] = array( 'value3' => 'label3', @@ -134,7 +134,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\ $this->viewHelper->initializeArguments(); $this->viewHelper->initialize(); $result = $this->viewHelper->render(); - $expected = ((((('<input type="hidden" name="myName" value="" /><select multiple="multiple" name="myName[]"><option value="value1" selected="selected">label1</option>' . chr(10)) . '<option value="value2">label2</option>') . chr(10)) . '<option value="value3" selected="selected">label3</option>') . chr(10)) . '</select>'; + $expected = '<input type="hidden" name="myName" value="" /><select multiple="multiple" name="myName[]"><option value="value1" selected="selected">label1</option>' . chr(10) . '<option value="value2">label2</option>' . chr(10) . '<option value="value3" selected="selected">label3</option>' . chr(10) . '</select>'; $this->assertSame($expected, $result); } @@ -148,7 +148,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\ $this->viewHelper->injectPersistenceManager($mockPersistenceManager); $this->tagBuilder->expects($this->once())->method('addAttribute')->with('name', 'myName'); $this->viewHelper->expects($this->once())->method('registerFieldNameForFormTokenGeneration')->with('myName'); - $this->tagBuilder->expects($this->once())->method('setContent')->with((((('<option value="1">Ingmar</option>' . chr(10)) . '<option value="2" selected="selected">Sebastian</option>') . chr(10)) . '<option value="3">Robert</option>') . chr(10)); + $this->tagBuilder->expects($this->once())->method('setContent')->with('<option value="1">Ingmar</option>' . chr(10) . '<option value="2" selected="selected">Sebastian</option>' . chr(10) . '<option value="3">Robert</option>' . chr(10)); $this->tagBuilder->expects($this->once())->method('render'); $user_is = new \Tx_Fluid_ViewHelpers_Fixtures_UserDomainClass(1, 'Ingmar', 'Schlecht'); $user_sk = new \Tx_Fluid_ViewHelpers_Fixtures_UserDomainClass(2, 'Sebastian', 'Kurfuerst'); @@ -190,7 +190,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\ $this->viewHelper->initializeArguments(); $this->viewHelper->initialize(); $actual = $this->viewHelper->render(); - $expected = ((((('<input type="hidden" name="myName" value="" /><select multiple="multiple" name="myName[]"><option value="1" selected="selected">Schlecht</option>' . chr(10)) . '<option value="2">Kurfuerst</option>') . chr(10)) . '<option value="3" selected="selected">Lemke</option>') . chr(10)) . '</select>'; + $expected = '<input type="hidden" name="myName" value="" /><select multiple="multiple" name="myName[]"><option value="1" selected="selected">Schlecht</option>' . chr(10) . '<option value="2">Kurfuerst</option>' . chr(10) . '<option value="3" selected="selected">Lemke</option>' . chr(10) . '</select>'; $this->assertSame($expected, $actual); } @@ -220,7 +220,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\ $this->viewHelper->initializeArguments(); $this->viewHelper->initialize(); $actual = $this->viewHelper->render(); - $expected = ((((((('<input type="hidden" name="myName" value="" />' . '<select multiple="multiple" name="myName[]">') . '<option value="1" selected="selected">Schlecht</option>') . chr(10)) . '<option value="2">Kurfuerst</option>') . chr(10)) . '<option value="3" selected="selected">Lemke</option>') . chr(10)) . '</select>'; + $expected = '<input type="hidden" name="myName" value="" />' . '<select multiple="multiple" name="myName[]">' . '<option value="1" selected="selected">Schlecht</option>' . chr(10) . '<option value="2">Kurfuerst</option>' . chr(10) . '<option value="3" selected="selected">Lemke</option>' . chr(10) . '</select>'; $this->assertSame($expected, $actual); } @@ -302,7 +302,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\ * @test */ public function allOptionsAreSelectedIfSelectAllIsTrue() { - $this->tagBuilder->expects($this->once())->method('setContent')->with((((('<option value="value1" selected="selected">label1</option>' . chr(10)) . '<option value="value2" selected="selected">label2</option>') . chr(10)) . '<option value="value3" selected="selected">label3</option>') . chr(10)); + $this->tagBuilder->expects($this->once())->method('setContent')->with('<option value="value1" selected="selected">label1</option>' . chr(10) . '<option value="value2" selected="selected">label2</option>' . chr(10) . '<option value="value3" selected="selected">label3</option>' . chr(10)); $this->arguments['options'] = array( 'value1' => 'label1', 'value2' => 'label2', @@ -320,7 +320,7 @@ class SelectViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\ * @test */ public function selectAllHasNoEffectIfValueIsSet() { - $this->tagBuilder->expects($this->once())->method('setContent')->with((((('<option value="value1" selected="selected">label1</option>' . chr(10)) . '<option value="value2" selected="selected">label2</option>') . chr(10)) . '<option value="value3">label3</option>') . chr(10)); + $this->tagBuilder->expects($this->once())->method('setContent')->with('<option value="value1" selected="selected">label1</option>' . chr(10) . '<option value="value2" selected="selected">label2</option>' . chr(10) . '<option value="value3">label3</option>' . chr(10)); $this->arguments['options'] = array( 'value1' => 'label1', 'value2' => 'label2', diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/FormViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/FormViewHelperTest.php index dd38e63f170510cb8d5633c438a9bdf1e2ddc378..608a1ebd2a15e9145b54fbb9c8816d0d5e65c0e1 100644 --- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/FormViewHelperTest.php +++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/FormViewHelperTest.php @@ -137,7 +137,7 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel $viewHelper->expects($this->once())->method('renderHiddenReferrerFields')->will($this->returnValue('hiddenReferrerFields')); $viewHelper->expects($this->once())->method('renderRequestHashField')->will($this->returnValue('requestHashField')); $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('formContent')); - $expectedResult = (((((chr(10) . '<div style="display: none">') . 'hiddenIdentityFieldadditionalIdentityFieldshiddenReferrerFieldsrequestHashField') . chr(10)) . '</div>') . chr(10)) . 'formContent'; + $expectedResult = chr(10) . '<div style="display: none">' . 'hiddenIdentityFieldadditionalIdentityFieldshiddenReferrerFieldsrequestHashField' . chr(10) . '</div>' . chr(10) . 'formContent'; $this->tagBuilder->expects($this->once())->method('setContent')->with($expectedResult); $viewHelper->render(); } @@ -154,7 +154,7 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel $this->viewHelperVariableContainer->expects($this->once())->method('get')->with('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'additionalIdentityProperties')->will($this->returnValue($identityProperties)); $viewHelper = $this->getAccessibleMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', array('renderChildren'), array(), '', FALSE); $this->injectDependenciesIntoViewHelper($viewHelper); - $expected = ((chr(10) . '<input type="hidden" name="object1[object2][__identity]" value="42" />') . chr(10)) . '<input type="hidden" name="object1[object2][subobject][__identity]" value="21" />'; + $expected = chr(10) . '<input type="hidden" name="object1[object2][__identity]" value="42" />' . chr(10) . '<input type="hidden" name="object1[object2][subobject][__identity]" value="21" />'; $actual = $viewHelper->_call('renderAdditionalIdentityFields'); $this->assertEquals($expected, $actual); } @@ -170,7 +170,7 @@ class FormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHel $this->request->expects($this->atLeastOnce())->method('getControllerName')->will($this->returnValue('controllerName')); $this->request->expects($this->atLeastOnce())->method('getControllerActionName')->will($this->returnValue('controllerActionName')); $hiddenFields = $viewHelper->_call('renderHiddenReferrerFields'); - $expectedResult = (((((chr(10) . '<input type="hidden" name="__referrer[extensionName]" value="extensionName" />') . chr(10)) . '<input type="hidden" name="__referrer[controllerName]" value="controllerName" />') . chr(10)) . '<input type="hidden" name="__referrer[actionName]" value="controllerActionName" />') . chr(10); + $expectedResult = chr(10) . '<input type="hidden" name="__referrer[extensionName]" value="extensionName" />' . chr(10) . '<input type="hidden" name="__referrer[controllerName]" value="controllerName" />' . chr(10) . '<input type="hidden" name="__referrer[actionName]" value="controllerActionName" />' . chr(10); $this->assertEquals($expectedResult, $hiddenFields); } diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/HtmlentitiesViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/HtmlentitiesViewHelperTest.php index 8cfd88fc5381860a1537b8d432f5dc243ca2127d..afec35a87521aa67b807754f423b67e5a12c0bd1 100644 --- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/HtmlentitiesViewHelperTest.php +++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/HtmlentitiesViewHelperTest.php @@ -62,7 +62,7 @@ class HtmlentitiesViewHelperTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestC * @test */ public function renderDecodesSimpleString() { - $source = ('Some special characters: &' . chr(169)) . '"\''; + $source = 'Some special characters: &' . chr(169) . '"\''; $expectedResult = 'Some special characters: &©"\''; $actualResult = $this->viewHelper->render($source); $this->assertEquals($expectedResult, $actualResult); @@ -72,7 +72,7 @@ class HtmlentitiesViewHelperTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestC * @test */ public function renderRespectsKeepQuoteArgument() { - $source = ('Some special characters: &' . chr(169)) . '"\''; + $source = 'Some special characters: &' . chr(169) . '"\''; $expectedResult = 'Some special characters: &©"\''; $actualResult = $this->viewHelper->render($source, TRUE); $this->assertEquals($expectedResult, $actualResult); diff --git a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/Nl2brViewHelperTest.php b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/Nl2brViewHelperTest.php index ac41fedd5cd431d6a342add5971e3e69b31fb936..bb8ec3e722df5b672d5f3ffe7dbfcb1d22bc2254 100644 --- a/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/Nl2brViewHelperTest.php +++ b/typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/Nl2brViewHelperTest.php @@ -30,9 +30,9 @@ class Nl2brViewHelperTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase { */ public function viewHelperConvertsLineBreaksToBRTags() { $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\Nl2brViewHelper', array('renderChildren')); - $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue(('Line 1' . chr(10)) . 'Line 2')); + $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('Line 1' . chr(10) . 'Line 2')); $actualResult = $viewHelper->render(); - $this->assertEquals(('Line 1<br />' . chr(10)) . 'Line 2', $actualResult); + $this->assertEquals('Line 1<br />' . chr(10) . 'Line 2', $actualResult); } /** @@ -40,9 +40,9 @@ class Nl2brViewHelperTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase { */ public function viewHelperConvertsWindowsLineBreaksToBRTags() { $viewHelper = $this->getMock('TYPO3\\CMS\\Fluid\\ViewHelpers\\Format\\Nl2brViewHelper', array('renderChildren')); - $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue((('Line 1' . chr(13)) . chr(10)) . 'Line 2')); + $viewHelper->expects($this->once())->method('renderChildren')->will($this->returnValue('Line 1' . chr(13) . chr(10) . 'Line 2')); $actualResult = $viewHelper->render(); - $this->assertEquals((('Line 1<br />' . chr(13)) . chr(10)) . 'Line 2', $actualResult); + $this->assertEquals('Line 1<br />' . chr(13) . chr(10) . 'Line 2', $actualResult); } }