Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Pull Request — master (#73)
by Jérémiah
07:13
created
DependencyInjection/Configuration.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
                         ->booleanNode('config_validation')->defaultValue($this->debug)->end()
49 49
                         ->arrayNode('schema')
50 50
                             ->beforeNormalization()
51
-                                ->ifTrue(function ($v) {
51
+                                ->ifTrue(function($v) {
52 52
                                     $needNormalization = isset($v['query']) && is_string($v['query']) ||
53 53
                                         isset($v['mutation']) && is_string($v['mutation']) ||
54 54
                                         isset($v['subscription']) && is_string($v['subscription']);
55 55
 
56 56
                                     return $needNormalization;
57 57
                                 })
58
-                                ->then(function ($v) {
58
+                                ->then(function($v) {
59 59
                                     return ['default' => $v];
60 60
                                 })
61 61
                             ->end()
@@ -175,16 +175,16 @@  discard block
 block discarded – undo
175 175
         $node
176 176
             ->info('Disabled if equal to false.')
177 177
             ->beforeNormalization()
178
-                ->ifTrue(function ($v) {
178
+                ->ifTrue(function($v) {
179 179
                     return false === $v;
180 180
                 })
181
-                ->then(function () use ($disabledValue) {
181
+                ->then(function() use ($disabledValue) {
182 182
                     return $disabledValue;
183 183
                 })
184 184
             ->end()
185 185
             ->defaultFalse()
186 186
             ->validate()
187
-                ->ifTrue(function ($v) {
187
+                ->ifTrue(function($v) {
188 188
                     return $v < 0;
189 189
                 })
190 190
                 ->thenInvalid('"overblog_graphql.security.'.$name.'" must be greater or equal to 0.')
Please login to merge, or discard this patch.
Tests/Request/ExecutorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
             'fields' => [
61 61
                 'myField' => [
62 62
                     'type' => Type::boolean(),
63
-                    'resolve' => function () {
63
+                    'resolve' => function() {
64 64
                         return false;
65 65
                     },
66 66
                 ],
Please login to merge, or discard this patch.
Config/EnumTypeDefinition.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
                     ->useAttributeAsKey('name')
28 28
                     // if value not define we use name as value
29 29
                     ->beforeNormalization()
30
-                        ->ifTrue(function ($v) {
30
+                        ->ifTrue(function($v) {
31 31
                             return is_array($v);
32 32
                         })
33
-                        ->then(function ($v) {
33
+                        ->then(function($v) {
34 34
                             foreach ($v as $name => &$options) {
35 35
                                 // short syntax NAME: VALUE
36 36
                                 if (!is_null($options) && !is_array($options)) {
Please login to merge, or discard this patch.
Relay/Connection/Paginator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
         $entities = call_user_func($this->fetcher, $offset, $limit);
60 60
 
61
-        return $this->handleEntities($entities, function ($entities) use ($args, $offset, $total) {
61
+        return $this->handleEntities($entities, function($entities) use ($args, $offset, $total) {
62 62
             return ConnectionBuilder::connectionFromArraySlice($entities, $args, [
63 63
                 'sliceStart' => $offset,
64 64
                 'arrayLength' => $total,
@@ -81,13 +81,13 @@  discard block
 block discarded – undo
81 81
         if (!is_numeric(ConnectionBuilder::cursorToOffset($args['after'])) || !$args['after']) {
82 82
             $entities = call_user_func($this->fetcher, $offset, $limit + 1);
83 83
 
84
-            return $this->handleEntities($entities, function ($entities) use ($args) {
84
+            return $this->handleEntities($entities, function($entities) use ($args) {
85 85
                 return ConnectionBuilder::connectionFromArray($entities, $args);
86 86
             });
87 87
         } else {
88 88
             $entities = call_user_func($this->fetcher, $offset, $limit + 2);
89 89
 
90
-            return $this->handleEntities($entities, function ($entities) use ($args, $offset) {
90
+            return $this->handleEntities($entities, function($entities) use ($args, $offset) {
91 91
                 return ConnectionBuilder::connectionFromArraySlice($entities, $args, [
92 92
                     'sliceStart' => $offset,
93 93
                     'arrayLength' => $offset + count($entities),
Please login to merge, or discard this patch.
Tests/Relay/Connection/PaginatorTest.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
     public function testForward()
57 57
     {
58
-        $paginator = new Paginator(function ($offset, $limit) {
58
+        $paginator = new Paginator(function($offset, $limit) {
59 59
             $this->assertSame(0, $offset);
60 60
             $this->assertSame(5, $limit); // Includes the extra element to check if next page is available
61 61
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
     public function testForwardAfterInMiddle()
73 73
     {
74
-        $paginator = new Paginator(function ($offset, $limit) {
74
+        $paginator = new Paginator(function($offset, $limit) {
75 75
             $this->assertSame(2, $offset);
76 76
             $this->assertSame(3, $limit); // Includes the extra element to check if next page is available
77 77
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
     public function testForwardAfterAtTheEnd()
89 89
     {
90
-        $paginator = new Paginator(function ($offset, $limit) {
90
+        $paginator = new Paginator(function($offset, $limit) {
91 91
             $this->assertSame(2, $offset);
92 92
             $this->assertSame(4, $limit); // Includes the extra element to check if next page is available
93 93
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
     public function testForwardAfterLast()
105 105
     {
106
-        $paginator = new Paginator(function ($offset, $limit) {
106
+        $paginator = new Paginator(function($offset, $limit) {
107 107
             $this->assertSame(4, $offset);
108 108
             $this->assertSame(7, $limit); // Includes the extra element to check if next page is available
109 109
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
     public function testForwardAfterWithUnvalidCursorAndSlice()
121 121
     {
122
-        $paginator = new Paginator(function ($offset, $limit) {
122
+        $paginator = new Paginator(function($offset, $limit) {
123 123
             $this->assertSame(0, $offset);
124 124
             $this->assertSame(5, $limit); // Includes the extra element to check if next page is available
125 125
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
     public function testBackward()
138 138
     {
139
-        $paginator = new Paginator(function ($offset, $limit) {
139
+        $paginator = new Paginator(function($offset, $limit) {
140 140
             $this->assertSame(2, $offset);
141 141
             $this->assertSame(3, $limit);
142 142
 
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 
154 154
     public function testBackwardWithLimitEqualsToTotal()
155 155
     {
156
-        $paginator = new Paginator(function ($offset, $limit) {
156
+        $paginator = new Paginator(function($offset, $limit) {
157 157
             $this->assertSame(0, $offset);
158 158
             $this->assertSame(5, $limit);
159 159
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 
171 171
     public function testBackwardBeforeLast()
172 172
     {
173
-        $paginator = new Paginator(function ($offset, $limit) {
173
+        $paginator = new Paginator(function($offset, $limit) {
174 174
             $this->assertSame(4, $limit);
175 175
 
176 176
             return $this->getData($offset);
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 
186 186
     public function testBackwardPartialBeforeInMiddle()
187 187
     {
188
-        $paginator = new Paginator(function ($offset, $limit) {
188
+        $paginator = new Paginator(function($offset, $limit) {
189 189
             $this->assertSame(1, $offset);
190 190
             $this->assertSame(2, $limit);
191 191
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 
202 202
     public function testAutoBackward()
203 203
     {
204
-        $paginator = new Paginator(function ($offset, $limit) {
204
+        $paginator = new Paginator(function($offset, $limit) {
205 205
             $this->assertSame(1, $offset);
206 206
             $this->assertSame(4, $limit);
207 207
 
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
     public function testAutoForward()
220 220
     {
221
-        $paginator = new Paginator(function ($offset, $limit) {
221
+        $paginator = new Paginator(function($offset, $limit) {
222 222
             $this->assertSame(0, $offset);
223 223
             $this->assertSame(5, $limit); // Includes the extra element to check if next page is available
224 224
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 
235 235
     public function testAutoBackwardWithCallable()
236 236
     {
237
-        $paginator = new Paginator(function ($offset, $limit) {
237
+        $paginator = new Paginator(function($offset, $limit) {
238 238
             $this->assertSame(1, $offset);
239 239
             $this->assertSame(4, $limit);
240 240
 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
         });
243 243
 
244 244
         $countCalled = false;
245
-        $result = $paginator->auto(new Argument(['last' => 4]), function () use (&$countCalled) {
245
+        $result = $paginator->auto(new Argument(['last' => 4]), function() use (&$countCalled) {
246 246
             $countCalled = true;
247 247
 
248 248
             return 5;
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 
266 266
         $this->assertSame(5, call_user_func_array($callable, ['array' => $this->data]));
267 267
 
268
-        $paginator = new Paginator(function ($offset, $limit) {
268
+        $paginator = new Paginator(function($offset, $limit) {
269 269
             $this->assertSame(1, $offset);
270 270
             $this->assertSame(4, $limit);
271 271
 
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 
293 293
         $promise->expects($this->once())->method('then');
294 294
 
295
-        $paginator = new Paginator(function ($offset, $limit) use ($promise) {
295
+        $paginator = new Paginator(function($offset, $limit) use ($promise) {
296 296
             $this->assertSame(0, $offset);
297 297
             $this->assertSame(5, $limit);
298 298
 
Please login to merge, or discard this patch.
Request/Executor.php 1 patch
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -81,6 +81,9 @@  discard block
 block discarded – undo
81 81
         return $this;
82 82
     }
83 83
 
84
+    /**
85
+     * @param string $name
86
+     */
84 87
     public function addSchema($name, Schema $schema)
85 88
     {
86 89
         $this->schemas[$name] = $schema;
@@ -176,6 +179,10 @@  discard block
 block discarded – undo
176 179
         return $this->prepareResult($result, $startTime, $startMemoryUsage);
177 180
     }
178 181
 
182
+    /**
183
+     * @param double $startTime
184
+     * @param integer $startMemoryUsage
185
+     */
179 186
     private function prepareResult($result, $startTime, $startMemoryUsage)
180 187
     {
181 188
         if ($this->hasDebugInfo()) {
Please login to merge, or discard this patch.
Resolver/AccessResolver.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
                 $result = $this->promiseAdapter->convertThenable($result);
54 54
             }
55 55
 
56
-            return $this->promiseAdapter->then($result, function ($result) use ($accessChecker, $resolveArgs) {
56
+            return $this->promiseAdapter->then($result, function($result) use ($accessChecker, $resolveArgs) {
57 57
                 return $this->processFilter($result, $accessChecker, $resolveArgs);
58 58
             });
59 59
         }
@@ -65,14 +65,14 @@  discard block
 block discarded – undo
65 65
     {
66 66
         if (is_array($result)) {
67 67
             $result = array_map(
68
-                function ($object) use ($accessChecker, $resolveArgs) {
68
+                function($object) use ($accessChecker, $resolveArgs) {
69 69
                     return $this->hasAccess($accessChecker, $object, $resolveArgs) ? $object : null;
70 70
                 },
71 71
                 $result
72 72
             );
73 73
         } elseif ($result instanceof Connection) {
74 74
             $result->edges = array_map(
75
-                function (Edge $edge) use ($accessChecker, $resolveArgs) {
75
+                function(Edge $edge) use ($accessChecker, $resolveArgs) {
76 76
                     $edge->node = $this->hasAccess($accessChecker, $edge->node, $resolveArgs) ? $edge->node : null;
77 77
 
78 78
                     return $edge;
Please login to merge, or discard this patch.
Executor/Promise/Adapter/ReactPromiseAdapter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,10 +59,10 @@
 block discarded – undo
59 59
         $reactPromise = $promise->adoptedPromise;
60 60
 
61 61
         while ($wait) {
62
-            $reactPromise->then(function ($values) use (&$resolvedValue, &$wait) {
62
+            $reactPromise->then(function($values) use (&$resolvedValue, &$wait) {
63 63
                 $resolvedValue = $values;
64 64
                 $wait = false;
65
-            }, function ($reason) use (&$exception, &$wait) {
65
+            }, function($reason) use (&$exception, &$wait) {
66 66
                 $exception = $reason;
67 67
                 $wait = false;
68 68
             });
Please login to merge, or discard this patch.
Tests/Functional/app/Resolver/ConnectionResolver.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,21 +56,21 @@  discard block
 block discarded – undo
56 56
 
57 57
     public function friendsResolver($user, $args)
58 58
     {
59
-        return $this->promiseAdapter->create(function (callable $resolve) use ($user, $args) {
59
+        return $this->promiseAdapter->create(function(callable $resolve) use ($user, $args) {
60 60
             return $resolve(ConnectionBuilder::connectionFromArray($user['friends'], $args));
61 61
         });
62 62
     }
63 63
 
64 64
     public function resolveNode(Edge $edge)
65 65
     {
66
-        return $this->promiseAdapter->create(function (callable $resolve) use ($edge) {
66
+        return $this->promiseAdapter->create(function(callable $resolve) use ($edge) {
67 67
             return $resolve(isset($this->allUsers[$edge->node]) ? $this->allUsers[$edge->node] : null);
68 68
         });
69 69
     }
70 70
 
71 71
     public function resolveConnection()
72 72
     {
73
-        return $this->promiseAdapter->create(function (callable $resolve) {
73
+        return $this->promiseAdapter->create(function(callable $resolve) {
74 74
             return $resolve(count($this->allUsers) - 1);
75 75
         });
76 76
     }
@@ -78,11 +78,11 @@  discard block
 block discarded – undo
78 78
     public function resolveQuery()
79 79
     {
80 80
         if ($this->promiseAdapter instanceof GraphQLPromiseAdapter) {
81
-            return new Deferred(function () {
81
+            return new Deferred(function() {
82 82
                 return $this->allUsers[0];
83 83
             });
84 84
         } elseif ($this->promiseAdapter instanceof ReactPromiseAdapter) {
85
-            return new Promise(function (callable $resolve) {
85
+            return new Promise(function(callable $resolve) {
86 86
                 return $resolve($this->allUsers[0]);
87 87
             });
88 88
         }
Please login to merge, or discard this patch.