Do not mutate $var instanceof ClassName
inside assert()
function as it's impossible or hard to kill
#885
mt-annotations.yaml
on: pull_request
Matrix: tests
Annotations Status
0s
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';
}
}
|