diff --git a/src/Psalm/Checker/FunctionLikeChecker.php b/src/Psalm/Checker/FunctionLikeChecker.php index 8d2c67bf4..27d34e341 100644 --- a/src/Psalm/Checker/FunctionLikeChecker.php +++ b/src/Psalm/Checker/FunctionLikeChecker.php @@ -238,10 +238,11 @@ abstract class FunctionLikeChecker extends SourceChecker implements StatementsSo $or_null_implemented_type->types['null'] = new Type\Atomic\TNull; } - if ($class_storage->user_defined - && (string)$storage->params[$i]->signature_type !== (string)$implemented_param->signature_type - && (string)$storage->params[$i]->signature_type !== (string)$or_null_implemented_type + && (string)$storage->params[$i]->signature_type + !== (string)$implemented_param->signature_type + && (string)$storage->params[$i]->signature_type + !== (string)$or_null_implemented_type ) { $cased_method_id = MethodChecker::getCasedMethodId( $project_checker,