PHP Class Mutagenesis\Generator

Datei anzeigen Open project: padraic/mutagenesis Class Usage Examples

Protected Properties

Property Type Description
$_files array Collated files against which mutations can be generated
$_mutables Mutable[] The collection of possible mutations stored as sets of mutation instructions (allowing us to apply and reverse mutations on the fly)
$_sourceDirectory string Path to the source directory of the project being mutated

Public Methods

Method Description
generate ( $mutableObject = null ) : void Given a source directory (@see \Mutagenesis\Generator::setSourceDirectory) pass each to a \Mutagenesis\Mutable instance which is used to generate mutations and store the instructions for applying and reversing them as a set of mutables (instances of \Mutagenesis\Mutation).
getFiles ( ) : array Return collated files against which mutations can be generated.
getMutables ( ) : Mutable[] Return an array of mutable files.
getSourceDirectory ( ) : string Get the source directory of the source code to be mutated
setSourceDirectory ( string $sourceDirectory ) Set the source directory of the source code to be mutated

Protected Methods

Method Description
_collateFiles ( $target ) : void Collate all files capable of being mutated. For now, this only considers files ending in the PHP extension.

Method Details

_collateFiles() protected method

Collate all files capable of being mutated. For now, this only considers files ending in the PHP extension.
protected _collateFiles ( $target ) : void
return void

generate() public method

Given a source directory (@see \Mutagenesis\Generator::setSourceDirectory) pass each to a \Mutagenesis\Mutable instance which is used to generate mutations and store the instructions for applying and reversing them as a set of mutables (instances of \Mutagenesis\Mutation).
public generate ( $mutableObject = null ) : void
return void

getFiles() public method

Return collated files against which mutations can be generated.
public getFiles ( ) : array
return array

getMutables() public method

Return an array of mutable files.
public getMutables ( ) : Mutable[]
return Mutable[]

getSourceDirectory() public method

Get the source directory of the source code to be mutated
public getSourceDirectory ( ) : string
return string

setSourceDirectory() public method

Set the source directory of the source code to be mutated
public setSourceDirectory ( string $sourceDirectory )
$sourceDirectory string

Property Details

$_files protected_oe property

Collated files against which mutations can be generated
protected array $_files
return array

$_mutables protected_oe property

The collection of possible mutations stored as sets of mutation instructions (allowing us to apply and reverse mutations on the fly)
protected Mutable[],Mutagenesis $_mutables
return Mutable[]

$_sourceDirectory protected_oe property

Path to the source directory of the project being mutated
protected string $_sourceDirectory
return string