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

Propertyprivate\Path  $_classpath= 'null'

Holds an optional classpath

Default valuenullDetails
Type
\Path
Propertyprivate\PhingFile  $_database= 'null'

Holds an optional database file

Default valuenullDetails
Type
\PhingFile
Propertyprivate\Excludes  $_excludes= 'null'

Holds the exclusions

Default valuenullDetails
Type
\Excludes
Propertyprivateinteger  $_minClassCoverageFound= 'null'

Holds the minimum found coverage value for a class

Default valuenullDetails
Type
integer
Propertyprivateinteger  $_minMethodCoverageFound= 'null'

Holds the minimum found coverage value for a method

Default valuenullDetails
Type
integer
Propertyprivateinteger  $_perClass= '25'

Holds the coverage threshold for any class

Default value25Details
Type
integer
Propertyprivateinteger  $_perMethod= '25'

Holds the coverage threshold for any method

Default value25Details
Type
integer
Propertyprivateinteger  $_perProject= '25'

Holds the coverage threshold for the entire project

Default value25Details
Type
integer
Propertyprivateinteger  $_projectStatementCount= '0'

Number of statements in the entire project

Default value0Details
Type
integer
Propertyprivateinteger  $_projectStatementsCovered= '0'

Number of covered statements in the entire project

Default value0Details
Type
integer
Propertyprivateboolean  $_verbose= 'false'

Whether to enable detailed logging

Default valuefalseDetails
Type
boolean

Methods

methodprotected  calculateCoverageThreshold( string $filename, array $coverageInformation ) :
Calculates the coverage threshold
Parameters
Name Type Description
$filename string The filename to analyse
$coverageInformation array Array with coverage information
methodpublic  createClasspath( ) : \Path
Create classpath object
Returns
Type Description
\Path
methodpublic  createExcludes( ) : \Excludes
Create excludes object
Returns
Type Description
\Excludes
methodprotected  filterCovered( integer $var ) : boolean
Filter covered statements
Parameters
Name Type Description
$var integer

Coverage CODE/count

Returns
Type Description
boolean
methodpublic  main( ) :
methodpublic  setClasspath( \Path $classpath ) :
Sets an optional classpath
Parameters
Name Type Description
$classpath \Path The classpath
methodpublic  setDatabase( \PhingFile $database ) :
Sets the optional coverage database to use
Parameters
Name Type Description
$database \PhingFile The database file
methodpublic  setPerClass( integer $threshold ) :
Sets the coverage threshold for any class
Parameters
Name Type Description
$threshold integer Coverage threshold for any class
methodpublic  setPerMethod( integer $threshold ) :
Sets the coverage threshold for any method
Parameters
Name Type Description
$threshold integer Coverage threshold for any method
methodpublic  setPerProject( integer $threshold ) :
Sets the coverage threshold for entire project
Parameters
Name Type Description
$threshold integer Coverage threshold for entire project
methodpublic  setVerbose( boolean $verbose ) :
Sets whether to enable detailed logging or not
Parameters
Name Type Description
$verbose boolean
Documentation was generated by DocBlox 0.13.1.