Documentation

SourceFile extends Coveralls
in package

Data represents "source_files" element of Coveralls' "json_file".

Tags
author

Kitamura Satoshi with.no.parachute@gmail.com

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

$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
string

addCoverage()

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
int

getName()

Return source filename.

public getName() : string
Return values
string

getPath()

Return absolute path.

public getPath() : string
Return values
string

getSource()

Return source content.

public getSource() : string
Return values
string

reportLineCoverage()

Return line coverage.

public reportLineCoverage() : float
Return values
float

onJsonError()

protected onJsonError() : mixed

        
On this page

Search results