@@ -59,7 +59,7 @@ |
||
59 | 59 | $container->setParameter('graphql.namespaces', $config['namespaces'] ?? []); |
60 | 60 | $container->setParameter('graphql.cors_config', $config['cors'] ?? []); |
61 | 61 | $container->setParameter('graphql.graphiql', $config['graphiql'] ?? []); |
62 | - $container->setParameter('graphql.graphiql_auth_jwt', $config['graphiql']['authentication']['provider']['jwt'] ?? []);//DEPRECATED |
|
62 | + $container->setParameter('graphql.graphiql_auth_jwt', $config['graphiql']['authentication']['provider']['jwt'] ?? []); //DEPRECATED |
|
63 | 63 | $container->setParameter('graphql.graphiql_auth_lexik_jwt', $config['graphiql']['authentication']['provider']['lexik_jwt'] ?? []); |
64 | 64 | $container->setParameter('graphql.security.validation_rules', $config['security']['validation_rules'] ?? []); |
65 | 65 | $container->setParameter('graphql.subscriptions.redis', $config['subscriptions']['redis'] ?? []); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | $defaults = [ |
24 | 24 | 'name' => 'Subscription', |
25 | - 'fields' => function () { |
|
25 | + 'fields' => function() { |
|
26 | 26 | $subscriptions = []; |
27 | 27 | foreach ($this->endpoint->allSubscriptions() as $subscription) { |
28 | 28 | $subscriptions[$subscription->getName()] = $this->getQueryConfig($subscription); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | [ |
32 | 32 | 'name' => $definition->getName(), |
33 | 33 | 'description' => $definition->getDescription(), |
34 | - 'types' => function () use ($definition) { |
|
34 | + 'types' => function() use ($definition) { |
|
35 | 35 | $types = []; |
36 | 36 | $unionTypes = $definition->getTypes(); |
37 | 37 | |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | return $types; |
72 | 72 | }, |
73 | - 'resolveType' => function ($value) { |
|
73 | + 'resolveType' => function($value) { |
|
74 | 74 | $type = TypeUtil::resolveObjectType($this->endpoint, $value); |
75 | 75 | if (!$type) { |
76 | 76 | throw new \RuntimeException(sprintf('Can`t resolve a valid type for object of class %s.', get_class($value))); |
@@ -143,7 +143,7 @@ |
||
143 | 143 | $this->consumer->setOption(\Redis::OPT_PREFIX, $this->prefix); |
144 | 144 | $this->consumer->subscribe( |
145 | 145 | $channels, |
146 | - function (\Redis $redis, $chan, $event) use ($dispatch) { |
|
146 | + function(\Redis $redis, $chan, $event) use ($dispatch) { |
|
147 | 147 | $iterator = null; |
148 | 148 | while ($iterator !== 0) { |
149 | 149 | while ($keys = $this->client->scan($iterator, "*$chan:*", 100)) { |
@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | // use alias |
29 | 29 | $orderByFields = FieldOptionsHelper::normalize($context->getParentContext()->getDefinition()->getMeta('pagination')['order_by'] ?? ['*']); |
30 | - if (isset($orderByFields[$column])){ |
|
30 | + if (isset($orderByFields[$column])) { |
|
31 | 31 | $column = $orderByFields[$column]; |
32 | 32 | } |
33 | 33 |
@@ -86,9 +86,9 @@ |
||
86 | 86 | } |
87 | 87 | |
88 | 88 | // check access on interfaces |
89 | - if ($objectDefinition instanceof ObjectDefinition){ |
|
90 | - foreach ($objectDefinition->getInterfaces() as $interface){ |
|
91 | - $interfaceDef =$event->getContext()->getEndpoint()->getType($interface); |
|
89 | + if ($objectDefinition instanceof ObjectDefinition) { |
|
90 | + foreach ($objectDefinition->getInterfaces() as $interface) { |
|
91 | + $interfaceDef = $event->getContext()->getEndpoint()->getType($interface); |
|
92 | 92 | if ($this->accessControlChecker->isControlled($interfaceDef) |
93 | 93 | && !$this->accessControlChecker->isGranted($interfaceDef, $event->getContext()->getRoot()) |
94 | 94 | ) { |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | { |
47 | 47 | $defaults = [ |
48 | 48 | 'name' => 'Query', |
49 | - 'fields' => function () { |
|
49 | + 'fields' => function() { |
|
50 | 50 | $queries = []; |
51 | 51 | foreach ($this->endpoint->allQueries() as $query) { |
52 | 52 | $queries[$query->getName()] = $this->getQueryConfig($query); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | |
75 | 75 | |
76 | 76 | $container = $this->container; |
77 | - $config['resolve'] = function ($root, array $args, ResolverContext $context, ResolveInfo $resolveInfo) use ($container, $query) { |
|
77 | + $config['resolve'] = function($root, array $args, ResolverContext $context, ResolveInfo $resolveInfo) use ($container, $query) { |
|
78 | 78 | $eventDispatcher = $this->container->get(EventDispatcherInterface::class); |
79 | 79 | |
80 | 80 | $context = ContextBuilder::create($this->endpoint) |
@@ -79,7 +79,7 @@ |
||
79 | 79 | $subscribersByTopics = []; |
80 | 80 | |
81 | 81 | $process->run( |
82 | - static function ($type, $msg) use ($output, &$subscribersByTopics, $subscriptionManager) { |
|
82 | + static function($type, $msg) use ($output, &$subscribersByTopics, $subscriptionManager) { |
|
83 | 83 | $output->writeln($msg); |
84 | 84 | |
85 | 85 | $connected = strpos($msg, '"New subscriber"') !== false; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | array_walk_recursive( |
102 | 102 | $data, |
103 | - function (&$value, $key) { |
|
103 | + function(&$value, $key) { |
|
104 | 104 | if (is_object($value)) { |
105 | 105 | throw new \RuntimeException( |
106 | 106 | sprintf('The object "%s" in key "%s" can\'t be part of publish data, only scalar values can be sent.', get_class($value), $key) |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $channels = array_keys($this->registry->getEndpoint()->getSubscriptionsResolvers()); |
122 | 122 | $this->pubSubHandler->consume( |
123 | 123 | $channels, |
124 | - function (SubscriptionMessage $message) use ($output, $debug) { |
|
124 | + function(SubscriptionMessage $message) use ($output, $debug) { |
|
125 | 125 | /** @var Request $request */ |
126 | 126 | $request = $message->getMeta()['request'] ?? null; |
127 | 127 | $subscribedFilters = $message->getMeta()['arguments'] ?? []; |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | { |
170 | 170 | array_walk_recursive( |
171 | 171 | $data, |
172 | - function (&$value) { |
|
172 | + function(&$value) { |
|
173 | 173 | if ($value instanceof NodeInterface) { |
174 | 174 | $value = IDEncoder::encode($value); |
175 | 175 | } |