Permalink
Browse files

Cleanup.

  • Loading branch information...
sebastianbergmann committed Jan 14, 2010
1 parent 1226be2 commit 865413a6fbb7500608e1a1f134273381a38f0c54
Showing with 5 additions and 10 deletions.
  1. +5 −10 PHPUnit/Util/Metrics/File.php
@@ -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) {
@@ -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));
}
/**
@@ -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.