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 (#73)
by Jérémiah
05:23
created
Tests/Functional/Controller/GraphControllerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@
 block discarded – undo
165 165
         $client->request('POST', '/?batch', [], [], ['CONTENT_TYPE' => 'application/json'], json_encode($data));
166 166
         $result = $client->getResponse()->getContent();
167 167
 
168
-        $expected  = [
168
+        $expected = [
169 169
             'friends' => ['data' => $this->expectedData],
170 170
             'friendsTotalCount' => ['data' => ['user' => ['friends' => ['totalCount' => 4]]]],
171 171
         ];
Please login to merge, or discard this patch.
Config/TypeDefinition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         $node = $builder->root('name', 'scalar');
44 44
         $node->isRequired();
45 45
         $node->validate()
46
-            ->ifTrue(function ($name) {
46
+            ->ifTrue(function($name) {
47 47
                 return !preg_match('/^[_a-z][_0-9a-z]*$/i', $name);
48 48
             })
49 49
                 ->thenInvalid('Invalid type name "%s". (see https://facebook.github.io/graphql/#Name)')
Please login to merge, or discard this patch.
Config/ObjectTypeDefinition.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,11 +36,11 @@
 block discarded – undo
36 36
             ->end();
37 37
 
38 38
         $node->validate()
39
-            ->ifTrue(function ($v) {
39
+            ->ifTrue(function($v) {
40 40
 
41 41
                 return array_key_exists('fieldsDefaultAccess', $v) && null !== $v['fieldsDefaultAccess'];
42 42
             })
43
-            ->then(function ($v) {
43
+            ->then(function($v) {
44 44
                 foreach ($v['fields'] as &$field) {
45 45
                     if (array_key_exists('access', $field) && null !== $field['access']) {
46 46
                         continue;
Please login to merge, or discard this patch.
Tests/Resolver/Toto.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 
41 41
     public function getPrivatePropertyWithoutGetterUsingCallBack()
42 42
     {
43
-        return function () {
43
+        return function() {
44 44
             return $this->privatePropertyWithoutGetter;
45 45
         };
46 46
     }
Please login to merge, or discard this patch.
DependencyInjection/Compiler/TypesPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     private function processConfig(array $configs)
41 41
     {
42 42
         return array_map(
43
-            function ($v) {
43
+            function($v) {
44 44
                 if (is_array($v)) {
45 45
                     return call_user_func([$this, 'processConfig'], $v);
46 46
                 } elseif (is_string($v) && 0 === strpos($v, '@=')) {
Please login to merge, or discard this patch.
DependencyInjection/TypesConfiguration.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         $rootNode = $treeBuilder->root('overblog_graphql_types');
37 37
 
38 38
         $configTypeKeys = array_map(
39
-            function ($type) {
39
+            function($type) {
40 40
                 return $this->normalizedConfigTypeKey($type);
41 41
             },
42 42
             self::$types
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             ->prototype('array')
50 50
                 // config is the unique config entry allowed
51 51
                 ->beforeNormalization()
52
-                    ->ifTrue(function ($v) use ($configTypeKeys) {
52
+                    ->ifTrue(function($v) use ($configTypeKeys) {
53 53
                         if (!empty($v) && is_array($v)) {
54 54
                             $keys = array_keys($v);
55 55
                             foreach ($configTypeKeys as $configTypeKey) {
@@ -64,16 +64,16 @@  discard block
 block discarded – undo
64 64
                         ->thenInvalid(
65 65
                             sprintf(
66 66
                                 'Don\'t use internal config keys %s, replace it by "config" instead.',
67
-                                implode(', ',  $configTypeKeys)
67
+                                implode(', ', $configTypeKeys)
68 68
                             )
69 69
                         )
70 70
                 ->end()
71 71
                 // config is renamed _{TYPE}_config
72 72
                 ->beforeNormalization()
73
-                    ->ifTrue(function ($v) {
73
+                    ->ifTrue(function($v) {
74 74
                         return isset($v['type']) && is_string($v['type']);
75 75
                     })
76
-                    ->then(function ($v) {
76
+                    ->then(function($v) {
77 77
                         $key = $this->normalizedConfigTypeKey($v['type']);
78 78
 
79 79
                         if (empty($v[$key])) {
@@ -96,10 +96,10 @@  discard block
 block discarded – undo
96 96
                 ->end()
97 97
                 // _{TYPE}_config is renamed config
98 98
                 ->validate()
99
-                    ->ifTrue(function ($v) {
99
+                    ->ifTrue(function($v) {
100 100
                         return isset($v[$this->normalizedConfigTypeKey($v['type'])]);
101 101
                     })
102
-                    ->then(function ($v) {
102
+                    ->then(function($v) {
103 103
                         $key = $this->normalizedConfigTypeKey($v['type']);
104 104
                         $v['config'] = $v[$key];
105 105
                         unset($v[$key]);
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
     private function addBeforeNormalization(ArrayNodeDefinition $node)
117 117
     {
118
-        $typeKeyExists = function ($types) {
118
+        $typeKeyExists = function($types) {
119 119
             return !empty($types) && is_array($types);
120 120
         };
121 121
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             // set type config.name
124 124
             ->beforeNormalization()
125 125
                 ->ifTrue($typeKeyExists)
126
-                ->then(function ($types) {
126
+                ->then(function($types) {
127 127
                     foreach ($types as $name => &$type) {
128 128
                         $type['config'] = isset($type['config']) && is_array($type['config']) ? $type['config'] : [];
129 129
                         $type['config']['name'] = $name;
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
             ->end()
150 150
             // normalized relay-mutation-payload
151 151
             ->beforeNormalization()
152
-                ->ifTrue(function ($types) {
152
+                ->ifTrue(function($types) {
153 153
                     return !empty($types) && is_array($types);
154 154
                 })
155 155
                 ->then($this->relayNormalizer('relay-mutation-payload', 'Overblog\GraphQLBundle\Relay\Mutation\PayloadDefinition'))
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
     private function relayNormalizer($typeToTreat, $definitionBuilderClass)
160 160
     {
161
-        return function ($types) use ($typeToTreat, $definitionBuilderClass) {
161
+        return function($types) use ($typeToTreat, $definitionBuilderClass) {
162 162
             foreach ($types as $name => $type) {
163 163
                 if (isset($type['type']) && is_string($type['type']) && $typeToTreat === $type['type']) {
164 164
                     $config = isset($type['config']) && is_array($type['config']) ? $type['config'] : [];
Please login to merge, or discard this patch.
DependencyInjection/OverblogGraphQLTypesExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,8 +104,8 @@
 block discarded – undo
104 104
         // from config
105 105
         if (!empty($config['definitions']['mappings']['types'])) {
106 106
             $typesMappings = array_filter(array_map(
107
-                function (array $typeMapping) use ($container) {
108
-                    $params = $this->detectConfigFiles($container, $typeMapping['dir'],  $typeMapping['type']);
107
+                function(array $typeMapping) use ($container) {
108
+                    $params = $this->detectConfigFiles($container, $typeMapping['dir'], $typeMapping['type']);
109 109
 
110 110
                     return $params;
111 111
                 },
Please login to merge, or discard this patch.
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.
ExpressionLanguage/ConfigExpressionProvider.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -22,100 +22,100 @@  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
-                function () {
28
+                function() {
29 29
                 }
30 30
             ),
31 31
 
32 32
             new ExpressionFunction(
33 33
                 'parameter',
34
-                function ($value) {
34
+                function($value) {
35 35
                     return sprintf('$container->getParameter(%s)', $value);
36 36
                 },
37
-                function () {
37
+                function() {
38 38
                 }
39 39
             ),
40 40
 
41 41
             new ExpressionFunction(
42 42
                 'isTypeOf',
43
-                function ($className) {
43
+                function($className) {
44 44
                     return sprintf('($className = %s) && $value instanceof $className', $className);
45 45
                 },
46
-                function () {
46
+                function() {
47 47
                 }
48 48
             ),
49 49
 
50 50
             new ExpressionFunction(
51 51
                 'resolver',
52
-                function ($alias, $args = '[]') {
52
+                function($alias, $args = '[]') {
53 53
                     return sprintf('$container->get(\'overblog_graphql.resolver_resolver\')->resolve([%s, %s])', $alias, $args);
54 54
                 },
55
-                function () {
55
+                function() {
56 56
                 }
57 57
             ),
58 58
 
59 59
             new ExpressionFunction(
60 60
                 'mutateAndGetPayloadCallback',
61
-                function ($mutateAndGetPayload) {
61
+                function($mutateAndGetPayload) {
62 62
                     $code = 'function ($value) use ('.TypeGenerator::USE_FOR_CLOSURES.', $args, $info) { ';
63 63
                     $code .= 'return '.$mutateAndGetPayload.'; }';
64 64
 
65 65
                     return $code;
66 66
                 },
67
-                function () {
67
+                function() {
68 68
                 }
69 69
             ),
70 70
 
71 71
             new ExpressionFunction(
72 72
                 'mutateAndGetPayloadCallback',
73
-                function ($mutateAndGetPayload) {
73
+                function($mutateAndGetPayload) {
74 74
                     $code = 'function ($value) use ('.TypeGenerator::USE_FOR_CLOSURES.', $args, $info) { ';
75 75
                     $code .= 'return '.$mutateAndGetPayload.'; }';
76 76
 
77 77
                     return $code;
78 78
                 },
79
-                function () {
79
+                function() {
80 80
                 }
81 81
             ),
82 82
 
83 83
             new ExpressionFunction(
84 84
                 'idFetcherCallback',
85
-                function ($idFetcher) {
85
+                function($idFetcher) {
86 86
                     $code = 'function ($value) use ('.TypeGenerator::USE_FOR_CLOSURES.', $args, $info) { ';
87 87
                     $code .= 'return '.$idFetcher.'; }';
88 88
 
89 89
                     return $code;
90 90
                 },
91
-                function () {
91
+                function() {
92 92
                 }
93 93
             ),
94 94
 
95 95
             new ExpressionFunction(
96 96
                 'resolveSingleInputCallback',
97
-                function ($resolveSingleInput) {
97
+                function($resolveSingleInput) {
98 98
                     $code = 'function ($value) use ('.TypeGenerator::USE_FOR_CLOSURES.', $args, $info) { ';
99 99
                     $code .= 'return '.$resolveSingleInput.'; }';
100 100
 
101 101
                     return $code;
102 102
                 },
103
-                function () {
103
+                function() {
104 104
                 }
105 105
             ),
106 106
 
107 107
             new ExpressionFunction(
108 108
                 'mutation',
109
-                function ($alias, $args = '[]') {
109
+                function($alias, $args = '[]') {
110 110
                     return sprintf('$container->get(\'overblog_graphql.mutation_resolver\')->resolve([%s, %s])', $alias, $args);
111 111
                 },
112
-                function () {
112
+                function() {
113 113
                 }
114 114
             ),
115 115
 
116 116
             new ExpressionFunction(
117 117
                 'globalId',
118
-                function ($id, $typeName = null) {
118
+                function($id, $typeName = null) {
119 119
                     $typeNameEmpty = null === $typeName || '""' === $typeName || 'null' === $typeName || 'false' === $typeName;
120 120
 
121 121
                     return sprintf(
@@ -124,28 +124,28 @@  discard block
 block discarded – undo
124 124
                         $id
125 125
                     );
126 126
                 },
127
-                function () {
127
+                function() {
128 128
                 }
129 129
             ),
130 130
 
131 131
             new ExpressionFunction(
132 132
                 'fromGlobalId',
133
-                function ($globalId) {
133
+                function($globalId) {
134 134
                     return sprintf(
135 135
                         '\\Overblog\\GraphQLBundle\\Relay\\Node\\GlobalId::fromGlobalId(%s)',
136 136
                         $globalId
137 137
                     );
138 138
                 },
139
-                function () {
139
+                function() {
140 140
                 }
141 141
             ),
142 142
 
143 143
             new ExpressionFunction(
144 144
                 'newObject',
145
-                function ($className, $args = '[]') {
145
+                function($className, $args = '[]') {
146 146
                     return sprintf('(new \ReflectionClass(%s))->newInstanceArgs(%s)', $className, $args);
147 147
                 },
148
-                function () {
148
+                function() {
149 149
                 }
150 150
             ),
151 151
         ];
Please login to merge, or discard this patch.