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 (#7)
by Jérémiah
09:24
created
ExpressionLanguage/ConfigExpressionProvider.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,37 +20,37 @@
 block discarded – undo
20 20
     public function getFunctions()
21 21
     {
22 22
         return [
23
-            new ExpressionFunction('service', function () {}, function (array $variables, $value) {
23
+            new ExpressionFunction('service', function() {}, function(array $variables, $value) {
24 24
                 return $variables['container']->get($value);
25 25
             }),
26 26
 
27
-            new ExpressionFunction('parameter', function () {}, function (array $variables, $value) {
27
+            new ExpressionFunction('parameter', function() {}, function(array $variables, $value) {
28 28
                 return $variables['container']->getParameter($value);
29 29
             }),
30 30
 
31
-            new ExpressionFunction('isTypeOf', function () {}, function (array $variables, $className) {
31
+            new ExpressionFunction('isTypeOf', function() {}, function(array $variables, $className) {
32 32
                 return $variables['value'] instanceof $className;
33 33
             }),
34 34
 
35
-            new ExpressionFunction('resolver', function () {}, function (array $variables, $alias, array $args = []) {
35
+            new ExpressionFunction('resolver', function() {}, function(array $variables, $alias, array $args = []) {
36 36
                 return $variables['container']->get('overblog_graphql.resolver_resolver')->resolve([$alias, $args]);
37 37
             }),
38 38
 
39
-            new ExpressionFunction('mutation', function () {}, function (array $variables, $alias, array $args = []) {
39
+            new ExpressionFunction('mutation', function() {}, function(array $variables, $alias, array $args = []) {
40 40
                 return $variables['container']->get('overblog_graphql.mutation_resolver')->resolve([$alias, $args]);
41 41
             }),
42 42
 
43
-            new ExpressionFunction('globalId', function () {}, function (array $variables, $id, $typeName = null) {
43
+            new ExpressionFunction('globalId', function() {}, function(array $variables, $id, $typeName = null) {
44 44
                 $type = !empty($typeName) ? $typeName : $variables['info']->parentType->name;
45 45
 
46 46
                 return GlobalId::toGlobalId($type, $id);
47 47
             }),
48 48
 
49
-            new ExpressionFunction('fromGlobalId', function () {}, function (array $variables, $globalId) {
49
+            new ExpressionFunction('fromGlobalId', function() {}, function(array $variables, $globalId) {
50 50
                 return GlobalId::fromGlobalId($globalId);
51 51
             }),
52 52
 
53
-            new ExpressionFunction('newObject', function () {}, function (array $variables, $className, array $args = []) {
53
+            new ExpressionFunction('newObject', function() {}, function(array $variables, $className, array $args = []) {
54 54
                 return (new \ReflectionClass($className))->newInstanceArgs($args);
55 55
             }),
56 56
         ];
Please login to merge, or discard this patch.
ExpressionLanguage/AuthorizationExpressionProvider.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
     public function getFunctions()
20 20
     {
21 21
         return [
22
-            new ExpressionFunction('hasRole', function () {}, function (array $variables, $role) {
22
+            new ExpressionFunction('hasRole', function() {}, function(array $variables, $role) {
23 23
                 return $variables['container']->get('security.authorization_checker')->isGranted($role);
24 24
             }),
25 25
 
26
-            new ExpressionFunction('hasAnyRole', function () {}, function (array $variables, array $roles) {
26
+            new ExpressionFunction('hasAnyRole', function() {}, function(array $variables, array $roles) {
27 27
                 foreach ($roles as $role) {
28 28
                     if ($variables['container']->get('security.authorization_checker')->isGranted($role)) {
29 29
                         return true;
@@ -33,29 +33,29 @@  discard block
 block discarded – undo
33 33
                 return false;
34 34
             }),
35 35
 
36
-            new ExpressionFunction('isAnonymous', function () {}, function (array $variables) {
36
+            new ExpressionFunction('isAnonymous', function() {}, function(array $variables) {
37 37
                 return $variables['container']->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_ANONYMOUSLY');
38 38
             }),
39 39
 
40
-            new ExpressionFunction('isRememberMe', function () {}, function (array $variables) {
40
+            new ExpressionFunction('isRememberMe', function() {}, function(array $variables) {
41 41
                 return $variables['container']->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_REMEMBERED');
42 42
             }),
43 43
 
44
-            new ExpressionFunction('isFullyAuthenticated', function () {}, function (array $variables) {
44
+            new ExpressionFunction('isFullyAuthenticated', function() {}, function(array $variables) {
45 45
                 return $variables['container']->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY');
46 46
             }),
47 47
 
48
-            new ExpressionFunction('isAuthenticated', function () {}, function (array $variables) {
48
+            new ExpressionFunction('isAuthenticated', function() {}, function(array $variables) {
49 49
                 return
50 50
                     $variables['container']->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_REMEMBERED')
51 51
                     || $variables['container']->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY');
52 52
             }),
53 53
 
54
-            new ExpressionFunction('hasPermission', function () {}, function (array $variables, $object, $permission) {
54
+            new ExpressionFunction('hasPermission', function() {}, function(array $variables, $object, $permission) {
55 55
                 return $variables['container']->get('security.authorization_checker')->isGranted($permission, $object);
56 56
             }),
57 57
 
58
-            new ExpressionFunction('hasAnyPermission', function () {}, function (array $variables, $object, array $permissions) {
58
+            new ExpressionFunction('hasAnyPermission', function() {}, function(array $variables, $object, array $permissions) {
59 59
                 foreach ($permissions as $permission) {
60 60
                     if ($variables['container']->get('security.authorization_checker')->isGranted($permission, $object)) {
61 61
                         return true;
Please login to merge, or discard this patch.
Tests/Resolver/ResolverTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
     public function setUp()
32 32
     {
33
-        $this->closureProperty = function () {
33
+        $this->closureProperty = function() {
34 34
             return $this->privatePropertyWithoutGetter;
35 35
         };
36 36
     }
Please login to merge, or discard this patch.
Resolver/Config/FieldsConfigSolution.php 2 patches
Doc Comments   +11 added lines patch added patch discarded remove patch
@@ -247,6 +247,9 @@  discard block
 block discarded – undo
247 247
         return $type;
248 248
     }
249 249
 
250
+    /**
251
+     * @param callable $expression
252
+     */
250 253
     private function resolveAccessAndWrapResolveCallback($expression, callable $resolveCallback = null)
251 254
     {
252 255
         return function () use ($expression, $resolveCallback) {
@@ -277,6 +280,10 @@  discard block
 block discarded – undo
277 280
                 case is_array($result) || $result instanceof \ArrayAccess:
278 281
                     $result = array_filter(
279 282
                         array_map(
283
+
284
+                            /**
285
+                             * @param callable $object
286
+                             */
280 287
                             function ($object) use ($checkAccess) {
281 288
                                 return $checkAccess($object) ? $object : null;
282 289
                             },
@@ -287,6 +294,10 @@  discard block
 block discarded – undo
287 294
 
288 295
                 case $result instanceof Connection:
289 296
                     $result->edges = array_map(
297
+
298
+                        /**
299
+                         * @param callable $edge
300
+                         */
290 301
                         function (Edge $edge) use ($checkAccess) {
291 302
                             $edge->node = $checkAccess($edge->node) ? $edge->node : null;
292 303
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -130,14 +130,14 @@  discard block
 block discarded – undo
130 130
 
131 131
     private function resolveAccessAndWrapResolveCallback($expression, callable $resolveCallback = null)
132 132
     {
133
-        return function () use ($expression, $resolveCallback) {
133
+        return function() use ($expression, $resolveCallback) {
134 134
             $args = func_get_args();
135 135
 
136
-            $result = null !== $resolveCallback  ? call_user_func_array($resolveCallback, $args) : null;
136
+            $result = null !== $resolveCallback ? call_user_func_array($resolveCallback, $args) : null;
137 137
 
138 138
             $values = call_user_func_array([$this, 'solveResolveCallbackArgs'], $args);
139 139
 
140
-            $checkAccess = function ($object, $throwException = false) use ($expression, $values) {
140
+            $checkAccess = function($object, $throwException = false) use ($expression, $values) {
141 141
                 try {
142 142
                     $access = $this->solveUsingExpressionLanguageIfNeeded(
143 143
                         $expression,
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                 case is_array($result) || $result instanceof \ArrayAccess:
159 159
                     $result = array_filter(
160 160
                         array_map(
161
-                            function ($object) use ($checkAccess) {
161
+                            function($object) use ($checkAccess) {
162 162
                                 return $checkAccess($object) ? $object : null;
163 163
                             },
164 164
                             $result
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 
169 169
                 case $result instanceof Connection:
170 170
                     $result->edges = array_map(
171
-                        function (Edge $edge) use ($checkAccess) {
171
+                        function(Edge $edge) use ($checkAccess) {
172 172
                             $edge->node = $checkAccess($edge->node) ? $edge->node : null;
173 173
 
174 174
                             return $edge;
Please login to merge, or discard this patch.
Resolver/Config/ResolveCallbackConfigSolution.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
             return $value;
20 20
         }
21 21
 
22
-        return function () use ($value) {
22
+        return function() use ($value) {
23 23
             $args = func_get_args();
24 24
             $result = $this->solveUsingExpressionLanguageIfNeeded(
25 25
                 $value,
Please login to merge, or discard this patch.
Resolver/Config/AbstractConfigSolution.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
 
109 109
     protected function solveUsingExpressionLanguageIfNeeded($expression, array $values = [])
110 110
     {
111
-        if (is_string($expression) &&  0 === strpos($expression, '@=')) {
111
+        if (is_string($expression) && 0 === strpos($expression, '@=')) {
112 112
             return $this->expressionLanguage->evaluate(substr($expression, 2), $values);
113 113
         }
114 114
 
Please login to merge, or discard this patch.
Resolver/Config/TypeConfigSolution.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 
19 19
     public function solveTypeCallback($values)
20 20
     {
21
-        return function () use ($values) {
21
+        return function() use ($values) {
22 22
             return $this->solveType($values);
23 23
         };
24 24
     }
Please login to merge, or discard this patch.
Tests/Resolver/Config/FieldsConfigSolutionTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
     private function invokeResolveAccessAndWrapResolveCallback($hasAccess, callable $callback = null)
164 164
     {
165 165
         if (null === $callback) {
166
-            $callback = function ($value) {
166
+            $callback = function($value) {
167 167
                 return $value;
168 168
             };
169 169
         }
Please login to merge, or discard this patch.
Tests/Definition/MergeFieldTraitTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
                 ['foo'],
47 47
             ],
48 48
             [
49
-                function () {
49
+                function() {
50 50
                     return ['test'];
51 51
                 },
52 52
                 ['bar'],
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
     public function testGetFieldsWithDefaultsForceArray()
66 66
     {
67
-        $fields = $this->getFieldsWithDefaults(function () { return ['bar']; }, ['toto'], false);
67
+        $fields = $this->getFieldsWithDefaults(function() { return ['bar']; }, ['toto'], false);
68 68
         $this->assertInstanceOf('Closure', $fields);
69 69
         $this->assertEquals(['bar', 'toto'], $fields());
70 70
     }
Please login to merge, or discard this patch.