Skip to content

Commit d2807e1

Browse files
Eliminate dead code.
1 parent 3217d22 commit d2807e1

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

PHP/CodeCoverage/Report/Node/File.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ protected function calculateStatistics()
509509
}
510510
}
511511

512-
foreach ($this->traits as $traitName => &$trait) {
512+
foreach ($this->traits as &$trait) {
513513
foreach ($trait['methods'] as &$method) {
514514
if ($method['executableLines'] > 0) {
515515
$method['coverage'] = ($method['executedLines'] /
@@ -541,7 +541,7 @@ protected function calculateStatistics()
541541
);
542542
}
543543

544-
foreach ($this->classes as $className => &$class) {
544+
foreach ($this->classes as &$class) {
545545
foreach ($class['methods'] as &$method) {
546546
if ($method['executableLines'] > 0) {
547547
$method['coverage'] = ($method['executedLines'] /

PHP/CodeCoverage/Report/Text.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,8 @@ public function __construct(PHPUnit_Util_Printer $outputStream, $title, $lowUppe
9191
*/
9292
public function process(PHP_CodeCoverage $coverage, $showColors = FALSE)
9393
{
94-
$output = '';
95-
$packages = array();
96-
$report = $coverage->getReport();
94+
$output = '';
95+
$report = $coverage->getReport();
9796
unset($coverage);
9897

9998
$colors = array(
@@ -159,7 +158,7 @@ public function process(PHP_CodeCoverage $coverage, $showColors = FALSE)
159158
$coveredClassStatements = 0;
160159
$coveredMethods = 0;
161160

162-
foreach ($class['methods'] as $methodName => $method) {
161+
foreach ($class['methods'] as $method) {
163162
$methodCount = 0;
164163
$methodLines = 0;
165164
$methodLinesCovered = 0;

0 commit comments

Comments
 (0)