# tasks/ext/coverage/CoverageReportTask.php

$Id: CoverageReportTask.php 1289 2011-08-19 07:55:37Z mrook $

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This software consists of voluntary contributions made by many individuals and is licensed under the LGPL. For more information please see http://phing.info.

## \CoverageReportTask
jump to top

Package: phing\tasks\ext\coverage

Transforms information in a code coverage database to XML

Parent(s)
  \Task < \ProjectComponent
Author
  Michiel Rook
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
  n/a

`$geshilanguagespath= '""'`

the path to the GeSHi language files (optional)

Default value`""`Details

Type
  n/a

`$geshipath= '""'`

the path to the GeSHi library (optional)

Default value`""`Details

Type
  n/a

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

Type
  n/a

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

Type
  n/a

### Methods

`__construct( ) : void`

`addClassToPackage( $classname, $element ) : void`

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( ) : void`

`createClasspath( ) : void`

`createReport( ) : void`

Generate a report based on the XML created by this task

`getDescription( ) : void`

`getLocation( ) : void`

`getOwningTarget( ) : void`

`getPackageElement( $packageName ) : void`

Parameters

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

`getProject( ) : void`

`getRegisterSlot( ) : void`

`getRuntimeConfigurableWrapper( ) : void`

`getSubpackageElement( string $subpackageName ) : \DOMNode | null`

Returns the subpackage element

Parameters

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

Returns

Type | Description
--- | ---
\DOMNode | null | null when no DOMNode with the given name exists

Details

Author
  Benjamin Schultz

`getTaskName( ) : void`

`getTaskType( ) : void`

`highlightSourceFile( $filename ) : void`

Parameters

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

`init( ) : void`

`log( ) : void`

`main( ) : void`

`maybeConfigure( ) : void`

`perform( ) : void`

`setClasspath( $classpath ) : void`

Parameters

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

`setDescription( ) : void`

`setGeshiLanguagesPath( $path ) : void`

Parameters

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

`setGeshiPath( $path ) : void`

Parameters

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

`setLocation( ) : void`

`setOutfile( $outfile ) : void`

Parameters

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

`setOwningTarget( ) : void`

`setProject( ) : void`

`setRuntimeConfigurableWrapper( ) : void`

`setTaskName( ) : void`

`setTaskType( ) : void`

`stripDiv( $source ) : void`

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 ) : void`

Parameters

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

Documentation was generated by DocBlox 0.17.1.