fix: ConstantCaseFixer
- do not change namespace
#9584
Annotations
2 warnings
PHP 8.3 mutation tests:
src/Fixer/Casing/ConstantCaseFixer.php#L103
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
}
$prevIndex = $tokens->getPrevMeaningfulToken($index);
if ($tokens[$prevIndex]->isGivenKind($forbiddenPrevKinds)) {
- continue;
+ break;
}
$nextIndex = $tokens->getNextMeaningfulToken($index);
if ($tokens[$nextIndex]->isGivenKind(T_PAAMAYIM_NEKUDOTAYIM) || $tokens[$nextIndex]->equalsAny(['='], false)) {
|
PHP 8.3 mutation tests:
src/Fixer/Casing/ConstantCaseFixer.php#L107
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
continue;
}
$nextIndex = $tokens->getNextMeaningfulToken($index);
- if ($tokens[$nextIndex]->isGivenKind(T_PAAMAYIM_NEKUDOTAYIM) || $tokens[$nextIndex]->equalsAny(['='], false)) {
+ if ($tokens[$nextIndex]->isGivenKind(T_PAAMAYIM_NEKUDOTAYIM) || $tokens[$nextIndex]->equalsAny(['='], true)) {
continue;
}
if ($tokens[$prevIndex]->isGivenKind(T_CASE) && $tokens[$nextIndex]->equals(';')) {
|