Passed
Push — master ( 738663...b5cb7b )
by butschster
25:04 queued 15:39
created
src/Queue/tests/JobHandlerLocatorListenerTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 {
19 19
     public function testListen(): void
20 20
     {
21
-        $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler {};
21
+        $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler{};
22 22
 
23 23
         $registry = new QueueRegistry(
24 24
             new Container(),
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,9 @@
 block discarded – undo
18 18
 {
19 19
     public function testListen(): void
20 20
     {
21
-        $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler {};
21
+        $handler = new class($this->createMock(InvokerInterface::class)) extends JobHandler
22
+        {
23
+};
22 24
 
23 25
         $registry = new QueueRegistry(
24 26
             new Container(),
Please login to merge, or discard this patch.
src/Queue/tests/SerializerLocatorListenerTest.php 2 patches
Spacing   +2 added lines, -2 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());
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 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());
Please login to merge, or discard this patch.
src/Queue/src/JobHandlerLocatorListener.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,13 +15,13 @@
 block discarded – undo
15 15
     public function __construct(
16 16
         private readonly ReaderInterface $reader,
17 17
         private readonly QueueRegistry $registry
18
-    ) {
18
+    ){
19 19
     }
20 20
 
21 21
     public function listen(\ReflectionClass $class): void
22 22
     {
23 23
         $attribute = $this->reader->firstClassMetadata($class, Attribute::class);
24
-        if ($attribute === null) {
24
+        if ($attribute === null){
25 25
             return;
26 26
         }
27 27
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,8 @@
 block discarded – undo
21 21
     public function listen(\ReflectionClass $class): void
22 22
     {
23 23
         $attribute = $this->reader->firstClassMetadata($class, Attribute::class);
24
-        if ($attribute === null) {
24
+        if ($attribute === null)
25
+        {
25 26
             return;
26 27
         }
27 28
 
Please login to merge, or discard this patch.
src/Queue/src/SerializerLocatorListener.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         private readonly ReaderInterface $reader,
20 20
         private readonly QueueRegistry $registry,
21 21
         private readonly QueueConfig $config
22
-    ) {
22
+    ){
23 23
     }
24 24
 
25 25
     /**
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     public function listen(\ReflectionClass $class): void
29 29
     {
30 30
         $attribute = $this->reader->firstClassMetadata($class, Serializer::class);
31
-        if ($attribute === null) {
31
+        if ($attribute === null){
32 32
             return;
33 33
         }
34 34
 
@@ -45,16 +45,16 @@  discard block
 block discarded – undo
45 45
     private function getJobType(\ReflectionClass $class): string
46 46
     {
47 47
         $attribute = $this->reader->firstClassMetadata($class, JobHandlerAttribute::class);
48
-        if ($attribute !== null) {
48
+        if ($attribute !== null){
49 49
             return $attribute->type;
50 50
         }
51 51
 
52
-        foreach ($this->config->getRegistryHandlers() as $jobType => $handler) {
53
-            if (\is_object($handler)) {
52
+        foreach ($this->config->getRegistryHandlers() as $jobType => $handler){
53
+            if (\is_object($handler)){
54 54
                 $handler = $handler::class;
55 55
             }
56 56
 
57
-            if ($handler === $class->getName()) {
57
+            if ($handler === $class->getName()){
58 58
                 return $jobType;
59 59
             }
60 60
         }
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,7 +28,8 @@  discard block
 block discarded – undo
28 28
     public function listen(\ReflectionClass $class): void
29 29
     {
30 30
         $attribute = $this->reader->firstClassMetadata($class, Serializer::class);
31
-        if ($attribute === null) {
31
+        if ($attribute === null)
32
+        {
32 33
             return;
33 34
         }
34 35
 
@@ -45,16 +46,20 @@  discard block
 block discarded – undo
45 46
     private function getJobType(\ReflectionClass $class): string
46 47
     {
47 48
         $attribute = $this->reader->firstClassMetadata($class, JobHandlerAttribute::class);
48
-        if ($attribute !== null) {
49
+        if ($attribute !== null)
50
+        {
49 51
             return $attribute->type;
50 52
         }
51 53
 
52
-        foreach ($this->config->getRegistryHandlers() as $jobType => $handler) {
53
-            if (\is_object($handler)) {
54
+        foreach ($this->config->getRegistryHandlers() as $jobType => $handler)
55
+        {
56
+            if (\is_object($handler))
57
+            {
54 58
                 $handler = $handler::class;
55 59
             }
56 60
 
57
-            if ($handler === $class->getName()) {
61
+            if ($handler === $class->getName())
62
+            {
58 63
                 return $jobType;
59 64
             }
60 65
         }
Please login to merge, or discard this patch.
src/Queue/src/Attribute/Serializer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,6 +22,6 @@
 block discarded – undo
22 22
 {
23 23
     public function __construct(
24 24
         public readonly string $serializer
25
-    ) {
25
+    ){
26 26
     }
27 27
 }
Please login to merge, or discard this patch.
src/Queue/src/Attribute/JobHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,6 +22,6 @@
 block discarded – undo
22 22
 {
23 23
     public function __construct(
24 24
         public readonly string $type
25
-    ) {
25
+    ){
26 26
     }
27 27
 }
Please login to merge, or discard this patch.