Skip to content

Do not mutate $var instanceof ClassName inside assert() function as it's impossible or hard to kill #885

Do not mutate $var instanceof ClassName inside assert() function as it's impossible or hard to kill

Do not mutate $var instanceof ClassName inside assert() function as it's impossible or hard to kill #885

Triggered via pull request May 11, 2023 19:47
Status Success
Total duration 2m 48s
Artifacts

mt-annotations.yaml

on: pull_request
Matrix: tests
Annotations Status
0s
Annotations Status
Fit to window
Zoom out
Zoom in

Annotations

1 warning
Mutation Testing Code Review Annotations 8.1: src/Mutator/Boolean/InstanceOf_.php#L100
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ { $parentNode = ParentConnector::findParent($node); $grandParentNode = $parentNode !== null ? ParentConnector::findParent($parentNode) : null; - if (!$grandParentNode instanceof Node\Expr\FuncCall || !$grandParentNode->name instanceof Node\Name) { + if (!$grandParentNode instanceof Node\Expr\FuncCall || !true) { return false; } return $grandParentNode->name->toLowerString() === 'assert'; } }