tasks/ext/coverage/CoverageThresholdTask.php

Show: inherited
Table of Contents

$Id: CoverageThresholdTask.php 1206 2011-07-03 22:46:44Z bschultz $

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.

\CoverageThresholdTask

Package: phing\tasks\ext\coverage

Stops the build if any of the specified coverage threshold was not reached

Parent(s)
\Task < \ProjectComponent
Author
Benjamin Schultz  
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

methodprotectedcalculateCoverageThreshold( string $filename, array $coverageInformation ) : void

Calculates the coverage threshold

Parameters
Name Type Description
$filename string

The filename to analyse

$coverageInformation array

Array with coverage information

methodpubliccreateClasspath( ) : \Path

Create classpath object

Returns
Type Description
\Path
methodpubliccreateExcludes( ) : \Excludes

Create excludes object

Returns
Type Description
\Excludes
methodprotectedfilterCovered( integer $var ) : boolean

Filter covered statements

Parameters
Name Type Description
$var integer

Coverage CODE/count

Returns
Type Description
boolean
methodpublicgetDescription( ) : void

methodpublicgetLocation( ) : void

methodpublicgetOwningTarget( ) : void

methodpublicgetProject( ) : void

methodprotectedgetRegisterSlot( ) : void

methodpublicgetRuntimeConfigurableWrapper( ) : void

methodpublicgetTaskName( ) : void

methodpublicgetTaskType( ) : void

methodpublicinit( ) : void

methodpubliclog( ) : void

methodpublicmain( ) : void

methodpublicmaybeConfigure( ) : void

methodpublicperform( ) : void

methodpublicsetClasspath( \Path $classpath ) : void

Sets an optional classpath

Parameters
Name Type Description
$classpath \Path

The classpath

methodpublicsetDatabase( \PhingFile $database ) : void

Sets the optional coverage database to use

Parameters
Name Type Description
$database \PhingFile

The database file

methodpublicsetDescription( ) : void

methodpublicsetLocation( ) : void

methodpublicsetOwningTarget( ) : void

methodpublicsetPerClass( integer $threshold ) : void

Sets the coverage threshold for any class

Parameters
Name Type Description
$threshold integer

Coverage threshold for any class

methodpublicsetPerMethod( integer $threshold ) : void

Sets the coverage threshold for any method

Parameters
Name Type Description
$threshold integer

Coverage threshold for any method

methodpublicsetPerProject( integer $threshold ) : void

Sets the coverage threshold for entire project

Parameters
Name Type Description
$threshold integer

Coverage threshold for entire project

methodpublicsetProject( ) : void

methodpublicsetRuntimeConfigurableWrapper( ) : void

methodpublicsetTaskName( ) : void

methodpublicsetTaskType( ) : void

methodpublicsetVerbose( boolean $verbose ) : void

Sets whether to enable detailed logging or not

Parameters
Name Type Description
$verbose boolean
Documentation was generated by DocBlox 0.17.1.