title | type | order |
---|---|---|
Profiles |
guide |
6 |
Infection supports the use of mutator profiles for the command line and configuration file.
The following configuration file will use the @default
profile, but turn off the @function_signature
profile.
On top of that, it does not apply the TrueValue
mutator on any classes that match the provided ignore patterns. In particular, TrueValue
mutator does not mutate the code inside Full\NameSpaced\Class
class and inside create()
method of all SourceClass
classes.
These ignores can also be added to profiles, to ensure infection is as flexible as you need it.
All profiles are prepended by an @
and in snake case, while all mutators are in PascalCase.
{
"source": {
"directories": [
"src"
]
},
"timeout": 10,
"logs": {
"text": "infection.log"
},
"mutators": {
"@default": true,
"@function_signature": false,
"TrueValue": {
"ignore": [
"NameSpace\\*\\SourceClass::method",
"Full\\NameSpaced\\Class"
]
}
}
}
Currently, infection supports the following profiles:
Contains the following mutators:
- Assignment
- AssignmentEqual
- BitwiseAnd
- BitwiseNot
- BitwiseOr
- BitwiseXor
- Decrement
- DivEqual
- Division
- Exponentiation
- Increment
- Minus
- MinusEqual
- ModEqual
- Modulus
- MulEqual
- Multiplication
- Plus
- PlusEqual
- PowEqual
- ShiftLeft
- ShiftRight
- RoundingFamily
Contains the following mutators:
- ArrayItem
- FalseValue
- IdenticalEqual
- LogicalAnd
- LogicalLowerAnd
- LogicalLowerOr
- LogicalNot
- LogicalOr
- NotIdenticalNotEqual
- TrueValue
- Yield_
Contains the following mutators:
Contains the following mutators:
Contains the following mutators:
- Equal
- GreaterThanNegotiation
- GreaterThanOrEqualToNegotiation
- Identical
- LessThanNegotiation
- LessThanOrEqualToNegotiation
- NotEqual
- NotIdentical
Contains the following mutators:
Contains the following mutators:
Contains the following mutators:
Contains the following mutators:
Contains the following mutators:
Contains the following mutators:
Contains the following mutators:
Contains the following mutators:
Contains the following mutators:
Contains the following mutators:
- UnwrapArrayChangeKeyCase
- UnwrapArrayChunk
- UnwrapArrayColumn
- UnwrapArrayCombine
- UnwrapArrayDiff
- UnwrapArrayDiffAssoc
- UnwrapArrayDiffKey
- UnwrapArrayDiffUassoc
- UnwrapArrayDiffUkey
- UnwrapArrayFilter
- UnwrapArrayFlip
- UnwrapArrayIntersect
- UnwrapArrayIntersectKey
- UnwrapArrayIntersectUassoc
- UnwrapArrayIntersectUkey
- UnwrapArrayKeys
- UnwrapArrayMap
- UnwrapArrayMerge
- UnwrapArrayMergeRecursive
- UnwrapArrayReduce
- UnwrapArrayReplace
- UnwrapArrayReplaceRecursive
- UnwrapArrayReverse
- UnwrapArraySlice
- UnwrapArraySplice
- UnwrapArrayUdiff
- UnwrapArrayUdiffAssoc
- UnwrapArrayUdiffUassoc
- UnwrapArrayUintersect
- UnwrapArrayUintersectAssoc
- UnwrapArrayUintersectUassoc
- UnwrapArrayUnique
- UnwrapArrayValues
- UnwrapLcFirst
- UnwrapStrRepeat
- UnwrapStrToLower
- UnwrapStrToUpper
- UnwrapTrim
- UnwrapUcFirst
- UnwrapUcWords
Contains the following mutators:
This is the default profile, which currently contains most mutators, and is used if no mutator or profile is chosen.
Feel free to request a new profile to be added in Github's issues.