cvs: pear /PHPUnit2/Util/CodeCoverage/Renderer Text.php

From: Date: Mon, 27 Feb 2006 10:16:29 +0000
Subject: cvs: pear /PHPUnit2/Util/CodeCoverage/Renderer Text.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38678@lists.php.net to get a copy of this message
sebastian Mon Feb 27 10:16:29 2006 UTC Modified files: /pear/PHPUnit2/Util/CodeCoverage/Renderer Text.php Log: Sync. http://cvs.php.net/viewcvs.cgi/pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php?r1=1.17&r2=1.18&diff_format=u Index: pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php diff -u pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php:1.17 pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php:1.18 --- pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php:1.17 Mon Feb 27 10:12:23 2006 +++ pear/PHPUnit2/Util/CodeCoverage/Renderer/Text.php Mon Feb 27 10:16:29 2006 @@ -41,7 +41,7 @@ * @author Sebastian Bergmann <sb@sebastian-bergmann.de> * @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de> * @license http://www.opensource.org/licenses/bsd-license.php BSD License - * @version CVS: $Id: Text.php,v 1.17 2006/02/27 10:12:23 sebastian Exp $ + * @version CVS: $Id: Text.php,v 1.18 2006/02/27 10:16:29 sebastian Exp $ * @link http://pear.php.net/package/PHPUnit2 * @since File available since Release 2.3.0 */ @@ -77,11 +77,11 @@ { $buffer = ''; - foreach ($this->getSummary() as $sourceFile => $executedLines) { - if (file_exists($sourceFile)) { - $buffer .= $this->startSourceFile($sourceFile); - $buffer .= $this->renderSourceFile(file($sourceFile), $executedLines); - $buffer .= $this->endSourceFile($sourceFile); + foreach ($this->getSummary() as $file => $lines) { + if (file_exists($file)) { + $buffer .= $this->startSourceFile($file); + $buffer .= $this->renderSourceFile(file($file), $lines); + $buffer .= $this->endSourceFile($file); } } @@ -96,21 +96,21 @@ } /** - * @param string $sourceFile + * @param string $file * @return string * @access protected */ - protected function startSourceFile($sourceFile) + protected function startSourceFile($file) { - return ' ' . $sourceFile . "\n\n"; + return ' ' . $file . "\n\n"; } /** - * @param string $sourceFile + * @param string $file * @return string * @access protected */ - protected function endSourceFile($sourceFile) + protected function endSourceFile($file) { return "\n"; } @@ -130,7 +130,7 @@ $flag = '-'; if (isset($executedLines[$line])) { - if ($executedLines[$line] > 0) { + if (sizeof($executedLines[$line]) > 0) { $flag = '+'; } else { $flag = '#';

« previous php.pear.cvs (#38678) next »