PHP 클래스 Mutagenesis\Mutation\MutationAbstract

파일 보기 프로젝트 열기: padraic/mutagenesis 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_filename string Name and relative path of the file being mutated
$_tokensMutated array Array of source code tokens after a mutation has been applied
$_tokensOriginal array Array of original source code tokens prior to mutation

공개 메소드들

메소드 설명
__construct ( string $filename = '' ) Constructor; sets name and relative path of the file being mutated
getDiff ( ) : string Calculate the unified diff between the original source code and its its mutated form
getFilename ( ) : string Return the file path of the file which is currently being assessed for mutations.
getMutation ( array $tokens, integer $index ) : array Get a new mutation as an array of changed tokens
mutate ( array $tokens, integer $index ) Perform a mutation against the given original source code tokens for a mutable element

보호된 메소드들

메소드 설명
_reconstructFromTokens ( array $tokens ) : string Reconstruct a new mutation into a source code string based on the returned tokens

메소드 상세

__construct() 공개 메소드

Constructor; sets name and relative path of the file being mutated
public __construct ( string $filename = '' )
$filename string

_reconstructFromTokens() 보호된 메소드

Reconstruct a new mutation into a source code string based on the returned tokens
protected _reconstructFromTokens ( array $tokens ) : string
$tokens array
리턴 string

getDiff() 공개 메소드

Calculate the unified diff between the original source code and its its mutated form
public getDiff ( ) : string
리턴 string

getFilename() 공개 메소드

Return the file path of the file which is currently being assessed for mutations.
public getFilename ( ) : string
리턴 string

getMutation() 추상적인 공개 메소드

Get a new mutation as an array of changed tokens
abstract public getMutation ( array $tokens, integer $index ) : array
$tokens array
$index integer
리턴 array

mutate() 공개 메소드

Perform a mutation against the given original source code tokens for a mutable element
public mutate ( array $tokens, integer $index )
$tokens array
$index integer

프로퍼티 상세

$_filename 보호되어 있는 프로퍼티

Name and relative path of the file being mutated
protected string $_filename
리턴 string

$_tokensMutated 보호되어 있는 프로퍼티

Array of source code tokens after a mutation has been applied
protected array $_tokensMutated
리턴 array

$_tokensOriginal 보호되어 있는 프로퍼티

Array of original source code tokens prior to mutation
protected array $_tokensOriginal
리턴 array