classes/phing/tasks/ext/coverage/CoverageThresholdTask.php
\CoverageThresholdTask
Stops the build if any of the specified coverage threshold was not reached
Use {@link Project#createTask} to register a new Task.
- Extends from
- \Task
- author
- Benjamin Schultz
- copyright
- 2001,2002 THYRELL. All rights reserved
- package
- phing.tasks.ext.coverage
- since
- 2.4.1
- version
- $Id: CoverageThresholdTask.php 1206 2011-07-03 22:46:44Z bschultz $
Properties

\PhingFile
$_database= 'null'
Holds an optional database file
nullDetails- Type
- \PhingFile

integer
$_minClassCoverageFound= 'null'
Holds the minimum found coverage value for a class
nullDetails- Type
- integer

integer
$_minMethodCoverageFound= 'null'
Holds the minimum found coverage value for a method
nullDetails- Type
- integer

integer
$_perClass= '25'
Holds the coverage threshold for any class
25Details- Type
- integer

integer
$_perMethod= '25'
Holds the coverage threshold for any method
25Details- Type
- integer

integer
$_perProject= '25'
Holds the coverage threshold for the entire project
25Details- Type
- integer

integer
$_projectStatementCount= '0'
Number of statements in the entire project
0Details- Type
- integer

integer
$_projectStatementsCovered= '0'
Number of covered statements in the entire project
0Details- Type
- integer
Methods

calculateCoverageThreshold(
string $filename, array $coverageInformation
)
:
Calculates the coverage threshold
| Name | Type | Description |
|---|---|---|
| $filename | string | The filename to analyse |
| $coverageInformation | array | Array with coverage information |

filterCovered(
integer $var
)
:
booleanFilter covered statements
| Name | Type | Description |
|---|---|---|
| $var | integer | Coverage CODE/count |
| Type | Description |
|---|---|
| boolean |

setClasspath(
\Path $classpath
)
:
Sets an optional classpath
| Name | Type | Description |
|---|---|---|
| $classpath | \Path | The classpath |

setDatabase(
\PhingFile $database
)
:
Sets the optional coverage database to use
| Name | Type | Description |
|---|---|---|
| $database | \PhingFile | The database file |

setPerClass(
integer $threshold
)
:
Sets the coverage threshold for any class
| Name | Type | Description |
|---|---|---|
| $threshold | integer | Coverage threshold for any class |

setPerMethod(
integer $threshold
)
:
Sets the coverage threshold for any method
| Name | Type | Description |
|---|---|---|
| $threshold | integer | Coverage threshold for any method |

setPerProject(
integer $threshold
)
:
Sets the coverage threshold for entire project
| Name | Type | Description |
|---|---|---|
| $threshold | integer | Coverage threshold for entire project |