Passed
Push — master ( 420cd3...a67a18 )
by butschster
06:03 queued 19s
created
src/Queue/tests/SerializerLocatorListenerTest.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 {
23 23
     public function testListenWithJobTypeFromConfig(): void
24 24
     {
25
-        $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler {};
25
+        $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler{};
26 26
 
27 27
         $container = new Container();
28 28
         $container->bind('test', new PhpSerializer());
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
     public function testListenWithJobTypeFromAttribute(): void
60 60
     {
61
-        $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler {};
61
+        $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler{};
62 62
 
63 63
         $container = new Container();
64 64
         $container->bind('test', new PhpSerializer());
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 
95 95
     public function testListenWithJobTypeFromClass(): void
96 96
     {
97
-        $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler {};
97
+        $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler{};
98 98
 
99 99
         $container = new Container();
100 100
         $container->bind('test', new PhpSerializer());
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,9 @@  discard block
 block discarded – undo
22 22
 {
23 23
     public function testListenWithJobTypeFromConfig(): void
24 24
     {
25
-        $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler {};
25
+        $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler
26
+        {
27
+};
26 28
 
27 29
         $container = new Container();
28 30
         $container->bind('test', new PhpSerializer());
@@ -58,7 +60,9 @@  discard block
 block discarded – undo
58 60
 
59 61
     public function testListenWithJobTypeFromAttribute(): void
60 62
     {
61
-        $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler {};
63
+        $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler
64
+        {
65
+};
62 66
 
63 67
         $container = new Container();
64 68
         $container->bind('test', new PhpSerializer());
@@ -94,7 +98,9 @@  discard block
 block discarded – undo
94 98
 
95 99
     public function testListenWithJobTypeFromClass(): void
96 100
     {
97
-        $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler {};
101
+        $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler
102
+        {
103
+};
98 104
 
99 105
         $container = new Container();
100 106
         $container->bind('test', new PhpSerializer());
Please login to merge, or discard this patch.
src/Queue/src/SerializerLocatorListener.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,13 +18,13 @@  discard block
 block discarded – undo
18 18
         private readonly ReaderInterface $reader,
19 19
         private readonly QueueRegistry $registry,
20 20
         private readonly QueueConfig $config,
21
-    ) {
21
+    ){
22 22
     }
23 23
 
24 24
     public function listen(\ReflectionClass $class): void
25 25
     {
26 26
         $attribute = $this->reader->firstClassMetadata($class, Serializer::class);
27
-        if ($attribute === null) {
27
+        if ($attribute === null){
28 28
             return;
29 29
         }
30 30
 
@@ -38,16 +38,16 @@  discard block
 block discarded – undo
38 38
     private function getJobType(\ReflectionClass $class): string
39 39
     {
40 40
         $attribute = $this->reader->firstClassMetadata($class, JobHandlerAttribute::class);
41
-        if ($attribute !== null) {
41
+        if ($attribute !== null){
42 42
             return $attribute->type;
43 43
         }
44 44
 
45
-        foreach ($this->config->getRegistryHandlers() as $jobType => $handler) {
46
-            if (\is_object($handler)) {
45
+        foreach ($this->config->getRegistryHandlers() as $jobType => $handler){
46
+            if (\is_object($handler)){
47 47
                 $handler = $handler::class;
48 48
             }
49 49
 
50
-            if ($handler === $class->getName()) {
50
+            if ($handler === $class->getName()){
51 51
                 return $jobType;
52 52
             }
53 53
         }
Please login to merge, or discard this patch.