diff --git a/src/Annotation/Listener.php b/src/Annotation/Listener.php index 052d60b..17a95fd 100644 --- a/src/Annotation/Listener.php +++ b/src/Annotation/Listener.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Event\Annotation; use Attribute; diff --git a/src/ConfigProvider.php b/src/ConfigProvider.php index d70785b..23cb816 100644 --- a/src/ConfigProvider.php +++ b/src/ConfigProvider.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Event; use Psr\EventDispatcher\EventDispatcherInterface; diff --git a/src/Contract/ListenerInterface.php b/src/Contract/ListenerInterface.php index 5207120..2de8166 100644 --- a/src/Contract/ListenerInterface.php +++ b/src/Contract/ListenerInterface.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Event\Contract; interface ListenerInterface diff --git a/src/EventDispatcher.php b/src/EventDispatcher.php index 561acdf..c57b21b 100644 --- a/src/EventDispatcher.php +++ b/src/EventDispatcher.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Event; use Psr\EventDispatcher\EventDispatcherInterface; diff --git a/src/EventDispatcherFactory.php b/src/EventDispatcherFactory.php index 1ba8c9d..e0bc1ab 100644 --- a/src/EventDispatcherFactory.php +++ b/src/EventDispatcherFactory.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Event; use Hyperf\Contract\StdoutLoggerInterface; diff --git a/src/ListenerData.php b/src/ListenerData.php index 3926585..6e7765f 100644 --- a/src/ListenerData.php +++ b/src/ListenerData.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Event; class ListenerData diff --git a/src/ListenerProvider.php b/src/ListenerProvider.php index 64a394f..8931f19 100644 --- a/src/ListenerProvider.php +++ b/src/ListenerProvider.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Event; use Hyperf\Stdlib\SplPriorityQueue; diff --git a/src/ListenerProviderFactory.php b/src/ListenerProviderFactory.php index bbad012..d2fc776 100644 --- a/src/ListenerProviderFactory.php +++ b/src/ListenerProviderFactory.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Event; use Hyperf\Contract\ConfigInterface; diff --git a/src/Stoppable.php b/src/Stoppable.php index 4ba22a5..f9ea857 100644 --- a/src/Stoppable.php +++ b/src/Stoppable.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace Hyperf\Event; trait Stoppable diff --git a/tests/ConfigProviderTest.php b/tests/ConfigProviderTest.php index a77c5c8..1624dbc 100644 --- a/tests/ConfigProviderTest.php +++ b/tests/ConfigProviderTest.php @@ -9,11 +9,13 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace HyperfTest\Event; use Hyperf\Event\ConfigProvider; use Hyperf\Event\EventDispatcherFactory; use Hyperf\Event\ListenerProviderFactory; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Psr\EventDispatcher\EventDispatcherInterface; use Psr\EventDispatcher\ListenerProviderInterface; @@ -22,7 +24,7 @@ * @internal * @coversNothing */ -#[\PHPUnit\Framework\Attributes\CoversClass(\Hyperf\Event\ConfigProvider::class)] +#[CoversClass(ConfigProvider::class)] class ConfigProviderTest extends TestCase { public function testInvoke() diff --git a/tests/Event/Alpha.php b/tests/Event/Alpha.php index d159a13..005ce1a 100644 --- a/tests/Event/Alpha.php +++ b/tests/Event/Alpha.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace HyperfTest\Event\Event; use Hyperf\Event\Stoppable; diff --git a/tests/Event/Beta.php b/tests/Event/Beta.php index bc6a014..83db0d8 100644 --- a/tests/Event/Beta.php +++ b/tests/Event/Beta.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace HyperfTest\Event\Event; class Beta diff --git a/tests/Event/PriorityEvent.php b/tests/Event/PriorityEvent.php index 16a4bc3..dacfbbf 100644 --- a/tests/Event/PriorityEvent.php +++ b/tests/Event/PriorityEvent.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace HyperfTest\Event\Event; class PriorityEvent diff --git a/tests/EventDispatcherTest.php b/tests/EventDispatcherTest.php index b19ceae..5c32d6f 100644 --- a/tests/EventDispatcherTest.php +++ b/tests/EventDispatcherTest.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace HyperfTest\Event; use Hyperf\Config\Config; @@ -25,6 +26,7 @@ use HyperfTest\Event\Listener\PriorityListener; use Mockery; use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; +use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\TestCase; use Psr\Container\ContainerInterface; use Psr\EventDispatcher\EventDispatcherInterface; @@ -35,11 +37,7 @@ * @internal * @coversNothing */ -#[\PHPUnit\Framework\Attributes\CoversClass(\Hyperf\Event\EventDispatcher::class)] -/** - * @internal - * @coversNothing - */ +#[CoversClass(EventDispatcher::class)] class EventDispatcherTest extends TestCase { use MockeryPHPUnitIntegration; diff --git a/tests/Listener/AlphaListener.php b/tests/Listener/AlphaListener.php index 2a9dfa4..d20be3f 100644 --- a/tests/Listener/AlphaListener.php +++ b/tests/Listener/AlphaListener.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace HyperfTest\Event\Listener; use Hyperf\Event\Contract\ListenerInterface; diff --git a/tests/Listener/BetaListener.php b/tests/Listener/BetaListener.php index f5e6499..6243ef5 100644 --- a/tests/Listener/BetaListener.php +++ b/tests/Listener/BetaListener.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace HyperfTest\Event\Listener; use Hyperf\Event\Contract\ListenerInterface; diff --git a/tests/Listener/PriorityListener.php b/tests/Listener/PriorityListener.php index b0f0e56..8e04ca8 100644 --- a/tests/Listener/PriorityListener.php +++ b/tests/Listener/PriorityListener.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace HyperfTest\Event\Listener; use Hyperf\Event\Contract\ListenerInterface; diff --git a/tests/ListenerProviderTest.php b/tests/ListenerProviderTest.php index c053354..36f7945 100644 --- a/tests/ListenerProviderTest.php +++ b/tests/ListenerProviderTest.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace HyperfTest\Event; use Hyperf\Event\ListenerProvider; diff --git a/tests/ListenerTest.php b/tests/ListenerTest.php index 3a98f10..d840cff 100644 --- a/tests/ListenerTest.php +++ b/tests/ListenerTest.php @@ -9,6 +9,7 @@ * @contact group@hyperf.io * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ + namespace HyperfTest\Event; use Hyperf\Config\Config;