Свойство | Тип | Описание | |
---|---|---|---|
$_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 |
public __construct ( string $filename = '' ) | ||
$filename | string |
protected _reconstructFromTokens ( array $tokens ) : string | ||
$tokens | array | |
Результат | string |
public getFilename ( ) : string | ||
Результат | string |
protected string $_filename | ||
Результат | string |
protected array $_tokensMutated | ||
Результат | array |
protected array $_tokensOriginal | ||
Результат | array |