Skip to content

fix: TrailingCommaInMultilineFixer - handle trailing comma in language constructs #9522

fix: TrailingCommaInMultilineFixer - handle trailing comma in language constructs

fix: TrailingCommaInMultilineFixer - handle trailing comma in language constructs #9522

Triggered via pull request May 7, 2024 00:04
Status Success
Total duration 6m 11s
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#L156
Escaped Mutant for Mutator "LogicalAnd": --- 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, T_ISSET, T_UNSET, T_LIST]))) { + if ($fixParameters && ($tokens[$prevIndex]->isGivenKind(T_STRING) || $tokens[$prevPrevIndex]->isGivenKind(T_FUNCTION) || $tokens[$prevIndex]->isGivenKind([T_FN, T_FUNCTION, T_ISSET, T_UNSET, T_LIST]))) { $this->fixBlock($tokens, $index); } if ($fixMatch && $tokens[$prevIndex]->isGivenKind(T_MATCH)) {
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, T_ISSET, T_UNSET, T_LIST]))) { + if ($fixParameters && (!($tokens[$prevIndex]->isGivenKind(T_STRING) && $tokens[$prevPrevIndex]->isGivenKind(T_FUNCTION)) || !$tokens[$prevIndex]->isGivenKind([T_FN, T_FUNCTION, T_ISSET, T_UNSET, T_LIST]))) { $this->fixBlock($tokens, $index); } if ($fixMatch && $tokens[$prevIndex]->isGivenKind(T_MATCH)) {