Completed
Pull Request — master (#204)
by Ryan
11:34
created
Tests/Performance/LoadTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * http://opensource.org/licenses/MIT
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 /**
14 14
  * Created by PhpStorm.
15 15
  * User: mounter
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
 
55 55
             while (\count($authors) < \random_int(1, 4)) {
56 56
                 $authors[] = [
57
-                    'name' => 'Author ' . \mb_substr(\md5(\time()), 0, 4),
57
+                    'name' => 'Author '.\mb_substr(\md5(\time()), 0, 4),
58 58
                 ];
59 59
             }
60 60
             $data[] = [
61 61
                 'id'      => $i,
62
-                'title'   => 'Title of ' . $i,
62
+                'title'   => 'Title of '.$i,
63 63
                 'authors' => $authors,
64 64
             ];
65 65
         }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 'fields' => [
71 71
                     'posts' => [
72 72
                         'type'    => new ListType($postType),
73
-                        'resolve' => static function () use ($data) {
73
+                        'resolve' => static function() use ($data) {
74 74
                             return $data;
75 75
                         },
76 76
                     ],
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         return true;
82 82
         $p->processPayload('{ posts { id, title, authors { name } } }');
83 83
         $res = $p->getResponseData();
84
-        echo 'Count: ' . \count($res['data']['posts']) . "\n";
84
+        echo 'Count: '.\count($res['data']['posts'])."\n";
85 85
         \var_dump($res['data']['posts'][0]);
86 86
         \printf("Test Time: %04f\n", \microtime(true) - $time);
87 87
     }
Please login to merge, or discard this patch.
Tests/Performance/NPlusOneTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * http://opensource.org/licenses/MIT
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 /*
14 14
  * This file is a part of GraphQL project.
15 15
  *
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
                 'fields' => [
54 54
                     'posts' => [
55 55
                         'type'    => new ListType($postType),
56
-                        'resolve' => function ($source, $args, $info) {
56
+                        'resolve' => function($source, $args, $info) {
57 57
                             return $this->getDataForPosts();
58 58
                         },
59 59
                     ],
Please login to merge, or discard this patch.
Tests/Schema/VariablesTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * http://opensource.org/licenses/MIT
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 
14 14
 namespace Youshido\Tests\Schema;
15 15
 
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
                         'args' => [
35 35
                             'ids' => new ListType(new NonNullType(new IdType())),
36 36
                         ],
37
-                        'resolve' => static function () {
37
+                        'resolve' => static function() {
38 38
                             return 'item';
39 39
                         },
40 40
                     ],
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
                         'args' => [
112 112
                             'sortOrder' => new StringType(),
113 113
                         ],
114
-                        'resolve' => static function ($args) {
114
+                        'resolve' => static function($args) {
115 115
                             return \sprintf('Result with %s order', empty($args['sortOrder']) ? 'default' : $args['sortOrder']);
116 116
                         },
117 117
                     ],
Please login to merge, or discard this patch.
Tests/Schema/DeferredTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * http://opensource.org/licenses/MIT
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 /**
14 14
  * This file is a part of GraphQL project.
15 15
  */
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         $key                = \md5(\serialize($ids));
65 65
         $this->buffer[$key] = $ids;
66 66
 
67
-        return function () use ($key) {
67
+        return function() use ($key) {
68 68
             return $this->fetch($key);
69 69
         };
70 70
     }
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             [
111 111
               'name'    => 'name',
112 112
               'type'    => new StringType(),
113
-              'resolve' => static function ($value) {
113
+              'resolve' => static function($value) {
114 114
                   return $value['name'];
115 115
               },
116 116
             ]
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
             [
123 123
               'name'    => 'friends',
124 124
               'type'    => new ListType(new self($this->database)),
125
-              'resolve' => function ($value) {
125
+              'resolve' => function($value) {
126 126
                   return new DeferredResolver(
127 127
                     $this->database->add($value['friends'])
128 128
                   );
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
             [
137 137
               'name'    => 'foes',
138 138
               'type'    => new ListType(new self($this->database)),
139
-              'resolve' => function ($value) {
139
+              'resolve' => function($value) {
140 140
                   return new DeferredResolver(
141 141
                     $this->database->add($value['foes'])
142 142
                   );
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
           [
156 156
             'name'    => 'users',
157 157
             'type'    => new ListType(new DeferredUserType($buffer)),
158
-            'resolve' => static function ($value, $args) use ($buffer) {
158
+            'resolve' => static function($value, $args) use ($buffer) {
159 159
                 return new DeferredResolver($buffer->add($args['ids']));
160 160
             },
161 161
           ]
Please login to merge, or discard this patch.
Tests/Schema/NonNullableTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * http://opensource.org/licenses/MIT
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 /**
14 14
  * Date: 03.11.16.
15 15
  */
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
                 'fields' => [
57 57
                     'nonNullScalar' => [
58 58
                         'type'    => new NonNullType(new IntType()),
59
-                        'resolve' => static function () {
59
+                        'resolve' => static function() {
60 60
                         },
61 61
                     ],
62 62
                     'nonNullList' => [
63 63
                         'type'    => new NonNullType(new ListType(new IntType())),
64
-                        'resolve' => static function () {
64
+                        'resolve' => static function() {
65 65
                         },
66 66
                     ],
67 67
                     'user' => [
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                                 'name' => new StringType(),
73 73
                             ],
74 74
                         ])),
75
-                        'resolve' => static function () {
75
+                        'resolve' => static function() {
76 76
                             return [
77 77
                                 'id'   => new uid('6cfb044c-9c0a-4ddd-9ef8-a0b940818db3'),
78 78
                                 'name' => 'Alex',
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                     ],
82 82
                     'nonNullListOfNpnNull' => [
83 83
                         'type'    => new NonNullType(new ListType(new NonNullType(new IntType()))),
84
-                        'resolve' => static function () {
84
+                        'resolve' => static function() {
85 85
                             return [1, null];
86 86
                         },
87 87
                     ],
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                             'ids' => new NonNullType(new ListType(new IntType())),
91 91
                         ],
92 92
                         'type'    => new IntType(),
93
-                        'resolve' => static function () {
93
+                        'resolve' => static function() {
94 94
                             return 1;
95 95
                         },
96 96
                     ],
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                             'ids' => new NonNullType(new ListType(new NonNullType(new IntType()))),
100 100
                         ],
101 101
                         'type'    => new IntType(),
102
-                        'resolve' => static function () {
102
+                        'resolve' => static function() {
103 103
                             return 1;
104 104
                         },
105 105
                     ],
Please login to merge, or discard this patch.
Tests/Schema/ResolveInfoTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  * http://opensource.org/licenses/MIT
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 /*
14 14
  * This file is a part of GraphQL project.
15 15
  *
Please login to merge, or discard this patch.
Tests/Schema/FragmentsTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * http://opensource.org/licenses/MIT
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 
14 14
 namespace Youshido\Tests\Schema;
15 15
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
                 'fields' => [
106 106
                     'user' => [
107 107
                         'type'    => new UserType(),
108
-                        'resolve' => static function ($args) {
108
+                        'resolve' => static function($args) {
109 109
                             return [
110 110
                                 'id'           => 'user-id-1',
111 111
                                 'fullName'     => 'Alex',
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
                 'fields' => [
220 220
                     'user' => [
221 221
                         'type'    => new UserType(),
222
-                        'resolve' => static function ($args) {
222
+                        'resolve' => static function($args) {
223 223
                             return [
224 224
                                 'id'       => 'user-id-1',
225 225
                                 'fullName' => 'Alex',
Please login to merge, or discard this patch.
Tests/Schema/SchemaTest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * http://opensource.org/licenses/MIT
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 /*
14 14
  * This file is a part of GraphQL project.
15 15
  *
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
         $this->assertEquals(1, \count($schema->getMutationType()->getFields()));
47 47
 
48
-        $schema->addMutationField('changeUser', ['type' => new TestObjectType(), 'resolve' => static function (): void {
48
+        $schema->addMutationField('changeUser', ['type' => new TestObjectType(), 'resolve' => static function(): void {
49 49
         }]);
50 50
         $this->assertEquals(2, \count($schema->getMutationType()->getFields()));
51 51
     }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             'fields' => [
77 77
                 'name' => new StringType(),
78 78
             ],
79
-            'resolveType' => static function () use ($authorType) {
79
+            'resolveType' => static function() use ($authorType) {
80 80
                 return $authorType;
81 81
             },
82 82
         ]);
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
                 'fields' => [
96 96
                     'user' => [
97 97
                         'type'    => $userInterface,
98
-                        'resolve' => static function () {
98
+                        'resolve' => static function() {
99 99
                             return [
100 100
                                 'name' => 'Alex',
101 101
                             ];
Please login to merge, or discard this patch.
Tests/Schema/InputObjectDefaultValuesTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
  * http://opensource.org/licenses/MIT
10 10
  */
11 11
 
12
-declare(strict_types=1);
12
+declare(strict_types = 1);
13 13
 
14 14
 namespace Youshido\Tests\Schema;
15 15
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
                                 ],
58 58
                             ]),
59 59
                         ],
60
-                        'resolve' => static function ($source, $args) {
60
+                        'resolve' => static function($source, $args) {
61 61
                             return \sprintf(
62 62
                                 'Result with level %s and status %s',
63 63
                                 $args['statObject']['level'],
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                                 'status' => $enumType,
73 73
                             ],
74 74
                         ]),
75
-                        'resolve' => static function () {
75
+                        'resolve' => static function() {
76 76
                             return [
77 77
                                 'status' => null,
78 78
                             ];
Please login to merge, or discard this patch.