Passed
Pull Request — master (#19)
by Alex
02:24
created
src/Resolver/EventNameResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 final class EventNameResolver implements EventNameResolverInterface
8 8
 {
9
-    public function resolveEventName(string|object $event): string
9
+    public function resolveEventName(string | object $event): string
10 10
     {
11 11
         if (is_string($event)) {
12 12
             return $event;
Please login to merge, or discard this patch.
src/Resolver/EventNameResolverInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,5 +11,5 @@
 block discarded – undo
11 11
     /**
12 12
      * @throws EventNameResolverException  If the provided $event is not a string or object.
13 13
      */
14
-    public function resolveEventName(string|object $event): string;
14
+    public function resolveEventName(string | object $event): string;
15 15
 }
Please login to merge, or discard this patch.
src/EventDispatcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     /**
19 19
      * @throws EventListenerException
20 20
      */
21
-    public function addListenerForEvent(object|string $event, callable $listener, int $priority = 1): void
21
+    public function addListenerForEvent(object | string $event, callable $listener, int $priority = 1): void
22 22
     {
23 23
         $this->listenerProvider->addListenerForEvent($event, $listener, $priority);
24 24
     }
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     /**
27 27
      * @throws EventListenerException
28 28
      */
29
-    public function addListenersForEvent(string|object $event, iterable $listeners, int $priority = 1): void
29
+    public function addListenersForEvent(string | object $event, iterable $listeners, int $priority = 1): void
30 30
     {
31 31
         $this->listenerProvider->addListenersForEvent($event, $listeners, $priority);
32 32
     }
Please login to merge, or discard this patch.
src/Listener/AddListenerAwareInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,10 +11,10 @@
 block discarded – undo
11 11
     /**
12 12
      * @throws EventListenerException
13 13
      */
14
-    public function addListenerForEvent(object|string $event, callable $listener, int $priority = 1): void;
14
+    public function addListenerForEvent(object | string $event, callable $listener, int $priority = 1): void;
15 15
 
16 16
     /**
17 17
      * @throws EventListenerException
18 18
      */
19
-    public function addListenersForEvent(object|string $event, iterable $listeners, int $priority = 1): void;
19
+    public function addListenersForEvent(object | string $event, iterable $listeners, int $priority = 1): void;
20 20
 }
Please login to merge, or discard this patch.
src/Listener/LazyListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
     private string $listenerMethodName = '__invoke';
16 16
 
17 17
     public function __construct(
18
-        callable|object $factory,
18
+        callable | object $factory,
19 19
         ?string $factoryMethodName = null,
20 20
         ?string $listenerMethodName = null,
21 21
     ) {
Please login to merge, or discard this patch.
src/Listener/ListenerProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     /**
37 37
      * @throws EventListenerException
38 38
      */
39
-    public function addListenerForEvent(object|string $event, callable $listener, int $priority = 1): void
39
+    public function addListenerForEvent(object | string $event, callable $listener, int $priority = 1): void
40 40
     {
41 41
         $this->getOrCreateListenerCollection($event)->addListener($listener, $priority);
42 42
     }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     /**
45 45
      * @throws EventListenerException  If the $event name cannot be resolved.
46 46
      */
47
-    public function addListenersForEvent(object|string $event, iterable $listeners, int $priority = 1): void
47
+    public function addListenersForEvent(object | string $event, iterable $listeners, int $priority = 1): void
48 48
     {
49 49
         $this->getOrCreateListenerCollection($event)->addListeners($listeners, $priority);
50 50
     }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     /**
63 63
      * @throws EventListenerException
64 64
      */
65
-    private function getOrCreateListenerCollection(string|object $event): ListenerCollectionInterface
65
+    private function getOrCreateListenerCollection(string | object $event): ListenerCollectionInterface
66 66
     {
67 67
         try {
68 68
             $eventName = $this->eventNameResolver->resolveEventName($event);
Please login to merge, or discard this patch.