From e1f76a476ed811a553b1cb7832f153bf7aa9bef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 31 Jul 2023 23:08:59 +0800 Subject: [PATCH] qqq --- Container.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Container.php b/Container.php index 2fd5739..36e295e 100644 --- a/Container.php +++ b/Container.php @@ -10,6 +10,7 @@ declare(strict_types=1); namespace Kiri\Di; +use Exception; use Kiri\Di\Interface\InjectProxyInterface; use Kiri\Router\Interface\ValidatorInterface; use Psr\Container\ContainerInterface; @@ -53,6 +54,9 @@ class Container implements ContainerInterface private static self|null $container = null; + /** + * + */ private function __construct() { } @@ -74,7 +78,7 @@ class Container implements ContainerInterface * @param string $id * @return mixed * @throws ReflectionException - * @throws \Exception + * @throws Exception */ public function get(string $id): object { @@ -87,7 +91,7 @@ class Container implements ContainerInterface } $this->_singletons[$id] = $this->make($id); if (!$this->_singletons[$id]) { - throw new \Exception('Class that cannot be instantiated。'); + throw new Exception('Class that cannot be instantiated。'); } } return $this->_singletons[$id];