PHP Class Kahlan\Reporter\Coverage\Metrics

Datei anzeigen Open project: crysalead/kahlan

Protected Properties

Property Type Description
$_children The child metrics of the current metrics.
$_metrics The metrics data.
$_name string The string name reference of the metrics.
$_parent object Reference to the parent metrics.
$_type string The type of the metrics is about.

Public Methods

Method Description
__construct ( array $options = [] ) Constructor
add ( string $name, $metrics ) Adds some metrics to the current metrics.
children ( string $name = null ) : array Gets the children of the current metrics.
data ( array $metrics = [] ) : array Gets/Sets the metrics stats.
get ( string $name = null ) : object Gets the metrics from a name.
name ( ) : string Gets the name of the metrics.
parent ( ) : object Gets the parent instance.
type ( ) : string Gets the type of the metrics.

Protected Methods

Method Description
_merge ( array $metrics = [], boolean $line = false ) Merges some given metrics to the existing metrics .
_parseName ( string $name ) : array Gets meta info of a metrics from a name reference.

Method Details

__construct() public method

Constructor
public __construct ( array $options = [] )
$options array Possible options values are: - `'name'` _string_ : the string name reference of the metrics. - `'type'` _string_ : the type of the metrics is about. - `'parent'` _instance_: reference to the parent metrics.

_merge() protected method

Merges some given metrics to the existing metrics .
protected _merge ( array $metrics = [], boolean $line = false )
$metrics array Metrics data to merge.
$line boolean Set to `true` for function only

_parseName() protected method

.
protected _parseName ( string $name ) : array
$name string The name reference of the metrics.
return array The parsed name.

add() public method

Adds some metrics to the current metrics.
public add ( string $name, $metrics )
$name string The name reference of the metrics. Possible values are: `'namespace'`, `'class' or 'function'.

children() public method

Gets the children of the current metrics.
public children ( string $name = null ) : array
$name string The name reference of the metrics.
return array The metrics children.

data() public method

Gets/Sets the metrics stats.
public data ( array $metrics = [] ) : array
$metrics array The metrics data to set if defined.
return array The metrics data.

get() public method

Gets the metrics from a name.
public get ( string $name = null ) : object
$name string The name reference of the metrics.
return object The metrics instance.

name() public method

Gets the name of the metrics.
public name ( ) : string
return string The name of the metrics.

parent() public method

Gets the parent instance.
public parent ( ) : object
return object The parent instance

type() public method

Gets the type of the metrics.
public type ( ) : string
return string The type of the metrics.

Property Details

$_children protected_oe property

The child metrics of the current metrics.
protected $_children

$_metrics protected_oe property

The metrics data.
protected $_metrics

$_name protected_oe property

The string name reference of the metrics.
protected string $_name
return string

$_parent protected_oe property

Reference to the parent metrics.
protected object $_parent
return object

$_type protected_oe property

The type of the metrics is about.
protected string $_type
return string