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

Passed
Pull Request — master (#151)
by Jérémiah
08:00
created
Tests/Functional/Controller/GraphControllerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@
 block discarded – undo
207 207
         $client->request('POST', $uri, [], [], ['CONTENT_TYPE' => 'application/json'], json_encode($data));
208 208
         $result = $client->getResponse()->getContent();
209 209
 
210
-        $expected  = [
210
+        $expected = [
211 211
             ['id' => 'friends', 'payload' => ['data' => $this->expectedData]],
212 212
             ['id' => 'friendsTotalCount', 'payload' => ['data' => ['user' => ['friends' => ['totalCount' => 4]]]]],
213 213
         ];
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
@@ -26,10 +26,10 @@
 block discarded – undo
26 26
                 ->arrayNode('values')
27 27
                     ->useAttributeAsKey('name')
28 28
                     ->beforeNormalization()
29
-                        ->ifTrue(function ($v) {
29
+                        ->ifTrue(function($v) {
30 30
                             return is_array($v);
31 31
                         })
32
-                        ->then(function ($v) {
32
+                        ->then(function($v) {
33 33
                             foreach ($v as $name => &$options) {
34 34
                                 // short syntax NAME: VALUE
35 35
                                 if (!is_null($options) && !is_array($options)) {
Please login to merge, or discard this patch.
DependencyInjection/Configuration.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -162,6 +162,9 @@  discard block
 block discarded – undo
162 162
         return $treeBuilder;
163 163
     }
164 164
 
165
+    /**
166
+     * @param string $name
167
+     */
165 168
     private function addBuilderSection($name)
166 169
     {
167 170
         $builder = new TreeBuilder();
@@ -195,6 +198,9 @@  discard block
 block discarded – undo
195 198
         return $node;
196 199
     }
197 200
 
201
+    /**
202
+     * @param string $name
203
+     */
198 204
     private function addSecurityQuerySection($name, $disabledValue)
199 205
     {
200 206
         $builder = new TreeBuilder();
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,14 +49,14 @@  discard block
 block discarded – undo
49 49
                         ->booleanNode('config_validation')->defaultValue($this->debug)->end()
50 50
                         ->arrayNode('schema')
51 51
                             ->beforeNormalization()
52
-                                ->ifTrue(function ($v) {
52
+                                ->ifTrue(function($v) {
53 53
                                     $needNormalization = isset($v['query']) && is_string($v['query']) ||
54 54
                                         isset($v['mutation']) && is_string($v['mutation']) ||
55 55
                                         isset($v['subscription']) && is_string($v['subscription']);
56 56
 
57 57
                                     return $needNormalization;
58 58
                                 })
59
-                                ->then(function ($v) {
59
+                                ->then(function($v) {
60 60
                                     return ['default' => $v];
61 61
                                 })
62 62
                             ->end()
@@ -167,10 +167,10 @@  discard block
 block discarded – undo
167 167
         $builder = new TreeBuilder();
168 168
         $node = $builder->root($name);
169 169
         $node->beforeNormalization()
170
-            ->ifTrue(function ($v) {
170
+            ->ifTrue(function($v) {
171 171
                 return is_array($v) && !empty($v);
172 172
             })
173
-            ->then(function ($v) {
173
+            ->then(function($v) {
174 174
                 foreach ($v as $key => &$config) {
175 175
                     if (is_string($config)) {
176 176
                         $config = [
@@ -203,16 +203,16 @@  discard block
 block discarded – undo
203 203
         $node
204 204
             ->info('Disabled if equal to false.')
205 205
             ->beforeNormalization()
206
-                ->ifTrue(function ($v) {
206
+                ->ifTrue(function($v) {
207 207
                     return false === $v;
208 208
                 })
209
-                ->then(function () use ($disabledValue) {
209
+                ->then(function() use ($disabledValue) {
210 210
                     return $disabledValue;
211 211
                 })
212 212
             ->end()
213 213
             ->defaultFalse()
214 214
             ->validate()
215
-                ->ifTrue(function ($v) {
215
+                ->ifTrue(function($v) {
216 216
                     return $v < 0;
217 217
                 })
218 218
                 ->thenInvalid('"overblog_graphql.security.'.$name.'" must be greater or equal to 0.')
Please login to merge, or discard this patch.
Request/Executor.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -88,6 +88,9 @@  discard block
 block discarded – undo
88 88
         return $this;
89 89
     }
90 90
 
91
+    /**
92
+     * @param string $name
93
+     */
91 94
     public function addSchema($name, Schema $schema)
92 95
     {
93 96
         $this->schemas[$name] = $schema;
@@ -192,6 +195,11 @@  discard block
 block discarded – undo
192 195
         return $this->prepareResult($result, $startTime, $startMemoryUsage);
193 196
     }
194 197
 
198
+    /**
199
+     * @param ExecutionResult $result
200
+     * @param double $startTime
201
+     * @param integer $startMemoryUsage
202
+     */
195 203
     private function prepareResult($result, $startTime, $startMemoryUsage)
196 204
     {
197 205
         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
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         if ($this->promiseAdapter->isThenable($result) || $result instanceof SyncPromise) {
56 56
             return $this->promiseAdapter->then(
57 57
                 new Promise($result, $this->promiseAdapter),
58
-                function ($result) use ($accessChecker, $resolveArgs) {
58
+                function($result) use ($accessChecker, $resolveArgs) {
59 59
                     return $this->processFilter($result, $accessChecker, $resolveArgs);
60 60
                 }
61 61
             );
@@ -68,14 +68,14 @@  discard block
 block discarded – undo
68 68
     {
69 69
         if (is_array($result)) {
70 70
             $result = array_map(
71
-                function ($object) use ($accessChecker, $resolveArgs) {
71
+                function($object) use ($accessChecker, $resolveArgs) {
72 72
                     return $this->hasAccess($accessChecker, $object, $resolveArgs) ? $object : null;
73 73
                 },
74 74
                 $result
75 75
             );
76 76
         } elseif ($result instanceof Connection) {
77 77
             $result->edges = array_map(
78
-                function (Edge $edge) use ($accessChecker, $resolveArgs) {
78
+                function(Edge $edge) use ($accessChecker, $resolveArgs) {
79 79
                     $edge->node = $this->hasAccess($accessChecker, $edge->node, $resolveArgs) ? $edge->node : null;
80 80
 
81 81
                     return $edge;
Please login to merge, or discard this patch.
Tests/Relay/Connection/Output/ConnectionBuilderFromPromisedTest.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
         $resolvedValue = null;
60 60
         $rejectedReason = null;
61 61
         $promise->then(
62
-            function ($value) use (&$resolvedValue) {
62
+            function($value) use (&$resolvedValue) {
63 63
                 $resolvedValue = $value;
64 64
             },
65
-            function ($reason) use (&$rejectedReason) {
65
+            function($reason) use (&$rejectedReason) {
66 66
                 $rejectedReason = $reason;
67 67
             }
68 68
         );
Please login to merge, or discard this patch.
Relay/Connection/Output/ConnectionBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     {
58 58
         self::checkPromise($dataPromise);
59 59
 
60
-        return $dataPromise->then(function ($data) use ($args) {
60
+        return $dataPromise->then(function($data) use ($args) {
61 61
             return static::connectionFromArray($data, $args);
62 62
         });
63 63
     }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     {
172 172
         self::checkPromise($dataPromise);
173 173
 
174
-        return $dataPromise->then(function ($arraySlice) use ($args, $meta) {
174
+        return $dataPromise->then(function($arraySlice) use ($args, $meta) {
175 175
             return static::connectionFromArraySlice($arraySlice, $args, $meta);
176 176
         });
177 177
     }
Please login to merge, or discard this patch.
DependencyInjection/Compiler/TaggedServiceMappingPass.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -64,7 +64,13 @@
 block discarded – undo
64 64
 
65 65
     abstract protected function getTagName();
66 66
 
67
+    /**
68
+     * @return string
69
+     */
67 70
     abstract protected function getResolverServiceID();
68 71
 
72
+    /**
73
+     * @return string
74
+     */
69 75
     abstract protected function getParameterName();
70 76
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
             $solutionDefinition = $container->findDefinition($options['id']);
65 65
 
66 66
             $methods = array_map(
67
-                function ($methodCall) {
67
+                function($methodCall) {
68 68
                     return $methodCall[0];
69 69
                 },
70 70
                 $solutionDefinition->getMethodCalls()
Please login to merge, or discard this patch.
DependencyInjection/TypesConfiguration.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -162,6 +162,9 @@
 block discarded – undo
162 162
             ->end();
163 163
     }
164 164
 
165
+    /**
166
+     * @param string $typeToTreat
167
+     */
165 168
     private function relayNormalizer($typeToTreat, $definitionBuilderClass)
166 169
     {
167 170
         return function ($types) use ($typeToTreat, $definitionBuilderClass) {
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $rootNode = $treeBuilder->root('overblog_graphql_types');
42 42
 
43 43
         $configTypeKeys = array_map(
44
-            function ($type) {
44
+            function($type) {
45 45
                 return $this->normalizedConfigTypeKey($type);
46 46
             },
47 47
             self::$types
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             ->prototype('array')
55 55
                 // config is the unique config entry allowed
56 56
                 ->beforeNormalization()
57
-                    ->ifTrue(function ($v) use ($configTypeKeys) {
57
+                    ->ifTrue(function($v) use ($configTypeKeys) {
58 58
                         if (!empty($v) && is_array($v)) {
59 59
                             $keys = array_keys($v);
60 60
                             foreach ($configTypeKeys as $configTypeKey) {
@@ -69,16 +69,16 @@  discard block
 block discarded – undo
69 69
                         ->thenInvalid(
70 70
                             sprintf(
71 71
                                 'Don\'t use internal config keys %s, replace it by "config" instead.',
72
-                                implode(', ',  $configTypeKeys)
72
+                                implode(', ', $configTypeKeys)
73 73
                             )
74 74
                         )
75 75
                 ->end()
76 76
                 // config is renamed _{TYPE}_config
77 77
                 ->beforeNormalization()
78
-                    ->ifTrue(function ($v) {
78
+                    ->ifTrue(function($v) {
79 79
                         return isset($v['type']) && is_string($v['type']);
80 80
                     })
81
-                    ->then(function ($v) {
81
+                    ->then(function($v) {
82 82
                         $key = $this->normalizedConfigTypeKey($v['type']);
83 83
 
84 84
                         if (empty($v[$key])) {
@@ -102,10 +102,10 @@  discard block
 block discarded – undo
102 102
                 ->end()
103 103
                 // _{TYPE}_config is renamed config
104 104
                 ->validate()
105
-                    ->ifTrue(function ($v) {
105
+                    ->ifTrue(function($v) {
106 106
                         return isset($v[$this->normalizedConfigTypeKey($v['type'])]);
107 107
                     })
108
-                    ->then(function ($v) {
108
+                    ->then(function($v) {
109 109
                         $key = $this->normalizedConfigTypeKey($v['type']);
110 110
                         $v['config'] = $v[$key];
111 111
                         unset($v[$key]);
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
     private function addBeforeNormalization(ArrayNodeDefinition $node)
123 123
     {
124
-        $typeKeyExists = function ($types) {
124
+        $typeKeyExists = function($types) {
125 125
             return !empty($types) && is_array($types);
126 126
         };
127 127
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             // set type config.name
130 130
             ->beforeNormalization()
131 131
                 ->ifTrue($typeKeyExists)
132
-                ->then(function ($types) {
132
+                ->then(function($types) {
133 133
                     foreach ($types as $name => &$type) {
134 134
                         $type['config'] = isset($type['config']) && is_array($type['config']) ? $type['config'] : [];
135 135
                         $type['config']['name'] = $name;
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             ->end()
156 156
             // normalized relay-mutation-payload
157 157
             ->beforeNormalization()
158
-                ->ifTrue(function ($types) {
158
+                ->ifTrue(function($types) {
159 159
                     return !empty($types) && is_array($types);
160 160
                 })
161 161
                 ->then($this->relayNormalizer('relay-mutation-payload', PayloadDefinition::class))
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
     private function relayNormalizer($typeToTreat, $definitionBuilderClass)
166 166
     {
167
-        return function ($types) use ($typeToTreat, $definitionBuilderClass) {
167
+        return function($types) use ($typeToTreat, $definitionBuilderClass) {
168 168
             foreach ($types as $name => $type) {
169 169
                 if (isset($type['type']) && is_string($type['type']) && $typeToTreat === $type['type']) {
170 170
                     $config = isset($type['config']) && is_array($type['config']) ? $type['config'] : [];
Please login to merge, or discard this patch.