Lggr
Public Member Functions | Protected Member Functions | List of all members
SebastianBergmann\CodeCoverage\CodeCoverage Class Reference

Public Member Functions

 __construct (Driver $driver=null, Filter $filter=null)
 
 getReport ()
 
 clear ()
 
 filter ()
 
 getData ($raw=false)
 
 setData (array $data)
 
 getTests ()
 
 setTests (array $tests)
 
 start ($id, $clear=false)
 
 stop ($append=true, $linesToBeCovered=[], array $linesToBeUsed=[], $ignoreForceCoversAnnotation=false)
 
 append (array $data, $id=null, $append=true, $linesToBeCovered=[], array $linesToBeUsed=[], $ignoreForceCoversAnnotation=false)
 
 merge (self $that)
 
 setCacheTokens ($flag)
 
 getCacheTokens ()
 
 setCheckForUnintentionallyCoveredCode ($flag)
 
 setForceCoversAnnotation ($flag)
 
 setCheckForMissingCoversAnnotation ($flag)
 
 setCheckForUnexecutedCoveredCode ($flag)
 
 setMapTestClassNameToCoveredClassName ($flag)
 
 setAddUncoveredFilesFromWhitelist ($flag)
 
 setProcessUncoveredFilesFromWhitelist ($flag)
 
 setDisableIgnoredLines ($flag)
 
 setIgnoreDeprecatedCode ($flag)
 
 setUnintentionallyCoveredSubclassesWhitelist (array $whitelist)
 

Protected Member Functions

 initializeData ()
 

Detailed Description

Provides collection functionality for PHP code coverage information.

Constructor & Destructor Documentation

◆ __construct()

SebastianBergmann\CodeCoverage\CodeCoverage::__construct ( Driver  $driver = null,
Filter  $filter = null 
)

Constructor.

Parameters
Driver$driver
Filter$filter
Exceptions
RuntimeException

Member Function Documentation

◆ append()

SebastianBergmann\CodeCoverage\CodeCoverage::append ( array  $data,
  $id = null,
  $append = true,
  $linesToBeCovered = [],
array  $linesToBeUsed = [],
  $ignoreForceCoversAnnotation = false 
)

Appends code coverage data.

Parameters
array$data
mixed$id
bool$append
mixed$linesToBeCovered
array$linesToBeUsed
bool$ignoreForceCoversAnnotation
Exceptions

◆ clear()

SebastianBergmann\CodeCoverage\CodeCoverage::clear ( )

Clears collected code coverage data.

◆ filter()

SebastianBergmann\CodeCoverage\CodeCoverage::filter ( )

Returns the filter object used.

Returns
Filter

◆ getCacheTokens()

SebastianBergmann\CodeCoverage\CodeCoverage::getCacheTokens ( )
Returns
bool

◆ getData()

SebastianBergmann\CodeCoverage\CodeCoverage::getData (   $raw = false)

Returns the collected code coverage data. Set $raw = true to bypass all filters.

Parameters
bool$raw
Returns
array

◆ getReport()

SebastianBergmann\CodeCoverage\CodeCoverage::getReport ( )

Returns the code coverage information as a graph of node objects.

Returns
Directory

◆ getTests()

SebastianBergmann\CodeCoverage\CodeCoverage::getTests ( )

Returns the test data.

Returns
array

◆ initializeData()

SebastianBergmann\CodeCoverage\CodeCoverage::initializeData ( )
protected

If we are processing uncovered files from whitelist, we can initialize the data before we start to speed up the tests

Exceptions

◆ merge()

SebastianBergmann\CodeCoverage\CodeCoverage::merge ( self  $that)

Merges the data from another instance.

Parameters
CodeCoverage$that

◆ setAddUncoveredFilesFromWhitelist()

SebastianBergmann\CodeCoverage\CodeCoverage::setAddUncoveredFilesFromWhitelist (   $flag)
Parameters
bool$flag
Exceptions
InvalidArgumentException

◆ setCacheTokens()

SebastianBergmann\CodeCoverage\CodeCoverage::setCacheTokens (   $flag)
Parameters
bool$flag
Exceptions
InvalidArgumentException

◆ setCheckForMissingCoversAnnotation()

SebastianBergmann\CodeCoverage\CodeCoverage::setCheckForMissingCoversAnnotation (   $flag)
Parameters
bool$flag
Exceptions
InvalidArgumentException

◆ setCheckForUnexecutedCoveredCode()

SebastianBergmann\CodeCoverage\CodeCoverage::setCheckForUnexecutedCoveredCode (   $flag)
Parameters
bool$flag
Exceptions
InvalidArgumentException

◆ setCheckForUnintentionallyCoveredCode()

SebastianBergmann\CodeCoverage\CodeCoverage::setCheckForUnintentionallyCoveredCode (   $flag)
Parameters
bool$flag
Exceptions
InvalidArgumentException

◆ setData()

SebastianBergmann\CodeCoverage\CodeCoverage::setData ( array  $data)

Sets the coverage data.

Parameters
array$data

◆ setDisableIgnoredLines()

SebastianBergmann\CodeCoverage\CodeCoverage::setDisableIgnoredLines (   $flag)
Parameters
bool$flag
Exceptions
InvalidArgumentException

◆ setForceCoversAnnotation()

SebastianBergmann\CodeCoverage\CodeCoverage::setForceCoversAnnotation (   $flag)
Parameters
bool$flag
Exceptions
InvalidArgumentException

◆ setIgnoreDeprecatedCode()

SebastianBergmann\CodeCoverage\CodeCoverage::setIgnoreDeprecatedCode (   $flag)
Parameters
bool$flag
Exceptions
InvalidArgumentException

◆ setMapTestClassNameToCoveredClassName()

SebastianBergmann\CodeCoverage\CodeCoverage::setMapTestClassNameToCoveredClassName (   $flag)
Deprecated:
Parameters
bool$flag
Exceptions
InvalidArgumentException

◆ setProcessUncoveredFilesFromWhitelist()

SebastianBergmann\CodeCoverage\CodeCoverage::setProcessUncoveredFilesFromWhitelist (   $flag)
Parameters
bool$flag
Exceptions
InvalidArgumentException

◆ setTests()

SebastianBergmann\CodeCoverage\CodeCoverage::setTests ( array  $tests)

Sets the test data.

Parameters
array$tests

◆ setUnintentionallyCoveredSubclassesWhitelist()

SebastianBergmann\CodeCoverage\CodeCoverage::setUnintentionallyCoveredSubclassesWhitelist ( array  $whitelist)
Parameters
array$whitelist

◆ start()

SebastianBergmann\CodeCoverage\CodeCoverage::start (   $id,
  $clear = false 
)

Start collection of code coverage information.

Parameters
mixed$id
bool$clear
Exceptions
InvalidArgumentException

◆ stop()

SebastianBergmann\CodeCoverage\CodeCoverage::stop (   $append = true,
  $linesToBeCovered = [],
array  $linesToBeUsed = [],
  $ignoreForceCoversAnnotation = false 
)

Stop collection of code coverage information.

Parameters
bool$append
mixed$linesToBeCovered
array$linesToBeUsed
bool$ignoreForceCoversAnnotation
Returns
array
Exceptions

The documentation for this class was generated from the following file: