Test Failed
Pull Request — master (#1190)
by butschster
10:27
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/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
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.
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.
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.
src/Framework/Exceptions/Reporter/StorageReporter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 {
12 12
     public function __construct(
13 13
         private StorageSnapshot $storageSnapshot,
14
-    ) {
14
+    ){
15 15
     }
16 16
 
17 17
     public function report(\Throwable $exception): void
Please login to merge, or discard this patch.
src/Framework/Snapshots/StorageSnapshooter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 {
9 9
     public function __construct(
10 10
         private readonly StorageSnapshot $storageSnapshot
11
-    ) {
11
+    ){
12 12
     }
13 13
 
14 14
     public function register(\Throwable $e): SnapshotInterface
Please login to merge, or discard this patch.
src/Framework/Bootloader/StorageSnapshotsBootloader.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     {
34 34
         $bucket = $env->get('SNAPSHOTS_BUCKET');
35 35
 
36
-        if ($bucket === null) {
36
+        if ($bucket === null){
37 37
             throw new \RuntimeException(
38 38
                 'Please, configure a bucket for storing snapshots using the environment variable `SNAPSHOTS_BUCKET`.'
39 39
             );
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,8 @@
 block discarded – undo
33 33
     {
34 34
         $bucket = $env->get('SNAPSHOTS_BUCKET');
35 35
 
36
-        if ($bucket === null) {
36
+        if ($bucket === null)
37
+        {
37 38
             throw new \RuntimeException(
38 39
                 'Please, configure a bucket for storing snapshots using the environment variable `SNAPSHOTS_BUCKET`.'
39 40
             );
Please login to merge, or discard this patch.
src/Snapshots/src/StorageSnapshot.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
         protected readonly Verbosity $verbosity,
17 17
         protected readonly ExceptionRendererInterface $renderer,
18 18
         protected readonly ?string $directory = null
19
-    ) {
19
+    ){
20 20
     }
21 21
 
22 22
     public function create(\Throwable $e): SnapshotInterface
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
         $this->storage
36 36
             ->bucket($this->bucket)
37
-            ->create($this->directory !== null ? $this->directory . DIRECTORY_SEPARATOR . $filename : $filename)
37
+            ->create($this->directory !== null ? $this->directory.DIRECTORY_SEPARATOR.$filename : $filename)
38 38
             ->write($this->renderer->render($snapshot->getException(), $this->verbosity));
39 39
     }
40 40
 
Please login to merge, or discard this patch.