SourceFile
extends Coveralls
in package
Data represents "source_files" element of Coveralls' "json_file".
Tags
Table of Contents
Properties
- $coverage : array<string|int, mixed>
- Coverage data of the source file.
- $fileLines : int
- Line number of the source file.
- $metrics : Metrics
- Metrics.
- $name : string
- Source filename.
- $path : string
- Absolute path.
- $source : string
- Source content.
Methods
- __construct() : mixed
- Constructor.
- __toString() : string
- String expression (convert to json).
- addCoverage() : mixed
- Add coverage.
- getCoverage() : array<string|int, mixed>
- Return coverage data of the source file.
- getFileLines() : int
- Return line number of the source file.
- getMetrics() : Metrics
- Return metrics.
- getName() : string
- Return source filename.
- getPath() : string
- Return absolute path.
- getSource() : string
- Return source content.
- reportLineCoverage() : float
- Return line coverage.
- toArray() : array<string|int, mixed>
- Convert to an array.
- onJsonError() : mixed
Properties
$coverage
Coverage data of the source file.
protected
array<string|int, mixed>
$coverage
$fileLines
Line number of the source file.
protected
int
$fileLines
$metrics
Metrics.
protected
Metrics
$metrics
$name
Source filename.
protected
string
$name
$path
Absolute path.
protected
string
$path
$source
Source content.
protected
string
$source
Methods
__construct()
Constructor.
public
__construct(string $path, string $name[, string $eol = "
" ]) : mixed
Parameters
- $path : string
-
absolute path
- $name : string
-
source filename
- $eol : string = " "
-
end of line
__toString()
String expression (convert to json).
public
__toString() : string
Return values
stringaddCoverage()
Add coverage.
public
addCoverage(int $lineNum, int $count) : mixed
Parameters
- $lineNum : int
-
line number
- $count : int
-
number of covered
getCoverage()
Return coverage data of the source file.
public
getCoverage() : array<string|int, mixed>
Return values
array<string|int, mixed>getFileLines()
Return line number of the source file.
public
getFileLines() : int
Return values
intgetMetrics()
Return metrics.
public
getMetrics() : Metrics
Return values
MetricsgetName()
Return source filename.
public
getName() : string
Return values
stringgetPath()
Return absolute path.
public
getPath() : string
Return values
stringgetSource()
Return source content.
public
getSource() : string
Return values
stringreportLineCoverage()
Return line coverage.
public
reportLineCoverage() : float
Return values
floattoArray()
Convert to an array.
public
toArray() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>onJsonError()
protected
onJsonError() : mixed