Skip to content

Commit

Permalink
Update infection builder
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Jan 7, 2025
1 parent cd10d3a commit 78474dd
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
12 changes: 10 additions & 2 deletions infection.json5
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@
"LogicalAndSingleSubExprNegation": true,
"LogicalLowerAnd": true,
"LogicalLowerOr": true,
"LogicalNot": true,
"LogicalNot": {
"ignore": [
"Nexus\\Password\\Hash\\Pbkdf2Hash::verify"
]
},
"LogicalOr": true,
"LogicalOrAllSubExprNegation": true,
"LogicalOrNegation": true,
Expand Down Expand Up @@ -138,7 +142,11 @@
"SpreadRemoval": true,
"Ternary": true,
"This": true,
"Throw_": true,
"Throw_": {
"ignore": [
"Nexus\\Encryption\\Key::__unserialize"
]
},
"TrueValue": {
"ignore": [
"Nexus\\Collection\\Collection::generateDiffHashTable"
Expand Down
24 changes: 20 additions & 4 deletions tools/src/InfectionConfigBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
use Infection\Mutator\ProfileList;
use Nexus\Clock\SystemClock;
use Nexus\Collection\Collection;
use Nexus\Encryption\Key;
use Nexus\Password\Hash\Pbkdf2Hash;
use Nexus\Password\Hash\SodiumHash;

/**
Expand Down Expand Up @@ -64,13 +66,27 @@ final class InfectionConfigBuilder
Collection::class.'::filterWithKey',
Collection::class.'::reject',
],
'CastInt' => [SystemClock::class],
'CastInt' => [
SystemClock::class,
],
'CastString' => [
Collection::class.'::toArrayKey',
],
'Division' => [SystemClock::class],
'LogicalAnd' => [SodiumHash::class.'::valid'],
'ModEqual' => [SystemClock::class],
'Division' => [
SystemClock::class,
],
'LogicalAnd' => [
SodiumHash::class.'::valid',
],
'LogicalNot' => [
Pbkdf2Hash::class . '::verify'
],
'ModEqual' => [
SystemClock::class,
],
'Throw_' => [
Key::class.'::__unserialize',
],
'TrueValue' => [
Collection::class.'::generateDiffHashTable',
],
Expand Down

0 comments on commit 78474dd

Please sign in to comment.