CodeStatistics extends NodeVisitorAbstract

A visitor doing some counting.

It sums the number of ignored lines and lines of effective code.

Internal

This class is only meant to be used within EXT:install and is not part of the TYPO3 Core API.

Table of Contents

Properties

$currentLineNumber  : int
$isCurrentFileIgnored  : bool
$numberOfEffectiveCodeLines  : int
$numberOfIgnoreLines  : int

Methods

enterNode()  : null
Called by PhpParser during traversal.
getNumberOfEffectiveCodeLines()  : int
Number of "effective" code lines: No comments, no empty lines, but "class" statements, "function" statements, "use xy", etc.
getNumberOfIgnoredLines()  : int
Returns number of found @extensionScannerIgnoreLine comments Called externally *after* traversing
isFileIgnored()  : bool
True if a @extensionScannerIgnoreFile has been found.

Properties

$currentLineNumber

protected int $currentLineNumber = 0

Current line number given not is in, runtime helper var

$isCurrentFileIgnored

protected bool $isCurrentFileIgnored = false

True if a class statement has @extensionScannerIgnoreFile

$numberOfEffectiveCodeLines

protected int $numberOfEffectiveCodeLines = 0

Number of effective code lines - class and method statements, function calls ...

$numberOfIgnoreLines

protected int $numberOfIgnoreLines = 0

Counts @extensionScannerIgnoreLine statements

Methods

enterNode()

Called by PhpParser during traversal.

public enterNode(Node $node) : null
Parameters
$node : Node
Return values
null

getNumberOfEffectiveCodeLines()

Number of "effective" code lines: No comments, no empty lines, but "class" statements, "function" statements, "use xy", etc.

public getNumberOfEffectiveCodeLines() : int

Called externally after traversing

Return values
int

getNumberOfIgnoredLines()

Returns number of found @extensionScannerIgnoreLine comments Called externally *after* traversing

public getNumberOfIgnoredLines() : int
Return values
int

isFileIgnored()

True if a @extensionScannerIgnoreFile has been found.

public isFileIgnored() : bool

Called externally after traversing

Return values
bool

        
On this page

Search results