CoverageSummary

Class
Read only: Yes Final: Yes

Represents the line coverage summary extracted from a PHPUnit `coverage-php` report.

Table of Contents

Properties

Methods

__construct()

Initializes a new instance of the CoverageSummary class.

 : mixed
executableLines()

Returns the total number of executable lines.

 : int
executedLines()

Returns the number of executable lines that were executed.

 : int
percentage()

Returns the executed line coverage as a percentage.

 : float
percentageAsString()

Returns the executed line coverage as a formatted percentage string.

 : string
Properties
Methods

__construct()

Public

Initializes a new instance of the CoverageSummary class.

public __construct( int  $executedLines, int  $executableLines) : mixed
Parameters
$executedLines : int

Description

Number of executable lines covered

$executableLines : int

Description

Total executable lines in the analyzed code

executableLines()

Public

Returns the total number of executable lines.

public executableLines() : int
Return values
int

executedLines()

Public

Returns the number of executable lines that were executed.

public executedLines() : int
Return values
int

percentage()

Public

Returns the executed line coverage as a percentage.

public percentage() : float
Return values
float

percentageAsString()

Public

Returns the executed line coverage as a formatted percentage string.

public percentageAsString() : string
Return values
string