Passed
Push — main ( e35566...4791be )
by Olivier
01:32
created
src/ListenerProviderFilter.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,9 @@
 block discarded – undo
49 49
     public function getListenersForEvent(object $event): iterable
50 50
     {
51 51
         foreach ($this->decorated->getListenersForEvent($event) as $listener) {
52
-            if (($this->discriminator)($event, $listener)) yield $listener;
52
+            if (($this->discriminator)($event, $listener)) {
53
+                yield $listener;
54
+            }
53 55
         }
54 56
     }
55 57
 }
Please login to merge, or discard this patch.
src/MutableListenerProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
 
78 78
     private function makeRemoveCallback(string $eventType, callable $listener): callable
79 79
     {
80
-        return function () use ($eventType, $listener) {
80
+        return function() use ($eventType, $listener) {
81 81
             $key = array_search($listener, $this->listeners[$eventType], true);
82 82
 
83 83
             if ($key === false) {
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,9 @@
 block discarded – undo
30 30
     public function getListenersForEvent(object $event): iterable
31 31
     {
32 32
         foreach ($this->listeners as $class => $listeners) {
33
-            if ($event instanceof $class) foreach ($listeners as $listener) yield $listener;
33
+            if ($event instanceof $class) {
34
+                foreach ($listeners as $listener) yield $listener;
35
+            }
34 36
         }
35 37
     }
36 38
 
Please login to merge, or discard this patch.
src/ListenerProviderWithContainer.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,9 @@
 block discarded – undo
44 44
     public function getListenersForEvent(object $event): iterable
45 45
     {
46 46
         foreach ($this->listeners as $class => $listeners) {
47
-            if ($event instanceof $class) foreach ($listeners as $listener) yield $this->container->get($listener);
47
+            if ($event instanceof $class) {
48
+                foreach ($listeners as $listener) yield $this->container->get($listener);
49
+            }
48 50
         }
49 51
     }
50 52
 }
Please login to merge, or discard this patch.
src/Symfony/ListenerProviderPass.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     public function process(ContainerBuilder $container): void
60 60
     {
61 61
         foreach ($this->providerIterator($container) as $id => $listenerTag) {
62
-            [ $mapping, $refMap ] = $this->collectListeners($container, $listenerTag);
62
+            [$mapping, $refMap] = $this->collectListeners($container, $listenerTag);
63 63
 
64 64
             $container
65 65
                 ->getDefinition($id)
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 
216 216
         usort(
217 217
             $ids,
218
-            function (string $a, string $b) use ($positions, $priorities): int {
218
+            function(string $a, string $b) use ($positions, $priorities): int {
219 219
                 $pa = $priorities[$a];
220 220
                 $pb = $priorities[$b];
221 221
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -153,11 +153,12 @@
 block discarded – undo
153 153
     {
154 154
         $priority = $tag[self::ATTRIBUTE_PRIORITY] ?? self::DEFAULT_PRIORITY;
155 155
 
156
-        if ($priority !== self::PRIORITY_FIRST && $priority !== self::PRIORITY_LAST && !is_int($priority))
157
-        throw new InvalidArgumentException(
156
+        if ($priority !== self::PRIORITY_FIRST && $priority !== self::PRIORITY_LAST && !is_int($priority)) {
157
+                throw new InvalidArgumentException(
158 158
             "Invalid priority value for listener '$id': $priority."
159 159
             ." Valid values are 'first', 'last', or an integer."
160 160
         );
161
+        }
161 162
 
162 163
         return $priority;
163 164
     }
Please login to merge, or discard this patch.
src/ListenerProviderChain.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,9 @@
 block discarded – undo
62 62
     public function getListenersForEvent(object $event): iterable
63 63
     {
64 64
         foreach ($this->providers as $provider) {
65
-            foreach ($provider->getListenersForEvent($event) as $listener) yield $listener;
65
+            foreach ($provider->getListenersForEvent($event) as $listener) {
66
+                yield $listener;
67
+            }
66 68
         }
67 69
     }
68 70
 }
Please login to merge, or discard this patch.
src/ListenerProviderWithMap.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,9 @@
 block discarded – undo
37 37
     public function getListenersForEvent(object $event): iterable
38 38
     {
39 39
         foreach ($this->listeners as $class => $listeners) {
40
-            if ($event instanceof $class) foreach ($listeners as $listener) yield $listener;
40
+            if ($event instanceof $class) {
41
+                foreach ($listeners as $listener) yield $listener;
42
+            }
41 43
         }
42 44
     }
43 45
 }
Please login to merge, or discard this patch.