PHP Класс Kahlan\Reporter\Coverage

Наследование: extends Kahlan\Reporter\Terminal
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_classes array Class dependencies.
$_collector Reference to the coverage collector driver.
$_enabled array Status of the reporter.
$_prefixes array Store prefix by level for tree rendering.
$_time float Collect time.
$_verbosity The coverage verbosity.

Открытые методы

Метод Описание
__call ( string $name, array $args ) : mixed Delegates the call to the collector instance.
__construct ( array $config = [] ) The Constructor.
collector ( ) : object Gets the collector.
disable ( ) Disables this reporter.
enable ( ) Gets this reporter.
enabled ( ) : boolean Gets the status of the reporter.
metrics ( ) Gets the metrics about the coverage result.
specEnd ( object $log = null ) Callback called after a spec execution.
specStart ( object $spec = null ) Callback called on a spec start.
start ( array $args ) Callback called before any specs processing.
stop ( object $summary ) Callback called at the end of the process.

Защищенные методы

Метод Описание
_getMetricsReport ( Metrics[] $children, $verbosity, array $depth, array $tab = 3, array &$maxWidth = null ) Extract some metrics reports to display according to a verbosity parameter.
_renderCoverage ( Metrics $metrics ) Outputs the coverage report of a metrics instance.
_renderMetrics ( Metrics $metrics, $verbosity ) Outputs some metrics info where the metric is not the total coverage.
_renderMetricsReport ( array $metricsReport, array $labelWidth, array $lineWidth, array $depth ) Outputs some metrics reports built using ::_getMetricsReport().
_style ( integer $percent ) Helper determinig a color from a coverage rate.

Описание методов

__call() публичный Метод

Delegates the call to the collector instance.
public __call ( string $name, array $args ) : mixed
$name string The function name.
$args array The arguments to pass to the function.
Результат mixed

__construct() публичный Метод

The Constructor.
public __construct ( array $config = [] )
$config array The config for the reporter, the options are: - `'verbosity`' _integer|string_: The verbosity level: - 1 : overall coverage value for the whole code. - 2 : overall coverage by namespaces. - 3 : overall coverage by classes. - 4 : overall coverage by methods and functions. - string : coverage for a fully namespaced (class/method/namespace) string.

_getMetricsReport() защищенный Метод

Extract some metrics reports to display according to a verbosity parameter.
protected _getMetricsReport ( Metrics[] $children, $verbosity, array $depth, array $tab = 3, array &$maxWidth = null )
$children Metrics[] A array of metrics.
$depth array The actual depth in the reporting.
$tab array The size of the tab used for lablels.
$maxWidth array Will contain the maximum width obtained for labels.

_renderCoverage() защищенный Метод

Outputs the coverage report of a metrics instance.
protected _renderCoverage ( Metrics $metrics )
$metrics Metrics A metrics instance.

_renderMetrics() защищенный Метод

Outputs some metrics info where the metric is not the total coverage.
protected _renderMetrics ( Metrics $metrics, $verbosity )
$metrics Metrics A metrics instance.

_renderMetricsReport() защищенный Метод

Outputs some metrics reports built using ::_getMetricsReport().
protected _renderMetricsReport ( array $metricsReport, array $labelWidth, array $lineWidth, array $depth )
$metricsReport array An array of nested metrics reports extracted according some verbosity.
$labelWidth array The width column of the label column used for padding.
$lineWidth array The width column of the covered lines data used for padding.
$depth array The actual depth in the reporting to build tree prefix.

_style() защищенный Метод

Helper determinig a color from a coverage rate.
protected _style ( integer $percent )
$percent integer The coverage rate in percent.

collector() публичный Метод

Gets the collector.
public collector ( ) : object
Результат object

disable() публичный Метод

Disables this reporter.
public disable ( )

enable() публичный Метод

Gets this reporter.
public enable ( )

enabled() публичный Метод

Gets the status of the reporter.
public enabled ( ) : boolean
Результат boolean $active

metrics() публичный Метод

Gets the metrics about the coverage result.
public metrics ( )

specEnd() публичный Метод

Callback called after a spec execution.
public specEnd ( object $log = null )
$log object The log object of the whole spec.

specStart() публичный Метод

Callback called on a spec start.
public specStart ( object $spec = null )
$spec object The spec object of the whole spec.

start() публичный Метод

Callback called before any specs processing.
public start ( array $args )
$args array The suite arguments.

stop() публичный Метод

Callback called at the end of the process.
public stop ( object $summary )
$summary object The execution summary instance.

Описание свойств

$_classes защищенное статическое свойство

Class dependencies.
protected static array $_classes
Результат array

$_collector защищенное свойство

Reference to the coverage collector driver.
protected $_collector

$_enabled защищенное свойство

Status of the reporter.
protected array $_enabled
Результат array

$_prefixes защищенное свойство

Store prefix by level for tree rendering.
protected array $_prefixes
Результат array

$_time защищенное свойство

Collect time.
protected float $_time
Результат float

$_verbosity защищенное свойство

The coverage verbosity.
protected $_verbosity