Test Failed
Push — master ( 36aa92...0eef05 )
by butschster
06:52 queued 12s
created
src/Events/src/Processor/AttributeProcessor.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,29 +22,29 @@  discard block
 block discarded – undo
22 22
         private readonly ReaderInterface $reader,
23 23
         private readonly ListenerFactoryInterface $factory,
24 24
         private readonly ?ListenerRegistryInterface $registry = null,
25
-    ) {
25
+    ){
26 26
         // Look for Spiral\Events\Attribute\Listener attribute only when ListenerRegistry provided by container
27
-        if ($this->registry !== null) {
27
+        if ($this->registry !== null){
28 28
             $listenerRegistry->addListener($this);
29 29
         }
30 30
     }
31 31
 
32 32
     public function process(): void
33 33
     {
34
-        if ($this->registry === null) {
34
+        if ($this->registry === null){
35 35
             return;
36 36
         }
37 37
 
38
-        if (!$this->collected) {
38
+        if (!$this->collected){
39 39
             throw new \RuntimeException(\sprintf('Tokenizer did not finalize %s listener.', self::class));
40 40
         }
41 41
 
42
-        foreach ($this->attributes as $listener => $attributes) {
43
-            foreach ($attributes as $attribute) {
42
+        foreach ($this->attributes as $listener => $attributes){
43
+            foreach ($attributes as $attribute){
44 44
                 $method = $this->getMethod($listener, $attribute->method ?? '__invoke');
45 45
 
46 46
                 $events = (array)($attribute->event ?? $this->getEventFromTypeDeclaration($method));
47
-                foreach ($events as $event) {
47
+                foreach ($events as $event){
48 48
                     $this->registry->addListener(
49 49
                         event: $event,
50 50
                         listener: $this->factory->create($listener, $method->getName()),
@@ -59,14 +59,14 @@  discard block
 block discarded – undo
59 59
     {
60 60
         $attrs = $this->reader->getClassMetadata($class, Listener::class);
61 61
 
62
-        foreach ($attrs as $attr) {
62
+        foreach ($attrs as $attr){
63 63
             $this->attributes[$class->getName()][] = $attr;
64 64
         }
65 65
 
66
-        foreach ($class->getMethods() as $method) {
66
+        foreach ($class->getMethods() as $method){
67 67
             $attrs = $this->reader->getFunctionMetadata($method, Listener::class);
68 68
 
69
-            foreach ($attrs as $attr) {
69
+            foreach ($attrs as $attr){
70 70
                 $attr->method = $method->getName();
71 71
                 $this->attributes[$class->getName()][] = $attr;
72 72
             }
Please login to merge, or discard this patch.