Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jan 14, 2010
1 parent 1226be2 commit 865413a
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions PHPUnit/Util/Metrics/File.php
Expand Up @@ -96,7 +96,10 @@ protected function __construct($filename, &$codeCoverage = array())

$this->filename = $filename;

$this->countLines();
foreach (PHPUnit_Util_File::countLines($this->filename) as $name => $value) {
$this->$name = $value;
}

$this->setCoverage($codeCoverage);

foreach (PHPUnit_Util_File::getClassesInFile($filename) as $className => $class) {
Expand Down Expand Up @@ -219,7 +222,7 @@ public function getLines()
*/
public function getTokens()
{
return token_get_all(file_get_contents($this->filename));
return token_get_all(file_get_contents($this->filename));
}

/**
Expand Down Expand Up @@ -301,13 +304,5 @@ protected function calculateCodeCoverage(&$codeCoverage)
$this->locExecutable = $statistics['locExecutable'];
$this->locExecuted = $statistics['locExecuted'];
}

/**
*/
protected function countLines()
{
foreach (PHPUnit_Util_File::countLines($this->filename) as $name => $value)
$this->$name = $value;
}
}
?>

0 comments on commit 865413a

Please sign in to comment.