Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a7672bd

Browse files
committed
clean up unused code
1 parent 98d7a95 commit a7672bd

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

src/Symfony/Component/Yaml/Parser.php

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -549,11 +549,6 @@ private function getCurrentLineIndentation()
549549
private function getNextEmbedBlock($indentation = null, $inSequence = false)
550550
{
551551
$oldLineIndentation = $this->getCurrentLineIndentation();
552-
$blockScalarIndentations = array();
553-
554-
if ($this->isBlockScalarHeader()) {
555-
$blockScalarIndentations[] = $oldLineIndentation;
556-
}
557552

558553
if (!$this->moveToNextLine()) {
559554
return;
@@ -612,30 +607,9 @@ private function getNextEmbedBlock($indentation = null, $inSequence = false)
612607

613608
$isItUnindentedCollection = $this->isStringUnIndentedCollectionItem();
614609

615-
if (empty($blockScalarIndentations) && $this->isBlockScalarHeader()) {
616-
$blockScalarIndentations[] = $this->getCurrentLineIndentation();
617-
}
618-
619-
$previousLineIndentation = $this->getCurrentLineIndentation();
620-
621610
while ($this->moveToNextLine()) {
622611
$indent = $this->getCurrentLineIndentation();
623612

624-
// terminate all block scalars that are more indented than the current line
625-
if (!empty($blockScalarIndentations) && $indent < $previousLineIndentation && '' !== trim($this->currentLine)) {
626-
foreach ($blockScalarIndentations as $key => $blockScalarIndentation) {
627-
if ($blockScalarIndentation >= $indent) {
628-
unset($blockScalarIndentations[$key]);
629-
}
630-
}
631-
}
632-
633-
if (empty($blockScalarIndentations) && !$this->isCurrentLineComment() && $this->isBlockScalarHeader()) {
634-
$blockScalarIndentations[] = $indent;
635-
}
636-
637-
$previousLineIndentation = $indent;
638-
639613
if ($isItUnindentedCollection && !$this->isCurrentLineEmpty() && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) {
640614
$this->moveToPreviousLine();
641615
break;
@@ -1054,16 +1028,6 @@ private function isStringUnIndentedCollectionItem()
10541028
return '-' === rtrim($this->currentLine) || 0 === strpos($this->currentLine, '- ');
10551029
}
10561030

1057-
/**
1058-
* Tests whether or not the current line is the header of a block scalar.
1059-
*
1060-
* @return bool
1061-
*/
1062-
private function isBlockScalarHeader()
1063-
{
1064-
return (bool) self::preg_match('~'.self::BLOCK_SCALAR_HEADER_PATTERN.'$~', $this->currentLine);
1065-
}
1066-
10671031
/**
10681032
* A local wrapper for `preg_match` which will throw a ParseException if there
10691033
* is an internal error in the PCRE engine.

0 commit comments

Comments
 (0)