Metrics
in package
Metrics.
Tags
Table of Contents
Properties
- $coveredStatements : int
- Number of covered statements.
- $lineCoverage : float
- Line coverage.
- $statements : int
- Number of statements.
Methods
- __construct() : mixed
- Constructor.
- getCoveredStatements() : int
- Return number of covered statements.
- getLineCoverage() : float
- Return line coverage.
- getStatements() : int
- Return number of statements.
- hasStatements() : bool
- Return whether the source file has executable statements.
- merge() : mixed
- Merge other metrics.
- calculateLineCoverage() : float
- Calculate line coverage.
Properties
$coveredStatements
Number of covered statements.
protected
int
$coveredStatements
= 0
$lineCoverage
Line coverage.
protected
float
$lineCoverage
$statements
Number of statements.
protected
int
$statements
= 0
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $coverage = [] ]) : mixed
Parameters
- $coverage : array<string|int, mixed> = []
-
coverage data
getCoveredStatements()
Return number of covered statements.
public
getCoveredStatements() : int
Return values
intgetLineCoverage()
Return line coverage.
public
getLineCoverage() : float
Return values
floatgetStatements()
Return number of statements.
public
getStatements() : int
Return values
inthasStatements()
Return whether the source file has executable statements.
public
hasStatements() : bool
Return values
boolmerge()
Merge other metrics.
public
merge(self $that) : mixed
Parameters
- $that : self
calculateLineCoverage()
Calculate line coverage.
protected
calculateLineCoverage(int $statements, int $coveredStatements) : float
Parameters
- $statements : int
-
number of statements
- $coveredStatements : int
-
number of covered statements