本文整理汇总了PHP中PHP_CodeCoverage_Filter::isFiltered方法的典型用法代码示例。如果您正苦于以下问题:PHP PHP_CodeCoverage_Filter::isFiltered方法的具体用法?PHP PHP_CodeCoverage_Filter::isFiltered怎么用?PHP PHP_CodeCoverage_Filter::isFiltered使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHP_CodeCoverage_Filter
的用法示例。
在下文中一共展示了PHP_CodeCoverage_Filter::isFiltered方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: applyListsFilter
/**
* Applies the blacklist/whitelist filtering.
*
* @param array $data
* @param array $filterGroups
*/
protected function applyListsFilter(&$data, $filterGroups)
{
foreach (array_keys($data) as $filename) {
if ($this->filter->isFiltered($filename, $filterGroups)) {
unset($data[$filename]);
}
}
}
示例2: applyListsFilter
/**
* Applies the blacklist/whitelist filtering.
*
* @param array $data
*/
private function applyListsFilter(array &$data)
{
foreach (array_keys($data) as $filename) {
if ($this->filter->isFiltered($filename)) {
unset($data[$filename]);
}
}
}
示例3: filter
/**
* Performs blacklist and whitelist as well as @codeCoverageIgnore* filtering.
*
* @param array $data
*/
private function filter(array &$data)
{
foreach (array_keys($data) as $filename) {
if ($this->filter->isFiltered($filename)) {
unset($data[$filename]);
continue;
}
foreach ($this->parser->getLinesToBeIgnored($filename) as $line) {
unset($data[$filename][$line]);
}
if (empty($data[$filename])) {
unset($data[$filename]);
}
}
}
示例4: merge
/**
* Merges the data from another instance of PHP_CodeCoverage.
*
* @param PHP_CodeCoverage $that
*/
public function merge(PHP_CodeCoverage $that)
{
foreach ($that->data as $file => $lines) {
if (!isset($this->data[$file])) {
if (!$this->filter->isFiltered($file)) {
$this->data[$file] = $lines;
}
continue;
}
foreach ($lines as $line => $data) {
if ($data !== null) {
if (!isset($this->data[$file][$line])) {
$this->data[$file][$line] = $data;
} else {
$this->data[$file][$line] = array_unique(array_merge($this->data[$file][$line], $data));
}
}
}
}
$this->tests = array_merge($this->tests, $that->getTests());
}