CodeStatistics

class \TYPO3\CMS\Install\ExtensionScanner\Php\Visitor\CodeStatistics

Extends
NodeVisitorAbstract

A visitor doing some counting.

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

Table of Contents

Properties

$currentLineNumber  : int
Current line number given not is in, runtime helper var
$isCurrentFileIgnored  : bool
True if a class statement has @extensionScannerIgnoreFile
$numberOfEffectiveCodeLines  : int
Number of effective code lines - class and method statements, function calls .
$numberOfIgnoreLines  : int
Counts @extensionScannerIgnoreLine statements

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

Current line number given not is in, runtime helper var

protected int $currentLineNumber = 0

$isCurrentFileIgnored

True if a class statement has @extensionScannerIgnoreFile

protected bool $isCurrentFileIgnored = false

$numberOfEffectiveCodeLines

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

protected int $numberOfEffectiveCodeLines = 0

..

$numberOfIgnoreLines

Counts @extensionScannerIgnoreLine statements

protected int $numberOfIgnoreLines = 0

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