Skip to content

Commit

Permalink
Temporarily remove enum based checks from CompareClasses to see how i…
Browse files Browse the repository at this point in the history
…nfection results are affected
  • Loading branch information
bdsl committed May 19, 2024
1 parent 9f2820b commit 0460dbf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/CompareClasses.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Psl\Regex;
use Psl\Str;
use Roave\BackwardCompatibility\DetectChanges\BCBreak\ClassBased\ClassBased;
use Roave\BackwardCompatibility\DetectChanges\BCBreak\EnumBased\EnumBased;
use Roave\BackwardCompatibility\DetectChanges\BCBreak\InterfaceBased\InterfaceBased;
use Roave\BackwardCompatibility\DetectChanges\BCBreak\TraitBased\TraitBased;
use Roave\BetterReflection\Reflection\ReflectionClass;
Expand All @@ -21,7 +20,8 @@ public function __construct(
private ClassBased $classBasedComparisons,
private InterfaceBased $interfaceBasedComparisons,
private TraitBased $traitBasedComparisons,
private EnumBased|null $enumBasedComparisons = null, // optional argument for now to avoid BC break
// $enumBasedComparisons temporarily removed to see how it affects infection results
// private EnumBased|null $enumBasedComparisons = null, // optional argument for now to avoid BC break
) {
}

Expand Down Expand Up @@ -91,11 +91,11 @@ private function examineSymbol(
return;
}

if ($oldSymbol->isEnum() && $this->enumBasedComparisons) {
yield from ($this->enumBasedComparisons)($oldSymbol, $newClass);

return;
}
// if ($oldSymbol->isEnum() && $this->enumBasedComparisons) {
// yield from ($this->enumBasedComparisons)($oldSymbol, $newClass);
//
// return;
// }

yield from ($this->classBasedComparisons)($oldSymbol, $newClass);
}
Expand Down

0 comments on commit 0460dbf

Please sign in to comment.