Skip to content

Commit

Permalink
TASK: Reformat code to PSR-2 standard
Browse files Browse the repository at this point in the history
  • Loading branch information
aertmann committed Jan 6, 2016
1 parent ca8fc4e commit a5df57f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
20 changes: 10 additions & 10 deletions Classes/TYPO3/TypoScript/Core/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,19 +340,19 @@ protected function parseComment($typoScriptLine)
{
if (preg_match(self::SPLIT_PATTERN_COMMENTTYPE, $typoScriptLine, $matches, PREG_OFFSET_CAPTURE) === 1) {
switch ($matches[1][0]) {
case '/*' :
case '/*':
$this->currentBlockCommentState = true;
break;
case '*/' :
case '*/':
if ($this->currentBlockCommentState !== true) {
throw new Exception('Unexpected closing block comment without matching opening block comment.', 1180615119);
}
$this->currentBlockCommentState = false;
$this->parseTypoScriptLine(substr($typoScriptLine, ($matches[1][1] + 2)));
break;
case '#' :
case '//' :
default :
case '#':
case '//':
default:
break;
}
} elseif ($this->currentBlockCommentState === false) {
Expand Down Expand Up @@ -396,10 +396,10 @@ protected function parseDeclaration($typoScriptLine)
}

switch ($matches[1]) {
case 'namespace' :
case 'namespace':
$this->parseNamespaceDeclaration($matches[2]);
break;
case 'include' :
case 'include':
$this->parseInclude($matches[2]);
break;
}
Expand All @@ -421,13 +421,13 @@ protected function parseObjectDefinition($typoScriptLine)

$objectPath = $this->getCurrentObjectPathPrefix() . $matches['ObjectPath'];
switch ($matches['Operator']) {
case '=' :
case '=':
$this->parseValueAssignment($objectPath, $matches['Value']);
break;
case '>' :
case '>':
$this->parseValueUnAssignment($objectPath);
break;
case '<' :
case '<':
$this->parseValueCopy($matches['Value'], $objectPath);
break;
}
Expand Down
18 changes: 9 additions & 9 deletions Tests/Unit/Core/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ public function objectManagerIsRegisteredCallback()
$arguments = array_merge(func_get_args(), array($this->mockObjectManager));
$objectName = array_shift($arguments);
switch ($objectName) {
case 'TYPO3\TypoScript\Fixtures\Text' :
case 'TYPO3\TypoScript\Fixtures\Page' :
case 'TYPO3\TypoScript\Fixtures\ContentArray' :
case 'TYPO3\TypoScript\Fixtures\ObjectWithArrayProperty' :
case 'TYPO3\TypoScript\Processors\WrapProcessor' :
case 'TYPO3\TypoScript\Processors\SubstringProcessor' :
case 'TYPO3\TypoScript\Processors\MultiplyProcessor' :
case 'TYPO3\SomeOther\Namespace\MyWrapProcessor' :
case 'TYPO3\TypoScript\Fixtures\Text':
case 'TYPO3\TypoScript\Fixtures\Page':
case 'TYPO3\TypoScript\Fixtures\ContentArray':
case 'TYPO3\TypoScript\Fixtures\ObjectWithArrayProperty':
case 'TYPO3\TypoScript\Processors\WrapProcessor':
case 'TYPO3\TypoScript\Processors\SubstringProcessor':
case 'TYPO3\TypoScript\Processors\MultiplyProcessor':
case 'TYPO3\SomeOther\Namespace\MyWrapProcessor':
return true;
default :
default:
return false;
}
}
Expand Down

0 comments on commit a5df57f

Please sign in to comment.