From d3f277069694aad19d324a9f154b71121f4f8a18 Mon Sep 17 00:00:00 2001 From: Yurun Date: Thu, 18 Apr 2024 18:52:01 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20Swoole=20=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=9A=84=20Event::wait()=20=E8=AD=A6=E5=91=8A?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Components/swoole/tests/unit/Component/config/config.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Components/swoole/tests/unit/Component/config/config.php b/src/Components/swoole/tests/unit/Component/config/config.php index 65c5ddd297..8ff7620ff5 100644 --- a/src/Components/swoole/tests/unit/Component/config/config.php +++ b/src/Components/swoole/tests/unit/Component/config/config.php @@ -16,8 +16,9 @@ 'Imi\Swoole\Test\Component\Async', 'Imi\Swoole\Test\Component\Pool', ], - // 'ignoreNamespace' => [ - // ], + 'ignorePaths' => [ + \dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'test.php', + ], // 组件命名空间 'components' => [ From 721f718b0e7811ceb91ab84062df687f5b747bcf Mon Sep 17 00:00:00 2001 From: Yurun Date: Thu, 18 Apr 2024 19:00:28 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Util/DocBlock.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Util/DocBlock.php b/src/Util/DocBlock.php index e454bf7a21..5c5d29c371 100644 --- a/src/Util/DocBlock.php +++ b/src/Util/DocBlock.php @@ -4,8 +4,8 @@ namespace Imi\Util; -use phpDocumentor\Reflection\DocBlock as RealDocBlock; use phpDocumentor\Reflection\DocBlockFactory; +use phpDocumentor\Reflection\DocBlockFactoryInterface; use phpDocumentor\Reflection\Location; use phpDocumentor\Reflection\Types\Context; @@ -13,9 +13,9 @@ class DocBlock { use \Imi\Util\Traits\TStaticClass; - private static ?DocBlockFactory $factory = null; + private static ?DocBlockFactoryInterface $factory = null; - public static function getFactory(): DocBlockFactory + public static function getFactory(): DocBlockFactoryInterface { if (null === self::$factory) { @@ -28,7 +28,7 @@ public static function getFactory(): DocBlockFactory /** * @param object|string $docblock a string containing the DocBlock to parse or an object supporting the getDocComment method (such as a ReflectionClass object) */ - public static function getDocBlock($docblock, ?Context $context = null, ?Location $location = null): RealDocBlock + public static function getDocBlock($docblock, ?Context $context = null, ?Location $location = null): DocBlockFactoryInterface { return self::getFactory()->create($docblock, $context, $location); } From 91863b4599c422a556b14982ebb075c8bc753188 Mon Sep 17 00:00:00 2001 From: Yurun Date: Thu, 18 Apr 2024 20:17:29 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Util/DocBlock.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Util/DocBlock.php b/src/Util/DocBlock.php index 5c5d29c371..295190c9c9 100644 --- a/src/Util/DocBlock.php +++ b/src/Util/DocBlock.php @@ -4,8 +4,8 @@ namespace Imi\Util; +use phpDocumentor\Reflection\DocBlock as RealDocBlock; use phpDocumentor\Reflection\DocBlockFactory; -use phpDocumentor\Reflection\DocBlockFactoryInterface; use phpDocumentor\Reflection\Location; use phpDocumentor\Reflection\Types\Context; @@ -13,13 +13,14 @@ class DocBlock { use \Imi\Util\Traits\TStaticClass; - private static ?DocBlockFactoryInterface $factory = null; + private static ?DocBlockFactory $factory = null; - public static function getFactory(): DocBlockFactoryInterface + public static function getFactory(): DocBlockFactory { if (null === self::$factory) { - self::$factory = DocBlockFactory::createInstance(); + // @phpstan-ignore-next-line + return self::$factory = DocBlockFactory::createInstance(); } return self::$factory; @@ -28,7 +29,7 @@ public static function getFactory(): DocBlockFactoryInterface /** * @param object|string $docblock a string containing the DocBlock to parse or an object supporting the getDocComment method (such as a ReflectionClass object) */ - public static function getDocBlock($docblock, ?Context $context = null, ?Location $location = null): DocBlockFactoryInterface + public static function getDocBlock($docblock, ?Context $context = null, ?Location $location = null): RealDocBlock { return self::getFactory()->create($docblock, $context, $location); }