From 2c76140384cd247f526e19ccaf40a678cf7e05bd Mon Sep 17 00:00:00 2001 From: Andreas Hennings Date: Mon, 10 Jul 2023 21:48:17 +0200 Subject: [PATCH] Fix supertype condition in LoadIncludes. --- src/Rules/Drupal/LoadIncludes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Rules/Drupal/LoadIncludes.php b/src/Rules/Drupal/LoadIncludes.php index 30a1fab0..eedb264d 100644 --- a/src/Rules/Drupal/LoadIncludes.php +++ b/src/Rules/Drupal/LoadIncludes.php @@ -32,7 +32,7 @@ public function processNode(Node $node, Scope $scope): array } $type = $scope->getType($node->var); $moduleHandlerInterfaceType = new ObjectType(ModuleHandlerInterface::class); - if (!$type->isSuperTypeOf($moduleHandlerInterfaceType)->yes()) { + if (!$moduleHandlerInterfaceType->isSuperTypeOf($type)->yes()) { return []; }