Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Parser.php

function Parser::isNextLineIndented

Returns true if the next line is indented.

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 927

Class

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

Namespace

Symfony\Component\Yaml

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal