fix indent of switch

This commit is contained in:
fzerorubigd 2013-11-08 16:24:11 +03:30
parent d1856a4ed3
commit 287a8da70c
No known key found for this signature in database
GPG Key ID: D6EE858AF9D2999A

View File

@ -70,31 +70,31 @@ class Parser
continue;
} else {
switch ($token[Tokenizer::TYPE]) {
case Tokenizer::T_END_SECTION:
$newNodes = array();
do {
$result = array_pop($stack);
if ($result === null) {
throw new \LogicException(
'Unexpected closing tag: /' . $token[Tokenizer::NAME]
);
}
case Tokenizer::T_END_SECTION:
$newNodes = array();
do {
$result = array_pop($stack);
if ($result === null) {
throw new \LogicException(
'Unexpected closing tag: /' . $token[Tokenizer::NAME]
);
}
if (!array_key_exists(Tokenizer::NODES, $result)
&& isset($result[Tokenizer::NAME])
&& $result[Tokenizer::NAME] == $token[Tokenizer::NAME]
) {
$result[Tokenizer::NODES] = $newNodes;
$result[Tokenizer::END] = $token[Tokenizer::INDEX];
array_push($stack, $result);
break 2;
} else {
array_unshift($newNodes, $result);
}
} while (true);
break;
default:
array_push($stack, $token);
if (!array_key_exists(Tokenizer::NODES, $result)
&& isset($result[Tokenizer::NAME])
&& $result[Tokenizer::NAME] == $token[Tokenizer::NAME]
) {
$result[Tokenizer::NODES] = $newNodes;
$result[Tokenizer::END] = $token[Tokenizer::INDEX];
array_push($stack, $result);
break 2;
} else {
array_unshift($newNodes, $result);
}
} while (true);
break;
default:
array_push($stack, $token);
}
}