From 78474ddaae36ed5e481e4e2757af58cd3bdbed6a Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Tue, 7 Jan 2025 18:40:03 +0800 Subject: [PATCH] Update infection builder --- infection.json5 | 12 ++++++++++-- tools/src/InfectionConfigBuilder.php | 24 ++++++++++++++++++++---- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/infection.json5 b/infection.json5 index 35d6687..43eb18c 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, @@ -138,7 +142,11 @@ "SpreadRemoval": true, "Ternary": true, "This": true, - "Throw_": true, + "Throw_": { + "ignore": [ + "Nexus\\Encryption\\Key::__unserialize" + ] + }, "TrueValue": { "ignore": [ "Nexus\\Collection\\Collection::generateDiffHashTable" diff --git a/tools/src/InfectionConfigBuilder.php b/tools/src/InfectionConfigBuilder.php index 469165c..eb82378 100644 --- a/tools/src/InfectionConfigBuilder.php +++ b/tools/src/InfectionConfigBuilder.php @@ -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; /** @@ -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', ],