From a56ccbd1f8cdf4e107563a09cf2d7a1f8c19f18c Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 26 Mar 2025 15:34:43 +0200 Subject: [PATCH] fix phpstan weird error --- application/Espo/Core/Container.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/application/Espo/Core/Container.php b/application/Espo/Core/Container.php index c461641780..438031cecb 100644 --- a/application/Espo/Core/Container.php +++ b/application/Espo/Core/Container.php @@ -187,13 +187,19 @@ class Container implements ContainerInterface } if ($id === self::ID_CONTAINER) { - $this->classCache[$id] = new ReflectionClass(Container::class); + /** @var ReflectionClass $object */ + $object = new ReflectionClass(Container::class); + + $this->classCache[$id] = $object; return; } if ($id === self::ID_INJECTABLE_FACTORY) { - $this->classCache[$id] = new ReflectionClass(InjectableFactory::class); + /** @var ReflectionClass $object */ + $object = new ReflectionClass(InjectableFactory::class); + + $this->classCache[$id] = $object; return; }