From 96b58ed88726709282de9d057f3fd9915180b898 Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Wed, 8 Jan 2025 01:21:38 +0800 Subject: [PATCH] Add `PbkdfHash::verify()` to ignored in infection --- infection.json5 | 6 +++++- tools/src/InfectionConfigBuilder.php | 20 ++++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/infection.json5 b/infection.json5 index c31c3cb..a3ad793 100644 --- a/infection.json5 +++ b/infection.json5 @@ -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, diff --git a/tools/src/InfectionConfigBuilder.php b/tools/src/InfectionConfigBuilder.php index eed3832..ee7ede0 100644 --- a/tools/src/InfectionConfigBuilder.php +++ b/tools/src/InfectionConfigBuilder.php @@ -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; /** @@ -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', ],