Skip to content

Commit 1e29ff7

Browse files
committed
add strict types to all properties
1 parent 68633c1 commit 1e29ff7

File tree

6 files changed

+9
-11
lines changed

6 files changed

+9
-11
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
}
1414
],
1515
"require": {
16-
"php": "^7.2.13",
16+
"php": "^7.4.0",
1717
"psr/event-dispatcher": "^1.0"
1818
},
1919
"require-dev": {
20-
"phpro/grumphp": "^0.15.0",
20+
"phpro/grumphp": "^0.17.1",
2121
"phpstan/phpstan": "^0.11.5",
2222
"phpunit/phpunit": "^8.0",
2323
"squizlabs/php_codesniffer": "^3.4",
@@ -48,7 +48,7 @@
4848
"sort-packages": true
4949
},
5050
"extra": {
51-
"zf": {
51+
"laminas": {
5252
"config-provider": "Antidot\\Event\\Container\\Config\\ConfigProvider"
5353
}
5454
}

src/Event.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
abstract class Event implements StoppableEventInterface
1010
{
11-
/** @var bool */
12-
protected $stopped;
11+
protected bool $stopped;
1312

1413
public function isPropagationStopped(): bool
1514
{

src/EventDispatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class EventDispatcher implements EventDispatcherInterface
1212
{
13-
private $listenerProvider;
13+
private ListenerProviderInterface $listenerProvider;
1414

1515
public function __construct(ListenerProviderInterface $listenerProvider)
1616
{

src/ListenerCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class ListenerCollection implements IteratorAggregate, ListenerCollectorInterface, ListenerLocatorInterface
1212
{
1313
/** @var array<string, array<int, callable>> */
14-
private $listeners;
14+
private array $listeners;
1515

1616
public function __construct()
1717
{

src/ListenerProvider.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44

55
namespace Antidot\Event;
66

7-
use function get_class;
87
use Psr\EventDispatcher\ListenerProviderInterface;
98
use Psr\EventDispatcher\StoppableEventInterface;
9+
use function get_class;
1010

1111
class ListenerProvider implements ListenerProviderInterface, ListenerCollectorInterface
1212
{
13-
/** @var ListenerCollection */
14-
private $listenerCollection;
13+
private ListenerCollection $listenerCollection;
1514

1615
public function __construct()
1716
{

test/Container/TestEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88

99
class TestEvent extends Event
1010
{
11-
protected $stopped = false;
11+
protected bool $stopped = false;
1212
}

0 commit comments

Comments
 (0)