Skip to content

TypeDoesNotContainType

A type check can never be true because the type does not include the tested type.

<?php
function handle(int $n): void {
if ($n instanceof stdClass) { // int can never be stdClass
// unreachable
}
}

Remove the impossible check or correct the type of the variable.