From 9a9a90c4d80c79866d3e041535fd09b844c57543 Mon Sep 17 00:00:00 2001 From: Farhad Safarov Date: Fri, 10 Nov 2023 10:07:29 +0300 Subject: [PATCH] skip if container xml is not provided --- src/Handler/ContainerHandler.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Handler/ContainerHandler.php b/src/Handler/ContainerHandler.php index b49acbc..cdc19d0 100644 --- a/src/Handler/ContainerHandler.php +++ b/src/Handler/ContainerHandler.php @@ -169,6 +169,10 @@ public static function afterClassLikeVisit(AfterClassLikeVisitEvent $event) public static function afterCodebasePopulated(AfterCodebasePopulatedEvent $event): void { + if (null === self::$containerMeta) { + return; + } + $containerClassNames = array_map(function (string $className): string { return strtolower($className); }, self::$containerMeta->getClassNames());