# classes/phing/tasks/ext/coverage/CoverageReportTask.php

## \CoverageReportTask
jump to top

Transforms information in a code coverage database to XML

Use {@link Project#createTask} to register a new Task.

Extends from
  \Task
author
  Michiel Rook
copyright
  2001,2002 THYRELL. All rights reserved
package
  phing.tasks.ext.coverage
since
  2.1.0
version
  $Id: CoverageReportTask.php 1289 2011-08-19 07:55:37Z mrook $

### Properties

`$classpath= 'NULL'`

the classpath to use (optional)

Default value `NULL` Details

Type

`$geshilanguagespath= ''`

the path to the GeSHi language files (optional)

Details

Type

`$geshipath= ''`

the path to the GeSHi library (optional)

Details

Type

`$outfile= 'coverage.xml'`
Default value `coverage.xml` Details

Type

`$transformers= 'array'`
Default value `array` Details

Type

### Methods

`__construct( ) :`
`addClassToPackage( $classname, $element ) :`
Parameters

Name | Type | Description
--- | --- | ---
$classname |  |
$element |  |

`addClassToSubpackage( string $classname, \DOMNode $element ) : void`
Adds a class to their subpackage
Parameters

Name | Type | Description
--- | --- | ---
$classname | string | The name of the class
$element | \DOMNode | The dom node to append to the subpackage element

Details

author
  Benjamin Schultz

`addSubpackageToPackage( string $packageName, string $subpackageName ) : void`
Adds a subpackage to their package
Parameters

Name | Type | Description
--- | --- | ---
$packageName | string | The name of the package
$subpackageName | string | The name of the subpackage

Details

author
  Benjamin Schultz

`calculateStatistics( ) :`
`createClasspath( ) :`
`createReport( ) :`
Generate a report based on the XML created by this task
`getPackageElement( $packageName ) :`
Parameters

Name | Type | Description
--- | --- | ---
$packageName |  |

`getSubpackageElement( string $subpackageName ) : \DOMNode|null`
Returns the subpackage element
Parameters

Name | Type | Description
--- | --- | ---
$subpackageName | string | The name of the subpackage

Returns

Type | Description
--- | ---
\DOMNodenull |

Details

author
  Benjamin Schultz

`highlightSourceFile( $filename ) :`
Parameters

Name | Type | Description
--- | --- | ---
$filename |  |

`main( ) :`
`setClasspath( $classpath ) :`
Parameters

Name | Type | Description
--- | --- | ---
$classpath |  |

`setGeshiLanguagesPath( $path ) :`
Parameters

Name | Type | Description
--- | --- | ---
$path |  |

`setGeshiPath( $path ) :`
Parameters

Name | Type | Description
--- | --- | ---
$path |  |

`setOutfile( $outfile ) :`
Parameters

Name | Type | Description
--- | --- | ---
$outfile |  |

`stripDiv( $source ) :`
Parameters

Name | Type | Description
--- | --- | ---
$source |  |

`transformCoverageInformation( string $filename, array $coverageInformation ) : void`
Transforms the coverage information
Parameters

Name | Type | Description
--- | --- | ---
$filename | string | The filename
$coverageInformation | array | Array with covergae information

Details

author
  Michiel Rook
author
  Benjamin Schultz

`transformSourceFile( $filename, $coverageInformation, $classStartLine = 1 ) :`
Parameters

Name | Type | Description
--- | --- | ---
$filename |  |
$coverageInformation |  |
$classStartLine |  |

Documentation was generated by DocBlox 0.13.1.