From 8ccfe00b0f787cf5365dbcf63a0ad62f102b6c08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 31 Aug 2020 23:00:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http-server/Route/Router.php | 4 ++-- system/Annotation/Annotation.php | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/http-server/Route/Router.php b/http-server/Route/Router.php index 4c7786fe..a7c6a48b 100644 --- a/http-server/Route/Router.php +++ b/http-server/Route/Router.php @@ -502,7 +502,7 @@ class Router extends Application implements RouterInterface /** * @param $file * @throws ReflectionException - * @throws NotFindClassException + * @throws Exception */ private function loadFile($file) { @@ -511,7 +511,7 @@ class Router extends Application implements RouterInterface $prefix = APP_PATH . 'app/Http/'; /** @var Annotation $annotation */ - $annotation = Snowflake::createObject(Annotation::class); + $annotation = make(Annotation::class, Annotation::class); $annotation->registration_notes($prefix . 'Interceptor', 'App\Http\Interceptor'); $annotation->registration_notes($prefix . 'Limits', 'App\Http\Limits'); diff --git a/system/Annotation/Annotation.php b/system/Annotation/Annotation.php index cafb5b1a..ba92299b 100644 --- a/system/Annotation/Annotation.php +++ b/system/Annotation/Annotation.php @@ -6,7 +6,6 @@ namespace Snowflake\Annotation; use Exception; use ReflectionClass; use ReflectionException; -use ReflectionMethod; use Snowflake\Abstracts\BaseAnnotation; use Snowflake\Exception\NotFindClassException; use Snowflake\Snowflake;