SourceFile
in package
implements
Stringable
Provides the coverage data of a source file.
Interfaces, Classes, Traits and Enums
- Stringable
Table of Contents
- $branches : BranchCoverage|null
- $functions : FunctionCoverage|null
- $lines : LineCoverage|null
- $path : string
- __construct() : mixed
- Creates a new source file.
- __toString() : string
- Returns a string representation of this object.
- fromJson() : self
- Creates a new line data from the specified JSON object.
Properties
$branches
public
BranchCoverage|null
$branches
= null
$functions
public
FunctionCoverage|null
$functions
= null
$lines
public
LineCoverage|null
$lines
= null
$path
public
string
$path
Methods
__construct()
Creates a new source file.
public
__construct(string $path[, FunctionCoverage|null $functions = null ][, BranchCoverage|null $branches = null ][, LineCoverage|null $lines = null ]) : mixed
Parameters
- $path : string
-
The path to the source file.
- $functions : FunctionCoverage|null = null
-
The function coverage.
- $branches : BranchCoverage|null = null
-
The branch coverage.
- $lines : LineCoverage|null = null
-
The line coverage.
Return values
mixed —__toString()
Returns a string representation of this object.
public
__toString() : string
Return values
string —The string representation of this object.
fromJson()
Creates a new line data from the specified JSON object.
public
static fromJson(object $json) : self
Parameters
- $json : object
-
A JSON object representing a line data.
Return values
self —The instance corresponding to the specified JSON object.