You are here

private function Parser::isNextLineIndented in Lockr 7.3

Returns true if the next line is indented.

Return value

bool Returns true if the next line is indented, false otherwise

2 calls to Parser::isNextLineIndented()
Parser::doParse in vendor/symfony/yaml/Parser.php
Parser::getLineTag in vendor/symfony/yaml/Parser.php

File

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

Class

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

Namespace

Symfony\Component\Yaml

Code

private function isNextLineIndented() {
  $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;
  for ($i = 0; $i < $movements; ++$i) {
    $this
      ->moveToPreviousLine();
  }
  return $ret;
}