[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/tests_runner/lib/spikephpcoverage/src/reporter/ -> CoverageReporter.php (summary)

The base class for reporting coverage. This is an abstract as it does not implement the generateReport() function. Every concrete subclass must implement this method to generate a report.

Author: Nimish Pachapurkar <npac@spikesource.com>
Version: $Revision: 14665 $
File Size: 301 lines (10 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 16 functions

  __construct()
  createReportDir()
  updateGrandTotals()
  getGrandCodeCoveragePercentage()
  getFileCoverageInfo()
  recordFileCoverageInfo()
  printTextSummary()
  makeRelative()
  getRelativeOutputDirPath()
  setHeading()
  getHeading()
  setStyle()
  getStyle()
  setOutputDir()
  getOutputDir()
  setCoverageRecorder()

Functions
Functions that are not part of a class:

__construct($heading="Coverage Report",$style="",$dir="report")   X-Ref
The constructor (PHP5 compatible)

param: $heading
param: $style
param: $dir

createReportDir()   X-Ref
Create the report directory if it does not exists


updateGrandTotals(&$coverageCounts)   X-Ref
Update the grand totals

param: &$coverageCounts Coverage counts for a file

getGrandCodeCoveragePercentage()   X-Ref
Returns Overall Code Coverage percentage

return: double Code Coverage percentage rounded to two decimals

getFileCoverageInfo()   X-Ref
Return the array containing file coverage information.

The array returned contains following fields
* filename: Name of the file
* total: Total number of lines in that file
* covered: Total number of executed lines in that file
* uncovered: Total number of executable lines that were not executed.

return: array Array of file coverage information

recordFileCoverageInfo(&$fileCoverage)   X-Ref
Record the file coverage information for a file.

param: &$fileCoverage Coverage information for a file

printTextSummary($filename=false)   X-Ref
Print the coverage summary to filename (if specified) or stderr

param: $filename=false Filename to write the log to

makeRelative($filepath)   X-Ref
Convert the absolute path to PHP file markup to a path relative
to the report dir.

param: $filepath PHP markup file path
return: Relative file path

getRelativeOutputDirPath($filepath)   X-Ref
Get the relative path of report directory with respect to the given
filepath

param: $filepath Path of the file (relative to the report dir)
return: String Relative path of report directory w.r.t. filepath

setHeading($heading)   X-Ref
No description

getHeading()   X-Ref
No description

setStyle($style)   X-Ref
No description

getStyle()   X-Ref
No description

setOutputDir($dir)   X-Ref
No description

getOutputDir()   X-Ref
No description

setCoverageRecorder(&$recorder)   X-Ref
No description



Generated: Tue Dec 2 03:54:09 2008 Cross-referenced by PHPXref 0.7