We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
@@ -47,7 +47,7 @@ |
||
47 | 47 | 'args' => [ |
48 | 48 | 'input' => ['type' => Type::nonNull($inputType)], |
49 | 49 | ], |
50 | - 'resolve' => function ($_, $input, $info) use ($mutateAndGetPayload, $name) { |
|
50 | + 'resolve' => function($_, $input, $info) use ($mutateAndGetPayload, $name) { |
|
51 | 51 | $payload = $mutateAndGetPayload($input['input'], $info); |
52 | 52 | $payload['clientMutationId'] = $input['input']['clientMutationId']; |
53 | 53 |
@@ -44,7 +44,7 @@ |
||
44 | 44 | */ |
45 | 45 | private function getDefaultErrorHandler() |
46 | 46 | { |
47 | - return function (array $errors, $throwRawException) { |
|
47 | + return function(array $errors, $throwRawException) { |
|
48 | 48 | $clean = []; |
49 | 49 | |
50 | 50 | /** @var Error $error */ |
@@ -103,9 +103,9 @@ discard block |
||
103 | 103 | // from config |
104 | 104 | if (!empty($config['definitions']['mappings']['types'])) { |
105 | 105 | $typesMappings = array_filter(array_map( |
106 | - function (array $typeMapping) use ($container) { |
|
106 | + function(array $typeMapping) use ($container) { |
|
107 | 107 | |
108 | - $params = $this->detectConfigFiles($container, $typeMapping['dir'], $typeMapping['type']); |
|
108 | + $params = $this->detectConfigFiles($container, $typeMapping['dir'], $typeMapping['type']); |
|
109 | 109 | |
110 | 110 | return $params; |
111 | 111 | }, |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | case 'xml': |
149 | 149 | try { |
150 | 150 | //@todo fix xml validateSchema |
151 | - $xml = XmlUtils::loadFile($file->getRealPath());//, array($this, 'validateSchema')); |
|
151 | + $xml = XmlUtils::loadFile($file->getRealPath()); //, array($this, 'validateSchema')); |
|
152 | 152 | foreach ($xml->documentElement->childNodes as $node) { |
153 | 153 | if (!$node instanceof \DOMElement) { |
154 | 154 | continue; |
@@ -20,58 +20,58 @@ |
||
20 | 20 | public function getFunctions() |
21 | 21 | { |
22 | 22 | return [ |
23 | - new ExpressionFunction('service', function ($arg) { |
|
23 | + new ExpressionFunction('service', function($arg) { |
|
24 | 24 | return sprintf('$container->get(%s)', $arg); |
25 | - }, function (array $variables, $value) { |
|
25 | + }, function(array $variables, $value) { |
|
26 | 26 | return $variables['container']->get($value); |
27 | 27 | }), |
28 | 28 | |
29 | - new ExpressionFunction('parameter', function ($arg) { |
|
29 | + new ExpressionFunction('parameter', function($arg) { |
|
30 | 30 | return sprintf('$container->getParameter(%s)', $arg); |
31 | - }, function (array $variables, $value) { |
|
31 | + }, function(array $variables, $value) { |
|
32 | 32 | return $variables['container']->getParameter($value); |
33 | 33 | }), |
34 | 34 | |
35 | - new ExpressionFunction('isTypeOf', function ($className) { |
|
35 | + new ExpressionFunction('isTypeOf', function($className) { |
|
36 | 36 | return sprintf('$value instanceof %s', $className); |
37 | - }, function (array $variables, $className) { |
|
37 | + }, function(array $variables, $className) { |
|
38 | 38 | return $variables['value'] instanceof $className; |
39 | 39 | }), |
40 | 40 | |
41 | - new ExpressionFunction('resolver', function ($alias, array $args = []) { |
|
41 | + new ExpressionFunction('resolver', function($alias, array $args = []) { |
|
42 | 42 | return sprintf('$container->get("overblog_graphql.resolver_resolver")->resolve([%s, $args])', $alias); |
43 | - }, function (array $variables, $alias, array $args = []) { |
|
43 | + }, function(array $variables, $alias, array $args = []) { |
|
44 | 44 | return $variables['container']->get('overblog_graphql.resolver_resolver')->resolve([$alias, $args]); |
45 | 45 | }), |
46 | 46 | |
47 | - new ExpressionFunction('mutation', function ($alias, array $args = []) { |
|
47 | + new ExpressionFunction('mutation', function($alias, array $args = []) { |
|
48 | 48 | return sprintf('$container->get("overblog_graphql.mutation_resolver")->resolve([%s, $args])', $alias); |
49 | - }, function (array $variables, $alias, array $args = []) { |
|
49 | + }, function(array $variables, $alias, array $args = []) { |
|
50 | 50 | return $variables['container']->get('overblog_graphql.mutation_resolver')->resolve([$alias, $args]); |
51 | 51 | }), |
52 | 52 | |
53 | - new ExpressionFunction('globalId', function ($id, $typeName = null) { |
|
53 | + new ExpressionFunction('globalId', function($id, $typeName = null) { |
|
54 | 54 | return sprintf( |
55 | 55 | '\\Overblog\\GraphQLBundle\\Relay\\Node\\GlobalId::toGlobalId(!empty(%s) ? %s : $info->parentType->name, %s)', |
56 | 56 | $typeName, |
57 | 57 | $typeName, |
58 | 58 | $id |
59 | 59 | ); |
60 | - }, function (array $variables, $id, $typeName = null) { |
|
60 | + }, function(array $variables, $id, $typeName = null) { |
|
61 | 61 | $type = !empty($typeName) ? $typeName : $variables['info']->parentType->name; |
62 | 62 | |
63 | 63 | return GlobalId::toGlobalId($type, $id); |
64 | 64 | }), |
65 | 65 | |
66 | - new ExpressionFunction('fromGlobalId', function ($globalId) { |
|
66 | + new ExpressionFunction('fromGlobalId', function($globalId) { |
|
67 | 67 | return sprintf('\\Overblog\\GraphQLBundle\\Relay\\Node\\GlobalId::fromGlobalId(%s)', $globalId); |
68 | - }, function (array $variables, $globalId) { |
|
68 | + }, function(array $variables, $globalId) { |
|
69 | 69 | return GlobalId::fromGlobalId($globalId); |
70 | 70 | }), |
71 | 71 | |
72 | - new ExpressionFunction('newObject', function ($className, array $args = []) { |
|
72 | + new ExpressionFunction('newObject', function($className, array $args = []) { |
|
73 | 73 | return sprintf('(new \ReflectionClass("%s"))->newInstanceArgs($args)', $className); |
74 | - }, function (array $variables, $className, array $args = []) { |
|
74 | + }, function(array $variables, $className, array $args = []) { |
|
75 | 75 | return (new \ReflectionClass($className))->newInstanceArgs($args); |
76 | 76 | }), |
77 | 77 | ]; |
@@ -19,13 +19,13 @@ discard block |
||
19 | 19 | public function getFunctions() |
20 | 20 | { |
21 | 21 | return [ |
22 | - new ExpressionFunction('hasRole', function ($role) { |
|
22 | + new ExpressionFunction('hasRole', function($role) { |
|
23 | 23 | return sprintf('$authChecker->isGranted(%s)', $role); |
24 | - }, function (array $variables, $role) { |
|
24 | + }, function(array $variables, $role) { |
|
25 | 25 | return $variables['container']->get('security.authorization_checker')->isGranted($role); |
26 | 26 | }), |
27 | 27 | |
28 | - new ExpressionFunction('hasAnyRole', function (array $roles) { |
|
28 | + new ExpressionFunction('hasAnyRole', function(array $roles) { |
|
29 | 29 | $compiler = 'false'; |
30 | 30 | foreach ($roles as $role) { |
31 | 31 | $compiler .= ' || '; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | return $compiler; |
36 | - }, function (array $variables, array $roles) { |
|
36 | + }, function(array $variables, array $roles) { |
|
37 | 37 | foreach ($roles as $role) { |
38 | 38 | if ($variables['container']->get('security.authorization_checker')->isGranted($role)) { |
39 | 39 | return true; |
@@ -43,35 +43,35 @@ discard block |
||
43 | 43 | return false; |
44 | 44 | }), |
45 | 45 | |
46 | - new ExpressionFunction('isAnonymous', function () { |
|
46 | + new ExpressionFunction('isAnonymous', function() { |
|
47 | 47 | return '$authChecker->isGranted("IS_AUTHENTICATED_ANONYMOUSLY")'; |
48 | - }, function (array $variables) { |
|
48 | + }, function(array $variables) { |
|
49 | 49 | return $variables['container']->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_ANONYMOUSLY'); |
50 | 50 | }), |
51 | 51 | |
52 | - new ExpressionFunction('isRememberMe', function () { |
|
52 | + new ExpressionFunction('isRememberMe', function() { |
|
53 | 53 | return '$authChecker->isGranted("IS_AUTHENTICATED_REMEMBERED")'; |
54 | - }, function (array $variables) { |
|
54 | + }, function(array $variables) { |
|
55 | 55 | return $variables['container']->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_REMEMBERED'); |
56 | 56 | }), |
57 | 57 | |
58 | - new ExpressionFunction('isFullyAuthenticated', function () { |
|
58 | + new ExpressionFunction('isFullyAuthenticated', function() { |
|
59 | 59 | return sprintf('$authChecker->isGranted("IS_AUTHENTICATED_FULLY")'); |
60 | - }, function (array $variables) { |
|
60 | + }, function(array $variables) { |
|
61 | 61 | return $variables['container']->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY'); |
62 | 62 | }), |
63 | 63 | |
64 | - new ExpressionFunction('isAuthenticated', function () { |
|
64 | + new ExpressionFunction('isAuthenticated', function() { |
|
65 | 65 | return '$authChecker->isGranted("IS_AUTHENTICATED_REMEMBERED") || $authChecker->isGranted("IS_AUTHENTICATED_FULLY")'; |
66 | - }, function (array $variables) { |
|
66 | + }, function(array $variables) { |
|
67 | 67 | return |
68 | 68 | $variables['container']->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_REMEMBERED') |
69 | 69 | || $variables['container']->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY'); |
70 | 70 | }), |
71 | 71 | |
72 | - new ExpressionFunction('hasPermission', function ($object, $permission) { |
|
72 | + new ExpressionFunction('hasPermission', function($object, $permission) { |
|
73 | 73 | return sprintf('$authChecker->isGranted(%s, $object)', $permission); |
74 | - }, function (array $variables, $object, $permission) { |
|
74 | + }, function(array $variables, $object, $permission) { |
|
75 | 75 | return $variables['container']->get('security.authorization_checker')->isGranted($permission, $object); |
76 | 76 | }), |
77 | 77 | ]; |