You are here

private function Parser::isNextLineUnIndentedCollection in Translation template extractor 7.2

Same name and namespace in other branches
  1. 6.3 vendor/Symfony/Component/Yaml/Parser.php \Symfony\Component\Yaml\Parser::isNextLineUnIndentedCollection()
  2. 7.3 vendor/Symfony/Component/Yaml/Parser.php \Symfony\Component\Yaml\Parser::isNextLineUnIndentedCollection()

Returns true if the next line starts unindented collection

Return value

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

1 call to Parser::isNextLineUnIndentedCollection()
Parser::parse in vendor/Symfony/Component/Yaml/Parser.php
Parses a YAML string to a PHP value.

File

vendor/Symfony/Component/Yaml/Parser.php, line 593

Class

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

Namespace

Symfony\Component\Yaml

Code

private function isNextLineUnIndentedCollection() {
  $currentIndentation = $this
    ->getCurrentLineIndentation();
  $notEOF = $this
    ->moveToNextLine();
  while ($notEOF && $this
    ->isCurrentLineEmpty()) {
    $notEOF = $this
      ->moveToNextLine();
  }
  if (false === $notEOF) {
    return false;
  }
  $ret = false;
  if ($this
    ->getCurrentLineIndentation() == $currentIndentation && $this
    ->isStringUnIndentedCollectionItem($this->currentLine)) {
    $ret = true;
  }
  $this
    ->moveToPreviousLine();
  return $ret;
}