public function processNode(Node $node, Scope $scope) : array
{
if (!$node instanceof Node\Expr\BinaryOp\Identical && !$node instanceof Node\Expr\BinaryOp\NotIdentical) {
return [];
}
$leftType = $scope->getType($node->left);
$rightType = $scope->getType($node->right);
if ($leftType instanceof MixedType || $rightType instanceof MixedType || $leftType instanceof NullType || $rightType instanceof NullType) {
return [];
}
if (get_class($leftType) !== get_class($rightType)) {
return [sprintf('Strict comparison using %s between %s and %s will always evaluate to false.', $node instanceof Node\Expr\BinaryOp\Identical ? '===' : '!==', $leftType->describe(), $rightType->describe())];
}
return [];
}