FunctionData
in package
implements
Stringable
Provides details for function coverage.
Interfaces, Classes, Traits and Enums
- Stringable
Table of Contents
- $executionCount : int
- $functionName : string
- $lineNumber : int
- __construct() : mixed
- Creates a new function data.
- __toString() : string
- Returns a string representation of this object.
- fromJson() : self
- Creates a new function data from the specified JSON object.
- toString() : string
- Returns a string representation of this object.
Properties
$executionCount
public
int
$executionCount
= 0
$functionName
public
string
$functionName
= ""
$lineNumber
public
int
$lineNumber
= 0
Methods
__construct()
Creates a new function data.
public
__construct([string $functionName = "" ], int $lineNumber, int $executionCount) : mixed
Parameters
- $functionName : string = ""
-
The function name.
- $lineNumber : int
-
The line number of the function start.
- $executionCount : int
-
The execution count.
Return values
mixed —__toString()
Returns a string representation of this object.
public
final __toString() : string
Return values
string —The string representation of this object.
fromJson()
Creates a new function data from the specified JSON object.
public
static fromJson(object $json) : self
Parameters
- $json : object
-
A JSON object representing a function data.
Return values
self —The instance corresponding to the specified JSON object.
toString()
Returns a string representation of this object.
public
toString([bool $asDefinition = false ]) : string
Parameters
- $asDefinition : bool = false
-
Value indicating whether to return the function definition (i.e. name and line number) instead of its data (i.e. name and execution count).
Return values
string —The string representation of this object.