Test Failed
Pull Request — master (#927)
by Aleksei
18:42
created
src/Serializer/tests/SerializerManagerTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
     }
53 53
 
54 54
     #[DataProvider('unserializeDataProvider')]
55
-    public function testUnserialize(string|\Stringable $payload, mixed $expected, ?string $format = null): void
55
+    public function testUnserialize(string | \Stringable $payload, mixed $expected, ?string $format = null): void
56 56
     {
57
-        $this->assertSame($expected, $this->serializer->unserialize($payload, format: $format));
57
+        $this->assertSame($expected, $this->serializer->unserialize($payload, format : $format));
58 58
     }
59 59
 
60 60
     public static function serializeDataProvider(): \Traversable
@@ -67,14 +67,14 @@  discard block
 block discarded – undo
67 67
     public static function unserializeDataProvider(): \Traversable
68 68
     {
69 69
         yield ['["some","elements"]', ['some', 'elements'], 'json'];
70
-        yield [new class() implements \Stringable {
70
+        yield [new class() implements \Stringable{
71 71
             public function __toString(): string
72 72
             {
73 73
                 return '["some","elements"]';
74 74
             }
75 75
         }, ['some', 'elements'], 'json'];
76 76
         yield ['a:2:{i:0;s:4:"some";i:1;s:8:"elements";}', ['some', 'elements'], 'serializer'];
77
-        yield [new class() implements \Stringable {
77
+        yield [new class() implements \Stringable{
78 78
             public function __toString(): string
79 79
             {
80 80
                 return 'a:2:{i:0;s:4:"some";i:1;s:8:"elements";}';
Please login to merge, or discard this patch.
src/Console/tests/Fixtures/UpdateClass.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,10 +9,12 @@
 block discarded – undo
9 9
 
10 10
 final class UpdateClass
11 11
 {
12
-    public function do(OutputInterface $output): void
12
+    public function do{
13
+        (OutputInterface $output): void
13 14
     {
14 15
         $output->write('OK');
15 16
     }
17
+    }
16 18
 
17 19
     public function err(OutputInterface $output): void
18 20
     {
Please login to merge, or discard this patch.
src/Core/tests/InvokerTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         $this->container->bindSingleton(Bucket::class, $bucket = new Bucket('foo'));
96 96
 
97 97
         $result = $this->container->invoke(
98
-            static function (Bucket $bucket, SampleClass $class, string $name, string $path = 'baz') {
98
+            static function (Bucket $bucket, SampleClass $class, string $name, string $path = 'baz'){
99 99
                 return \compact('bucket', 'class', 'name', 'path');
100 100
             },
101 101
             ['name' => 'bar']
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $this->expectExceptionMessage('Unable to resolve required argument `name` when resolving');
114 114
 
115 115
         $this->container->invoke(
116
-            static function (Bucket $bucket, SampleClass $class, string $name, string $path = 'baz') {
116
+            static function (Bucket $bucket, SampleClass $class, string $name, string $path = 'baz'){
117 117
                 return \compact('bucket', 'class', 'name', 'path');
118 118
             },
119 119
             ['name' => 'bar']
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,8 @@  discard block
 block discarded – undo
95 95
         $this->container->bindSingleton(Bucket::class, $bucket = new Bucket('foo'));
96 96
 
97 97
         $result = $this->container->invoke(
98
-            static function (Bucket $bucket, SampleClass $class, string $name, string $path = 'baz') {
98
+            static function (Bucket $bucket, SampleClass $class, string $name, string $path = 'baz')
99
+            {
99 100
                 return \compact('bucket', 'class', 'name', 'path');
100 101
             },
101 102
             ['name' => 'bar']
@@ -113,7 +114,8 @@  discard block
 block discarded – undo
113 114
         $this->expectExceptionMessage('Unable to resolve required argument `name` when resolving');
114 115
 
115 116
         $this->container->invoke(
116
-            static function (Bucket $bucket, SampleClass $class, string $name, string $path = 'baz') {
117
+            static function (Bucket $bucket, SampleClass $class, string $name, string $path = 'baz')
118
+            {
117 119
                 return \compact('bucket', 'class', 'name', 'path');
118 120
             },
119 121
             ['name' => 'bar']
Please login to merge, or discard this patch.
src/Queue/tests/QueueRegistryTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     #[DataProvider('serializersDataProvider')]
82 82
     public function testDefaultSerializer(
83 83
         SerializerRegistry $registry,
84
-        string|SerializerInterface|Autowire $serializer
84
+        string | SerializerInterface | Autowire $serializer
85 85
     ): void {
86 86
         $this->mockContainer->bind(QueueConfig::class, new QueueConfig(['defaultSerializer' => $serializer]));
87 87
         $this->mockContainer->bind(SerializerRegistryInterface::class, $registry);
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     }
91 91
 
92 92
     #[DataProvider('serializersDataProvider')]
93
-    public function testSerializer(SerializerRegistry $registry, string|SerializerInterface|Autowire $serializer): void
93
+    public function testSerializer(SerializerRegistry $registry, string | SerializerInterface | Autowire $serializer): void
94 94
     {
95 95
         $this->mockContainer->bind(SerializerRegistryInterface::class, $registry);
96 96
 
Please login to merge, or discard this patch.
src/Prototype/tests/UtilsTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,9 +18,9 @@
 block discarded – undo
18 18
 
19 19
     public static function trailingProvider(): \Traversable
20 20
     {
21
-        yield ['name7', 7, 'name',];
22
-        yield ['name', 0, 'name',];
23
-        yield ['name0', 0, 'name',];
21
+        yield ['name7', 7, 'name', ];
22
+        yield ['name', 0, 'name', ];
23
+        yield ['name0', 0, 'name', ];
24 24
         yield ['name1', 1, 'name'];
25 25
         yield ['name-1', 1, 'name-'];
26 26
         yield ['name-1', -1, 'name'];
Please login to merge, or discard this patch.
src/Prototype/tests/ClassNode/ConflictResolver/SequenceTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,15 +22,15 @@
 block discarded – undo
22 22
         // empty input
23 23
         yield [[], 5, 5];
24 24
         // in the gap (not taken)
25
-        yield [[3, 4, 8, 9,], 6, 6];
26
-        yield [[3, 4, 8, 9,], 1, 1];
25
+        yield [[3, 4, 8, 9, ], 6, 6];
26
+        yield [[3, 4, 8, 9, ], 1, 1];
27 27
         // in the sequence (taken)
28
-        yield [[3, 4, 8, 9,], 4, 0];
29
-        yield [[0, 1, 4, 5,], 5, 2];
28
+        yield [[3, 4, 8, 9, ], 4, 0];
29
+        yield [[0, 1, 4, 5, ], 5, 2];
30 30
         // do not use "1"
31
-        yield [[0, 3, 4, 8,], 4, 2];
31
+        yield [[0, 3, 4, 8, ], 4, 2];
32 32
         // full sequence, take next
33
-        yield [[0, 1, 2, 3,], 3, 4];
33
+        yield [[0, 1, 2, 3, ], 3, 4];
34 34
         yield [[0], 0, 2];
35 35
     }
36 36
 
Please login to merge, or discard this patch.
src/Prototype/tests/ClassNode/ConflictResolver/NamesTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         $cd = ClassNode::create('class\name');
21 21
         $cd->constructorVars = $vars;
22 22
 
23
-        foreach (Fixtures\Params::getParams($method) as $param) {
23
+        foreach (Fixtures\Params::getParams($method) as $param){
24 24
             $cd->addParam($param);
25 25
         }
26 26
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         $this->names()->resolve($cd);
29 29
 
30 30
         $resolved = [];
31
-        foreach ($cd->dependencies as $dependency) {
31
+        foreach ($cd->dependencies as $dependency){
32 32
             $resolved[] = $dependency->var;
33 33
         }
34 34
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         yield [
41 41
             'paramsSource',
42 42
             [],
43
-            ['v2' => 'type1', 'v' => 'type2', 'vv' => 'type3',],
43
+            ['v2' => 'type1', 'v' => 'type2', 'vv' => 'type3', ],
44 44
             ['v2', 'v', 'vv']
45 45
         ];
46 46
         yield [
Please login to merge, or discard this patch.
src/Http/tests/AcceptHeaderItemTest.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     public static function emptyItemProvider(): iterable
22 22
     {
23 23
         $values = ['', ' '];
24
-        foreach ($values as $value) {
24
+        foreach ($values as $value){
25 25
             yield from [
26 26
                 [AcceptHeaderItem::fromString($value)],
27 27
                 [new AcceptHeaderItem($value)],
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
     #[DataProvider('qualityBoundariesProvider')]
59 59
     public function testItemQualityBoundaries(float $quality, AcceptHeaderItem $item): void
60 60
     {
61
-        if ($quality > 1) {
61
+        if ($quality > 1){
62 62
             $this->assertSame(1.0, $item->getQuality());
63 63
         }
64 64
 
65
-        if ($quality < 0) {
65
+        if ($quality < 0){
66 66
             $this->assertSame(0.0, $item->getQuality());
67 67
         }
68 68
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     public static function qualityBoundariesProvider(): iterable
74 74
     {
75 75
         $qualities = [-1, 0, 0.5, 1, 2];
76
-        foreach ($qualities as $quality) {
76
+        foreach ($qualities as $quality){
77 77
             yield from [
78 78
                 [$quality, AcceptHeaderItem::fromString("*;q=$quality")],
79 79
                 [$quality, AcceptHeaderItem::fromString("*;Q=$quality")],
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
             ]
107 107
         ];
108 108
 
109
-        foreach ($set as $params) {
109
+        foreach ($set as $params){
110 110
             $formattedParams = [];
111
-            foreach ($params['passed'] as $k => $v) {
111
+            foreach ($params['passed'] as $k => $v){
112 112
                 $formattedParams[] = "$k=$v";
113 113
             }
114 114
 
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,8 @@  discard block
 block discarded – undo
21 21
     public static function emptyItemProvider(): iterable
22 22
     {
23 23
         $values = ['', ' '];
24
-        foreach ($values as $value) {
24
+        foreach ($values as $value)
25
+        {
25 26
             yield from [
26 27
                 [AcceptHeaderItem::fromString($value)],
27 28
                 [new AcceptHeaderItem($value)],
@@ -58,11 +59,13 @@  discard block
 block discarded – undo
58 59
     #[DataProvider('qualityBoundariesProvider')]
59 60
     public function testItemQualityBoundaries(float $quality, AcceptHeaderItem $item): void
60 61
     {
61
-        if ($quality > 1) {
62
+        if ($quality > 1)
63
+        {
62 64
             $this->assertSame(1.0, $item->getQuality());
63 65
         }
64 66
 
65
-        if ($quality < 0) {
67
+        if ($quality < 0)
68
+        {
66 69
             $this->assertSame(0.0, $item->getQuality());
67 70
         }
68 71
 
@@ -73,7 +76,8 @@  discard block
 block discarded – undo
73 76
     public static function qualityBoundariesProvider(): iterable
74 77
     {
75 78
         $qualities = [-1, 0, 0.5, 1, 2];
76
-        foreach ($qualities as $quality) {
79
+        foreach ($qualities as $quality)
80
+        {
77 81
             yield from [
78 82
                 [$quality, AcceptHeaderItem::fromString("*;q=$quality")],
79 83
                 [$quality, AcceptHeaderItem::fromString("*;Q=$quality")],
@@ -106,9 +110,11 @@  discard block
 block discarded – undo
106 110
             ]
107 111
         ];
108 112
 
109
-        foreach ($set as $params) {
113
+        foreach ($set as $params)
114
+        {
110 115
             $formattedParams = [];
111
-            foreach ($params['passed'] as $k => $v) {
116
+            foreach ($params['passed'] as $k => $v)
117
+            {
112 118
                 $formattedParams[] = "$k=$v";
113 119
             }
114 120
 
Please login to merge, or discard this patch.
src/Http/tests/Stream/GeneratorStreamTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     public function testRewindAfterRead(): void
50 50
     {
51
-        if (PHP_VERSION_ID < 80000) {
51
+        if (PHP_VERSION_ID < 80000){
52 52
             $this->markTestSkipped('See issue https://bugs.php.net/bug.php?id=79927.');
53 53
         }
54 54
 
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
         $rValue = 'return-value';
104 104
         $stream = $this->createStream(self::DEFAULT_SEQUENCE, $rValue);
105 105
 
106
-        $result = (string) $stream;
106
+        $result = (string)$stream;
107 107
 
108
-        $this->assertSame(self::DEFAULT_CONTENT_RESULT . $rValue, $result);
108
+        $this->assertSame(self::DEFAULT_CONTENT_RESULT.$rValue, $result);
109 109
     }
110 110
 
111 111
     public function testToStringWithReturnOnly(): void
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $rValue = 'return-value';
114 114
         $stream = $this->createStream([], $rValue);
115 115
 
116
-        $result = (string) $stream;
116
+        $result = (string)$stream;
117 117
 
118 118
         $this->assertSame($rValue, $result);
119 119
     }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         $stream = $this->createStream();
124 124
         $stream->close();
125 125
 
126
-        $this->assertSame('', (string) $stream);
126
+        $this->assertSame('', (string)$stream);
127 127
 
128 128
         $this->expectException(RuntimeException::class);
129 129
         $this->expectExceptionMessage('Unable to read stream contents.');
Please login to merge, or discard this patch.