[Yaml] minor CS cleaning

This commit is contained in:
Martin Hujer 2015-11-29 08:43:05 +01:00 committed by Fabien Potencier
parent 0239d4ae7e
commit 613804d0cf

View File

@ -311,7 +311,7 @@ class Parser
if (null === $indentation) { if (null === $indentation) {
$newIndent = $this->getCurrentLineIndentation(); $newIndent = $this->getCurrentLineIndentation();
$unindentedEmbedBlock = $this->isStringUnIndentedCollectionItem($this->currentLine); $unindentedEmbedBlock = $this->isStringUnIndentedCollectionItem();
if (!$this->isCurrentLineEmpty() && 0 === $newIndent && !$unindentedEmbedBlock) { if (!$this->isCurrentLineEmpty() && 0 === $newIndent && !$unindentedEmbedBlock) {
throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine); throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine);
@ -337,7 +337,7 @@ class Parser
return; return;
} }
$isItUnindentedCollection = $this->isStringUnIndentedCollectionItem($this->currentLine); $isItUnindentedCollection = $this->isStringUnIndentedCollectionItem();
// Comments must not be removed inside a block scalar // Comments must not be removed inside a block scalar
$removeCommentsPattern = '~'.self::BLOCK_SCALAR_HEADER_PATTERN.'$~'; $removeCommentsPattern = '~'.self::BLOCK_SCALAR_HEADER_PATTERN.'$~';
@ -350,7 +350,7 @@ class Parser
$removeComments = !preg_match($removeCommentsPattern, $this->currentLine); $removeComments = !preg_match($removeCommentsPattern, $this->currentLine);
} }
if ($isItUnindentedCollection && !$this->isStringUnIndentedCollectionItem($this->currentLine) && $newIndent === $indent) { if ($isItUnindentedCollection && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) {
$this->moveToPreviousLine(); $this->moveToPreviousLine();
break; break;
} }
@ -653,7 +653,7 @@ class Parser
if ( if (
$this->getCurrentLineIndentation() == $currentIndentation $this->getCurrentLineIndentation() == $currentIndentation
&& &&
$this->isStringUnIndentedCollectionItem($this->currentLine) $this->isStringUnIndentedCollectionItem()
) { ) {
$ret = true; $ret = true;
} }