Documentation

Metrics
in package

Metrics.

Tags
author

Kitamura Satoshi with.no.parachute@gmail.com

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
int

getLineCoverage()

Return line coverage.

public getLineCoverage() : float
Return values
float

getStatements()

Return number of statements.

public getStatements() : int
Return values
int

hasStatements()

Return whether the source file has executable statements.

public hasStatements() : bool
Return values
bool

merge()

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

Return values
float

        
On this page

Search results