‪TYPO3CMS  ‪main
TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics Class Reference
Inheritance diagram for TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics:

Public Member Functions

 enterNode (Node $node)
bool isFileIgnored ()
int getNumberOfEffectiveCodeLines ()
int getNumberOfIgnoredLines ()

Protected Attributes

bool $isCurrentFileIgnored = false
int $numberOfIgnoreLines = 0
int $numberOfEffectiveCodeLines = 0
int $currentLineNumber = 0

Detailed Description

A visitor doing some counting. It sums the number of ignored lines and lines of effective code.

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

Definition at line 29 of file CodeStatistics.php.

Member Function Documentation

◆ enterNode()

TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics::enterNode ( Node  $node)

Called by PhpParser during traversal.

Definition at line 50 of file CodeStatistics.php.

◆ getNumberOfEffectiveCodeLines()

int TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics::getNumberOfEffectiveCodeLines ( )

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


Definition at line 102 of file CodeStatistics.php.

References TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics\$numberOfEffectiveCodeLines.

◆ getNumberOfIgnoredLines()

int TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics::getNumberOfIgnoredLines ( )

Returns number of found @extensionScannerIgnoreLine comments Called externally after traversing


Definition at line 113 of file CodeStatistics.php.

References TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics\$numberOfIgnoreLines.

◆ isFileIgnored()

bool TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics::isFileIgnored ( )

True if a @extensionScannerIgnoreFile has been found. Called externally after traversing


Definition at line 90 of file CodeStatistics.php.

References TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics\$isCurrentFileIgnored.

Member Data Documentation

◆ $currentLineNumber

int TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics::$currentLineNumber = 0

Current line number given not is in, runtime helper var

Definition at line 45 of file CodeStatistics.php.

◆ $isCurrentFileIgnored

bool TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics::$isCurrentFileIgnored = false

True if a class statement has @extensionScannerIgnoreFile

Definition at line 33 of file CodeStatistics.php.

Referenced by TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics\isFileIgnored().

◆ $numberOfEffectiveCodeLines

int TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics::$numberOfEffectiveCodeLines = 0

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

Definition at line 41 of file CodeStatistics.php.

Referenced by TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics\getNumberOfEffectiveCodeLines().

◆ $numberOfIgnoreLines

int TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics::$numberOfIgnoreLines = 0

Counts @extensionScannerIgnoreLine statements

Definition at line 37 of file CodeStatistics.php.

Referenced by TYPO3\CMS\Install\ExtensionScanner\Php\CodeStatistics\getNumberOfIgnoredLines().