From 3e0b5f53d413c424941eb9b0e6f452e7419a4d56 Mon Sep 17 00:00:00 2001 From: ADmad Date: Mon, 19 Sep 2022 08:35:26 +0530 Subject: [PATCH] Fix errors reported by phpstan. --- ObjectRegistry.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ObjectRegistry.php b/ObjectRegistry.php index 891d15b21..07c759ba0 100644 --- a/ObjectRegistry.php +++ b/ObjectRegistry.php @@ -39,7 +39,7 @@ * @see \Cake\Controller\ComponentRegistry * @see \Cake\View\HelperRegistry * @see \Cake\Console\TaskRegistry - * @template TObject + * @template TObject of object * @template-implements \IteratorAggregate */ abstract class ObjectRegistry implements Countable, IteratorAggregate @@ -104,10 +104,6 @@ public function load(string $name, array $config = []): object } } - /** - * @psalm-var TObject $instance - * @psalm-suppress PossiblyNullArgument - **/ $instance = $this->_create($className, $objName, $config); $this->_loaded[$objName] = $instance;