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

Breadcrumb

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

function LineCountingVisitor::enterNode

Overrides NodeVisitorAbstract::enterNode

File

vendor/sebastian/lines-of-code/src/LineCountingVisitor.php, line 46

Class

LineCountingVisitor

Namespace

SebastianBergmann\LinesOfCode

Code

public function enterNode(Node $node) : void {
    $this->comments = array_merge($this->comments, $node->getComments());
    if (!$node instanceof Expr) {
        return;
    }
    $this->linesWithStatements[] = $node->getStartLine();
}

API Navigation

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