Documentation

PHP_CodeCoverage_Report_Factory
in package

Factory for PHP_CodeCoverage_Report_Node_* object graphs.

Tags
since

Class available since Release 1.1.0

Table of Contents

create()  : PHP_CodeCoverage_Report_Node_Directory
addItems()  : mixed
buildDirectoryStructure()  : array<string|int, mixed>
Builds an array representation of the directory structure.
reducePaths()  : string
Reduces the paths by cutting the longest common start path.

Methods

buildDirectoryStructure()

Builds an array representation of the directory structure.

private buildDirectoryStructure(array<string|int, mixed> $files) : array<string|int, mixed>

For instance,

Array ( [Money.php] => Array ( ... )
[MoneyBag.php] => Array
    (
        ...
    )

)

is transformed into

Array ( [.] => Array ( [Money.php] => Array ( ... )
        [MoneyBag.php] => Array
            (
                ...
            )
    )

)

Parameters
$files : array<string|int, mixed>
Return values
array<string|int, mixed>

reducePaths()

Reduces the paths by cutting the longest common start path.

private reducePaths(array<string|int, mixed> &$files) : string

For instance,

Array ( [/home/sb/Money/Money.php] => Array ( ... )
[/home/sb/Money/MoneyBag.php] => Array
    (
        ...
    )

)

is reduced to

Array ( [Money.php] => Array ( ... )
[MoneyBag.php] => Array
    (
        ...
    )

)

Parameters
$files : array<string|int, mixed>
Return values
string

Search results