From 7fe26c5dcb276ced248f284c03e234f73f3bf44d Mon Sep 17 00:00:00 2001 From: "philipp.feigl" Date: Wed, 13 Apr 2011 20:16:47 +0200 Subject: [PATCH 1/2] Enabled combination of forceCoversAnnotation and processUncoveredFilesFromWhitelist --- PHP/CodeCoverage.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/PHP/CodeCoverage.php b/PHP/CodeCoverage.php index fb4980755..94cd8935f 100644 --- a/PHP/CodeCoverage.php +++ b/PHP/CodeCoverage.php @@ -435,7 +435,13 @@ protected function applyCoversAnnotationFilter(&$data, $id) } else if ($this->forceCoversAnnotation) { - $data = array(); + if($this->processUncoveredFilesFromWhitelist) { + foreach(array_keys($data) as $filename) { + $data[$filename] = array(); + } + } else { + $data = array(); + } } } From 5127445995f3a9cc743dd5a763db208c5d180a0a Mon Sep 17 00:00:00 2001 From: "philipp.feigl" Date: Wed, 13 Apr 2011 20:41:20 +0200 Subject: [PATCH 2/2] indentation changed from tabs to spaces. aligned with codeing guidelines. --- PHP/CodeCoverage.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/PHP/CodeCoverage.php b/PHP/CodeCoverage.php index 94cd8935f..c81ba137f 100644 --- a/PHP/CodeCoverage.php +++ b/PHP/CodeCoverage.php @@ -435,13 +435,13 @@ protected function applyCoversAnnotationFilter(&$data, $id) } else if ($this->forceCoversAnnotation) { - if($this->processUncoveredFilesFromWhitelist) { - foreach(array_keys($data) as $filename) { - $data[$filename] = array(); - } - } else { - $data = array(); - } + if ($this->processUncoveredFilesFromWhitelist) { + foreach (array_keys($data) as $filename) { + $data[$filename] = array(); + } + } else { + $data = array(); + } } }