Skip to content

CoverageSummary

github-actions edited this page Apr 11, 2026 · 1 revision

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


  • Full name: \FastForward\DevTools\PhpUnit\Coverage\CoverageSummary
  • This class is marked as final and can't be subclassed
  • This class is a Final class

Methods

__construct

Initializes a new instance of the CoverageSummary class.

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

Parameters:

Parameter Type Description
$executedLines int Number of executable lines covered
$executableLines int Total executable lines in the analyzed code

executedLines

Returns the number of executable lines that were executed.

public executedLines(): int

executableLines

Returns the total number of executable lines.

public executableLines(): int

percentage

Returns the executed line coverage as a percentage.

public percentage(): float

percentageAsString

Returns the executed line coverage as a formatted percentage string.

public percentageAsString(): string

Clone this wiki locally