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 (#138)
by Jérémiah
26:04
created
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.
Relay/Mutation/MutationFieldResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         $input = new Argument($args['input']);
33 33
 
34 34
         return $this->promiseAdapter->createFulfilled($mutateAndGetPayloadCallback($input, $context, $info))
35
-            ->then(function ($payload) use ($input) {
35
+            ->then(function($payload) use ($input) {
36 36
                 Resolver::setObjectOrArrayValue($payload, 'clientMutationId', $input['clientMutationId']);
37 37
 
38 38
                 return $payload;
Please login to merge, or discard this patch.
DependencyInjection/Compiler/TaggedServiceMappingPass.php 1 patch
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.
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.
Tests/DIContainerMockTrait.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -20,6 +20,9 @@
 block discarded – undo
20 20
  */
21 21
 trait DIContainerMockTrait
22 22
 {
23
+    /**
24
+     * @return null|\Symfony\Component\DependencyInjection\ContainerInterface
25
+     */
23 26
     private function getDIContainerMock(array $services = [], array $parameters = [])
24 27
     {
25 28
         $container = $this->getMockBuilder(Container::class)
Please login to merge, or discard this patch.
ExpressionLanguage/ConfigExpressionProvider.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,35 +22,35 @@  discard block
 block discarded – undo
22 22
         return [
23 23
             new ExpressionFunction(
24 24
                 'service',
25
-                function ($value) {
25
+                function($value) {
26 26
                     return sprintf('$container->get(%s)', $value);
27 27
                 }
28 28
             ),
29 29
 
30 30
             new ExpressionFunction(
31 31
                 'parameter',
32
-                function ($value) {
32
+                function($value) {
33 33
                     return sprintf('$container->getParameter(%s)', $value);
34 34
                 }
35 35
             ),
36 36
 
37 37
             new ExpressionFunction(
38 38
                 'isTypeOf',
39
-                function ($className) {
39
+                function($className) {
40 40
                     return sprintf('($className = %s) && $value instanceof $className', $className);
41 41
                 }
42 42
             ),
43 43
 
44 44
             new ExpressionFunction(
45 45
                 'resolver',
46
-                function ($alias, $args = '[]') {
46
+                function($alias, $args = '[]') {
47 47
                     return sprintf('$container->get(\'overblog_graphql.resolver_resolver\')->resolve([%s, %s])', $alias, $args);
48 48
                 }
49 49
             ),
50 50
 
51 51
             new ExpressionFunction(
52 52
                 'mutateAndGetPayloadCallback',
53
-                function ($mutateAndGetPayload) {
53
+                function($mutateAndGetPayload) {
54 54
                     $code = 'function ($value) use ('.TypeGenerator::USE_FOR_CLOSURES.', $args, $context, $info) { ';
55 55
                     $code .= 'return '.$mutateAndGetPayload.'; }';
56 56
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
             new ExpressionFunction(
62 62
                 'idFetcherCallback',
63
-                function ($idFetcher) {
63
+                function($idFetcher) {
64 64
                     $code = 'function ($value) use ('.TypeGenerator::USE_FOR_CLOSURES.', $args, $context, $info) { ';
65 65
                     $code .= 'return '.$idFetcher.'; }';
66 66
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
             new ExpressionFunction(
72 72
                 'resolveSingleInputCallback',
73
-                function ($resolveSingleInput) {
73
+                function($resolveSingleInput) {
74 74
                     $code = 'function ($value) use ('.TypeGenerator::USE_FOR_CLOSURES.', $args, $context, $info) { ';
75 75
                     $code .= 'return '.$resolveSingleInput.'; }';
76 76
 
@@ -80,14 +80,14 @@  discard block
 block discarded – undo
80 80
 
81 81
             new ExpressionFunction(
82 82
                 'mutation',
83
-                function ($alias, $args = '[]') {
83
+                function($alias, $args = '[]') {
84 84
                     return sprintf('$container->get(\'overblog_graphql.mutation_resolver\')->resolve([%s, %s])', $alias, $args);
85 85
                 }
86 86
             ),
87 87
 
88 88
             new ExpressionFunction(
89 89
                 'globalId',
90
-                function ($id, $typeName = null) {
90
+                function($id, $typeName = null) {
91 91
                     $typeNameEmpty = null === $typeName || '""' === $typeName || 'null' === $typeName || 'false' === $typeName;
92 92
 
93 93
                     return sprintf(
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
             new ExpressionFunction(
103 103
                 'fromGlobalId',
104
-                function ($globalId) {
104
+                function($globalId) {
105 105
                     return sprintf(
106 106
                         '%s::fromGlobalId(%s)',
107 107
                         GlobalId::class,
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
             new ExpressionFunction(
114 114
                 'newObject',
115
-                function ($className, $args = '[]') {
115
+                function($className, $args = '[]') {
116 116
                     return sprintf('(new \ReflectionClass(%s))->newInstanceArgs(%s)', $className, $args);
117 117
                 }
118 118
             ),
Please login to merge, or discard this patch.