You are here

private function Parser::isCurrentLineComment in Lockr 7.3

Returns true if the current line is a comment line.

Return value

bool Returns true if the current line is a comment line, false otherwise

4 calls to Parser::isCurrentLineComment()
Parser::getNextEmbedBlock in vendor/symfony/yaml/Parser.php
Returns the next embed block of YAML.
Parser::isCurrentLineEmpty in vendor/symfony/yaml/Parser.php
Returns true if the current line is blank or if it is a comment line.
Parser::isNextLineIndented in vendor/symfony/yaml/Parser.php
Returns true if the next line is indented.
Parser::isNextLineUnIndentedCollection in vendor/symfony/yaml/Parser.php
Returns true if the next line starts unindented collection.

File

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

Class

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

Namespace

Symfony\Component\Yaml

Code

private function isCurrentLineComment() {

  //checking explicitly the first char of the trim is faster than loops or strpos
  $ltrimmedLine = ltrim($this->currentLine, ' ');
  return '' !== $ltrimmedLine && '#' === $ltrimmedLine[0];
}