Skip to content

fix: TrailingCommaInMultilineFixer - language constructs should be covered by arguments, not parameters #9529

fix: TrailingCommaInMultilineFixer - language constructs should be covered by arguments, not parameters

fix: TrailingCommaInMultilineFixer - language constructs should be covered by arguments, not parameters #9529

Triggered via pull request May 7, 2024 15:19
Status Success
Total duration 6m 24s
Artifacts

ci.yml

on: pull_request
Matrix: tests
Matrix: Deployment checks
Fit to window
Zoom out
Zoom in

Annotations

2 warnings
PHP 8.3 mutation tests: src/Fixer/ControlStructure/TrailingCommaInMultilineFixer.php#L145
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ continue; } $prevPrevIndex = $tokens->getPrevMeaningfulToken($prevIndex); - if ($fixArguments && $tokens[$prevIndex]->equalsAny([']', [T_CLASS], [T_STRING], [T_VARIABLE], [T_STATIC], [T_ISSET], [T_UNSET], [T_LIST]]) && !$tokens[$prevPrevIndex]->isGivenKind(T_FUNCTION)) { + if ($fixArguments && $tokens[$prevIndex]->equalsAny([[T_CLASS], [T_STRING], [T_VARIABLE], [T_STATIC], [T_ISSET], [T_UNSET], [T_LIST]]) && !$tokens[$prevPrevIndex]->isGivenKind(T_FUNCTION)) { $this->fixBlock($tokens, $index); continue; }
PHP 8.3 mutation tests: src/Fixer/ControlStructure/TrailingCommaInMultilineFixer.php#L156
Escaped Mutant for Mutator "LogicalOrAllSubExprNegation": --- Original +++ New @@ @@ $this->fixBlock($tokens, $index); continue; } - if ($fixParameters && ($tokens[$prevIndex]->isGivenKind(T_STRING) && $tokens[$prevPrevIndex]->isGivenKind(T_FUNCTION) || $tokens[$prevIndex]->isGivenKind([T_FN, T_FUNCTION]))) { + if ($fixParameters && (!($tokens[$prevIndex]->isGivenKind(T_STRING) && $tokens[$prevPrevIndex]->isGivenKind(T_FUNCTION)) || !$tokens[$prevIndex]->isGivenKind([T_FN, T_FUNCTION]))) { $this->fixBlock($tokens, $index); } if ($fixMatch && $tokens[$prevIndex]->isGivenKind(T_MATCH)) {