Completed
Push — master ( 6366df...fbe022 )
by Kirill
23s queued 19s
created
src/DataGrid/tests/Value/UuidValueTest.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function testMask(?string $mask, ?string $expectedException): void
27 27
     {
28
-        if ($expectedException !== null) {
28
+        if ($expectedException !== null){
29 29
             $this->expectException($expectedException);
30 30
         }
31 31
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     {
75 75
         $masks = ['valid', 'nil', 'v1', 'v2', 'v3', 'v4', 'v5'];
76 76
         $random = bin2hex(random_bytes(10));
77
-        foreach ($masks as $mask) {
77
+        foreach ($masks as $mask){
78 78
             yield from [
79 79
                 [$mask, $random, false],
80 80
                 [null, $random, false],
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         $uuid5 = Uuid::uuid5($ns, 'name')->toString();
90 90
         $uuids = [$nil, $uuid1, $uuid3, $uuid4, $uuid5];
91 91
 
92
-        foreach ($uuids as $uuid) {
92
+        foreach ($uuids as $uuid){
93 93
             yield from[
94 94
                 ['valid', $uuid, true],
95 95
                 [null, $uuid, true],
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,7 +25,8 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function testMask(?string $mask, ?string $expectedException): void
27 27
     {
28
-        if ($expectedException !== null) {
28
+        if ($expectedException !== null)
29
+        {
29 30
             $this->expectException($expectedException);
30 31
         }
31 32
 
@@ -74,7 +75,8 @@  discard block
 block discarded – undo
74 75
     {
75 76
         $masks = ['valid', 'nil', 'v1', 'v2', 'v3', 'v4', 'v5'];
76 77
         $random = bin2hex(random_bytes(10));
77
-        foreach ($masks as $mask) {
78
+        foreach ($masks as $mask)
79
+        {
78 80
             yield from [
79 81
                 [$mask, $random, false],
80 82
                 [null, $random, false],
@@ -89,7 +91,8 @@  discard block
 block discarded – undo
89 91
         $uuid5 = Uuid::uuid5($ns, 'name')->toString();
90 92
         $uuids = [$nil, $uuid1, $uuid3, $uuid4, $uuid5];
91 93
 
92
-        foreach ($uuids as $uuid) {
94
+        foreach ($uuids as $uuid)
95
+        {
93 96
             yield from[
94 97
                 ['valid', $uuid, true],
95 98
                 [null, $uuid, true],
Please login to merge, or discard this patch.
src/DataGrid/tests/Value/EnumValueTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function testIncorrectEnum(ValueInterface $type, ?string $expectedException, ...$values): void
27 27
     {
28
-        if ($expectedException !== null) {
28
+        if ($expectedException !== null){
29 29
             $this->expectException($expectedException);
30 30
         }
31 31
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             Value\StringValue::class,
52 52
         ];
53 53
 
54
-        foreach ($types as $type) {
54
+        foreach ($types as $type){
55 55
             yield [new $type(), ValueException::class];
56 56
         }
57 57
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,8 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function testIncorrectEnum(ValueInterface $type, ?string $expectedException, ...$values): void
27 27
     {
28
-        if ($expectedException !== null) {
28
+        if ($expectedException !== null)
29
+        {
29 30
             $this->expectException($expectedException);
30 31
         }
31 32
 
@@ -51,7 +52,8 @@  discard block
 block discarded – undo
51 52
             Value\StringValue::class,
52 53
         ];
53 54
 
54
-        foreach ($types as $type) {
55
+        foreach ($types as $type)
56
+        {
55 57
             yield [new $type(), ValueException::class];
56 58
         }
57 59
 
Please login to merge, or discard this patch.
src/DataGrid/tests/Value/RangeValueTest.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         ?string $expectedException,
29 29
         ?Value\RangeValue\Boundary ...$boundaries
30 30
     ): void {
31
-        if ($expectedException !== null) {
31
+        if ($expectedException !== null){
32 32
             $this->expectException($expectedException);
33 33
         }
34 34
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             Value\StringValue::class,
55 55
         ];
56 56
 
57
-        foreach ($types as $type) {
57
+        foreach ($types as $type){
58 58
             //both empty boundaries are forbidden
59 59
             yield [new $type(), ValueException::class];
60 60
         }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,8 @@  discard block
 block discarded – undo
28 28
         ?string $expectedException,
29 29
         ?Value\RangeValue\Boundary ...$boundaries
30 30
     ): void {
31
-        if ($expectedException !== null) {
31
+        if ($expectedException !== null)
32
+        {
32 33
             $this->expectException($expectedException);
33 34
         }
34 35
 
@@ -54,7 +55,8 @@  discard block
 block discarded – undo
54 55
             Value\StringValue::class,
55 56
         ];
56 57
 
57
-        foreach ($types as $type) {
58
+        foreach ($types as $type)
59
+        {
58 60
             //both empty boundaries are forbidden
59 61
             yield [new $type(), ValueException::class];
60 62
         }
Please login to merge, or discard this patch.
src/DataGrid/tests/Fixture/WriterIterateNonIterable.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      */
22 22
     public function write($source, SpecificationInterface $specification, Compiler $compiler)
23 23
     {
24
-        if (!is_iterable($source)) {
24
+        if (!is_iterable($source)){
25 25
             return [$source];
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
      */
22 22
     public function write($source, SpecificationInterface $specification, Compiler $compiler)
23 23
     {
24
-        if (!is_iterable($source)) {
24
+        if (!is_iterable($source))
25
+        {
25 26
             return [$source];
26 27
         }
27 28
 
Please login to merge, or discard this patch.
src/DataGrid/tests/Fixture/SequenceWriter.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      */
22 22
     public function write($source, SpecificationInterface $specification, Compiler $compiler)
23 23
     {
24
-        if (is_array($source)) {
24
+        if (is_array($source)){
25 25
             $source[] = get_class($specification);
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
      */
22 22
     public function write($source, SpecificationInterface $specification, Compiler $compiler)
23 23
     {
24
-        if (is_array($source)) {
24
+        if (is_array($source))
25
+        {
25 26
             $source[] = get_class($specification);
26 27
         }
27 28
 
Please login to merge, or discard this patch.
src/DataGrid/tests/Fixture/WriterOne.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      */
24 24
     public function write($source, SpecificationInterface $specification, Compiler $compiler)
25 25
     {
26
-        if (is_array($source)) {
26
+        if (is_array($source)){
27 27
             $source[] = self::OUTPUT;
28 28
         }
29 29
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,8 @@
 block discarded – undo
23 23
      */
24 24
     public function write($source, SpecificationInterface $specification, Compiler $compiler)
25 25
     {
26
-        if (is_array($source)) {
26
+        if (is_array($source))
27
+        {
27 28
             $source[] = self::OUTPUT;
28 29
         }
29 30
 
Please login to merge, or discard this patch.
src/DataGrid/tests/FunctionsTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
             'Key2' => 'value2',
102 102
         ];
103 103
 
104
-        if ($expectException !== null) {
104
+        if ($expectException !== null){
105 105
             $this->expectException($expectException);
106 106
         }
107 107
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,8 @@
 block discarded – undo
101 101
             'Key2' => 'value2',
102 102
         ];
103 103
 
104
-        if ($expectException !== null) {
104
+        if ($expectException !== null)
105
+        {
105 106
             $this->expectException($expectException);
106 107
         }
107 108
 
Please login to merge, or discard this patch.
src/DataGrid/tests/CompilerTest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
     public function testWriters($source, $expected, WriterInterface ...$writers): void
80 80
     {
81 81
         $compiler = new Compiler();
82
-        foreach ($writers as $writer) {
82
+        foreach ($writers as $writer){
83 83
             $compiler->addWriter($writer);
84 84
         }
85 85
         $this->assertSame($expected, $compiler->compile($source, new Filter\Equals('', '')));
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,8 @@
 block discarded – undo
79 79
     public function testWriters($source, $expected, WriterInterface ...$writers): void
80 80
     {
81 81
         $compiler = new Compiler();
82
-        foreach ($writers as $writer) {
82
+        foreach ($writers as $writer)
83
+        {
83 84
             $compiler->addWriter($writer);
84 85
         }
85 86
         $this->assertSame($expected, $compiler->compile($source, new Filter\Equals('', '')));
Please login to merge, or discard this patch.
src/DataGrid/tests/GridFactoryTest.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
         $expected,
236 236
         string $expectedException = null
237 237
     ): void {
238
-        if ($expectedException !== null) {
238
+        if ($expectedException !== null){
239 239
             $this->expectException($expectedException);
240 240
         }
241 241
 
@@ -297,15 +297,15 @@  discard block
 block discarded – undo
297 297
     private function paginatorInput(int $page = null, int $limit = null): array
298 298
     {
299 299
         $result = [];
300
-        if ($page === null && $limit === null) {
300
+        if ($page === null && $limit === null){
301 301
             return $result;
302 302
         }
303 303
 
304
-        if ($page !== null) {
304
+        if ($page !== null){
305 305
             $result['page'] = $page;
306 306
         }
307 307
 
308
-        if ($limit !== null) {
308
+        if ($limit !== null){
309 309
             $result['limit'] = $limit;
310 310
         }
311 311
 
Please login to merge, or discard this patch.
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -235,7 +235,8 @@  discard block
 block discarded – undo
235 235
         $expected,
236 236
         string $expectedException = null
237 237
     ): void {
238
-        if ($expectedException !== null) {
238
+        if ($expectedException !== null)
239
+        {
239 240
             $this->expectException($expectedException);
240 241
         }
241 242
 
@@ -297,15 +298,18 @@  discard block
 block discarded – undo
297 298
     private function paginatorInput(int $page = null, int $limit = null): array
298 299
     {
299 300
         $result = [];
300
-        if ($page === null && $limit === null) {
301
+        if ($page === null && $limit === null)
302
+        {
301 303
             return $result;
302 304
         }
303 305
 
304
-        if ($page !== null) {
306
+        if ($page !== null)
307
+        {
305 308
             $result['page'] = $page;
306 309
         }
307 310
 
308
-        if ($limit !== null) {
311
+        if ($limit !== null)
312
+        {
309 313
             $result['limit'] = $limit;
310 314
         }
311 315
 
Please login to merge, or discard this patch.