Skip to content

Commit da6b43a

Browse files
committed
Declare new classes as final
1 parent 2cb425b commit da6b43a

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

src/AsyncEventDispatcher.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
use Psr\EventDispatcher\EventDispatcherInterface;
88
use Psr\EventDispatcher\ListenerProviderInterface;
99
use Psr\EventDispatcher\StoppableEventInterface;
10-
use React\EventLoop\Loop;
1110
use React\EventLoop\LoopInterface;
1211

13-
class AsyncEventDispatcher implements EventDispatcherInterface
12+
final class AsyncEventDispatcher implements EventDispatcherInterface
1413
{
1514
private ListenerProviderInterface $listenerProvider;
1615
private LoopInterface $loop;

src/Container/AsyncEventDispatcherFactory.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,12 @@
55
namespace Antidot\Event\Container;
66

77
use Antidot\Event\AsyncEventDispatcher;
8-
use Antidot\Event\EventDispatcher;
9-
use Antidot\Event\ListenerProvider;
108
use Psr\Container\ContainerInterface;
119
use Psr\EventDispatcher\EventDispatcherInterface;
1210
use Psr\EventDispatcher\ListenerProviderInterface;
1311
use React\EventLoop\Loop;
14-
use RuntimeException;
15-
use Throwable;
1612

17-
class AsyncEventDispatcherFactory
13+
final class AsyncEventDispatcherFactory
1814
{
1915
public function __invoke(ContainerInterface $container): EventDispatcherInterface
2016
{

test/AsyncEventDispatcherTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use React\EventLoop\Loop;
1111
use StdClass;
1212

13-
class AsyncEventDispatcherTest extends TestCase
13+
final class AsyncEventDispatcherTest extends TestCase
1414
{
1515
public function testItShouldDispatchEvents(): void
1616
{

test/Container/ListenerProviderFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use PHPUnit\Framework\TestCase;
1010
use Psr\Container\ContainerInterface;
1111

12-
class ListenerProviderFactoryTest extends TestCase
12+
final class ListenerProviderFactoryTest extends TestCase
1313
{
1414
public function testItShouldVConfigureListenerProviderFactory(): void
1515
{

0 commit comments

Comments
 (0)