Documentation

PHP_CodeCoverage_Filter
in package

Filter for blacklisting and whitelisting of code coverage information.

Tags
since

Class available since Release 1.0.0

Table of Contents

$blacklistedFiles  : array<string|int, mixed>
Source files that are blacklisted.
$whitelistedFiles  : array<string|int, mixed>
Source files that are whitelisted.
addDirectoryToBlacklist()  : mixed
Adds a directory to the blacklist (recursively).
addDirectoryToWhitelist()  : mixed
Adds a directory to the whitelist (recursively).
addFilesToBlacklist()  : mixed
Adds files to the blacklist.
addFilesToWhitelist()  : mixed
Adds files to the whitelist.
addFileToBlacklist()  : mixed
Adds a file to the blacklist.
addFileToWhitelist()  : mixed
Adds a file to the whitelist.
getBlacklist()  : array<string|int, mixed>
Returns the list of blacklisted files.
getBlacklistedFiles()  : array<string|int, mixed>
Returns the blacklisted files.
getWhitelist()  : array<string|int, mixed>
Returns the list of whitelisted files.
getWhitelistedFiles()  : array<string|int, mixed>
Returns the whitelisted files.
hasWhitelist()  : bool
Returns whether this filter has a whitelist.
isFile()  : bool
Checks whether a filename is a real filename.
isFiltered()  : bool
Checks whether or not a file is filtered.
removeDirectoryFromBlacklist()  : mixed
Removes a directory from the blacklist (recursively).
removeDirectoryFromWhitelist()  : mixed
Removes a directory from the whitelist (recursively).
removeFileFromBlacklist()  : mixed
Removes a file from the blacklist.
removeFileFromWhitelist()  : mixed
Removes a file from the whitelist.
setBlacklistedFiles()  : mixed
Sets the blacklisted files.
setWhitelistedFiles()  : mixed
Sets the whitelisted files.

Properties

$blacklistedFiles

Source files that are blacklisted.

private array<string|int, mixed> $blacklistedFiles = array()

$whitelistedFiles

Source files that are whitelisted.

private array<string|int, mixed> $whitelistedFiles = array()

Methods

addDirectoryToBlacklist()

Adds a directory to the blacklist (recursively).

public addDirectoryToBlacklist(string $directory[, string $suffix = '.php' ][, string $prefix = '' ]) : mixed
Parameters
$directory : string
$suffix : string = '.php'
$prefix : string = ''
Return values
mixed

addDirectoryToWhitelist()

Adds a directory to the whitelist (recursively).

public addDirectoryToWhitelist(string $directory[, string $suffix = '.php' ][, string $prefix = '' ]) : mixed
Parameters
$directory : string
$suffix : string = '.php'
$prefix : string = ''
Return values
mixed

addFilesToBlacklist()

Adds files to the blacklist.

public addFilesToBlacklist(array<string|int, mixed> $files) : mixed
Parameters
$files : array<string|int, mixed>
Return values
mixed

addFilesToWhitelist()

Adds files to the whitelist.

public addFilesToWhitelist(array<string|int, mixed> $files) : mixed
Parameters
$files : array<string|int, mixed>
Return values
mixed

addFileToBlacklist()

Adds a file to the blacklist.

public addFileToBlacklist(string $filename) : mixed
Parameters
$filename : string
Return values
mixed

addFileToWhitelist()

Adds a file to the whitelist.

public addFileToWhitelist(string $filename) : mixed
Parameters
$filename : string
Return values
mixed

getBlacklist()

Returns the list of blacklisted files.

public getBlacklist() : array<string|int, mixed>
Return values
array<string|int, mixed>

getBlacklistedFiles()

Returns the blacklisted files.

public getBlacklistedFiles() : array<string|int, mixed>
Tags
since

Method available since Release 2.0.0

Return values
array<string|int, mixed>

getWhitelist()

Returns the list of whitelisted files.

public getWhitelist() : array<string|int, mixed>
Return values
array<string|int, mixed>

getWhitelistedFiles()

Returns the whitelisted files.

public getWhitelistedFiles() : array<string|int, mixed>
Tags
since

Method available since Release 2.0.0

Return values
array<string|int, mixed>

hasWhitelist()

Returns whether this filter has a whitelist.

public hasWhitelist() : bool
Tags
since

Method available since Release 1.1.0

Return values
bool

isFile()

Checks whether a filename is a real filename.

public isFile(string $filename) : bool
Parameters
$filename : string
Return values
bool

isFiltered()

Checks whether or not a file is filtered.

public isFiltered(string $filename) : bool

When the whitelist is empty (default), blacklisting is used. When the whitelist is not empty, whitelisting is used.

Parameters
$filename : string
Tags
throws
PHP_CodeCoverage_Exception
Return values
bool

removeDirectoryFromBlacklist()

Removes a directory from the blacklist (recursively).

public removeDirectoryFromBlacklist(string $directory[, string $suffix = '.php' ][, string $prefix = '' ]) : mixed
Parameters
$directory : string
$suffix : string = '.php'
$prefix : string = ''
Return values
mixed

removeDirectoryFromWhitelist()

Removes a directory from the whitelist (recursively).

public removeDirectoryFromWhitelist(string $directory[, string $suffix = '.php' ][, string $prefix = '' ]) : mixed
Parameters
$directory : string
$suffix : string = '.php'
$prefix : string = ''
Return values
mixed

removeFileFromBlacklist()

Removes a file from the blacklist.

public removeFileFromBlacklist(string $filename) : mixed
Parameters
$filename : string
Return values
mixed

removeFileFromWhitelist()

Removes a file from the whitelist.

public removeFileFromWhitelist(string $filename) : mixed
Parameters
$filename : string
Return values
mixed

setBlacklistedFiles()

Sets the blacklisted files.

public setBlacklistedFiles(array<string|int, mixed> $blacklistedFiles) : mixed
Parameters
$blacklistedFiles : array<string|int, mixed>
Tags
since

Method available since Release 2.0.0

Return values
mixed

setWhitelistedFiles()

Sets the whitelisted files.

public setWhitelistedFiles(array<string|int, mixed> $whitelistedFiles) : mixed
Parameters
$whitelistedFiles : array<string|int, mixed>
Tags
since

Method available since Release 2.0.0

Return values
mixed

Search results