Skip to content

Commit

Permalink
Add PbkdfHash::verify() to ignored in infection
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Jan 7, 2025
1 parent be9a15e commit 96b58ed
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
6 changes: 5 additions & 1 deletion 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
20 changes: 16 additions & 4 deletions tools/src/InfectionConfigBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Infection\Mutator\ProfileList;
use Nexus\Clock\SystemClock;
use Nexus\Collection\Collection;
use Nexus\Password\Hash\Pbkdf2Hash;
use Nexus\Password\Hash\SodiumHash;

/**
Expand Down Expand Up @@ -63,13 +64,24 @@ 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,
],
'TrueValue' => [
Collection::class.'::generateDiffHashTable',
],
Expand Down

0 comments on commit 96b58ed

Please sign in to comment.