You are here

private function Parser::isNextLineUnIndentedCollection in Lockr 7.3

Returns true if the next line starts unindented collection.

Return value

bool Returns true if the next line starts unindented collection, false otherwise

1 call to Parser::isNextLineUnIndentedCollection()
Parser::doParse in vendor/symfony/yaml/Parser.php

File

vendor/symfony/yaml/Parser.php, line 1009

Class

Parser
Parser parses YAML strings to convert them to PHP arrays.

Namespace

Symfony\Component\Yaml

Code

private function isNextLineUnIndentedCollection() {
  $currentIndentation = $this
    ->getCurrentLineIndentation();
  $movements = 0;
  do {
    $EOF = !$this
      ->moveToNextLine();
    if (!$EOF) {
      ++$movements;
    }
  } while (!$EOF && ($this
    ->isCurrentLineEmpty() || $this
    ->isCurrentLineComment()));
  if ($EOF) {
    return false;
  }
  $ret = $this
    ->getCurrentLineIndentation() === $currentIndentation && $this
    ->isStringUnIndentedCollectionItem();
  for ($i = 0; $i < $movements; ++$i) {
    $this
      ->moveToPreviousLine();
  }
  return $ret;
}