@@ -84,12 +84,12 @@ |
||
| 84 | 84 | ); |
| 85 | 85 | $config->variableNode('options')->defaultValue([])->info('Form options'); |
| 86 | 86 | $config->variableNode('argument') |
| 87 | - ->defaultValue('input') |
|
| 88 | - ->info('Name of the argument to use as input'); |
|
| 87 | + ->defaultValue('input') |
|
| 88 | + ->info('Name of the argument to use as input'); |
|
| 89 | 89 | |
| 90 | 90 | $config->booleanNode('client_mutation_id') |
| 91 | - ->defaultTrue() |
|
| 92 | - ->info('Automatically add a field called clientMutationId'); |
|
| 91 | + ->defaultTrue() |
|
| 92 | + ->info('Automatically add a field called clientMutationId'); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /** |
@@ -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'] ?? []); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | if ($config['graphiql']['authentication']['provider']['lexik_jwt']['enabled'] ?? false) { |
| 108 | 108 | $providerName = sprintf('security.user.provider.concrete.%s', $config['graphiql']['authentication']['provider']['lexik_jwt']['user_provider']); |
| 109 | 109 | $container->getDefinition(LexikJWTGraphiQLAuthenticator::class) |
| 110 | - ->setArgument(1, new Reference($providerName)); |
|
| 110 | + ->setArgument(1, new Reference($providerName)); |
|
| 111 | 111 | } else { |
| 112 | 112 | $container->removeDefinition(LexikJWTGraphiQLAuthenticator::class); |
| 113 | 113 | } |
@@ -116,14 +116,14 @@ discard block |
||
| 116 | 116 | |
| 117 | 117 | //build the ID encoder manager with configured encoder |
| 118 | 118 | $container->getDefinition(IDEncoderManager::class) |
| 119 | - ->setPublic(true) |
|
| 120 | - ->replaceArgument(0, new Reference($config['id_encoder'])); |
|
| 119 | + ->setPublic(true) |
|
| 120 | + ->replaceArgument(0, new Reference($config['id_encoder'])); |
|
| 121 | 121 | |
| 122 | 122 | |
| 123 | 123 | //endpoint definition |
| 124 | 124 | $container->getDefinition(GraphQLEndpointController::class) |
| 125 | - ->addMethodCall('setErrorFormatter', [new Reference($config['error_handling']['formatter'])]) |
|
| 126 | - ->addMethodCall('setErrorHandler', [new Reference($config['error_handling']['handler'])]); |
|
| 125 | + ->addMethodCall('setErrorFormatter', [new Reference($config['error_handling']['formatter'])]) |
|
| 126 | + ->addMethodCall('setErrorHandler', [new Reference($config['error_handling']['handler'])]); |
|
| 127 | 127 | |
| 128 | 128 | $bundles = $container->getParameter('kernel.bundles'); |
| 129 | 129 | if (isset($bundles['MercureBundle']) && $config['subscriptions']['enabled']) { |
@@ -132,19 +132,19 @@ discard block |
||
| 132 | 132 | $mercurePublisherReference = new Reference(sprintf('mercure.hub.%s.publisher', $mercureHub)); |
| 133 | 133 | |
| 134 | 134 | $container->getDefinition(SubscriptionManager::class) |
| 135 | - ->addArgument(new Reference($config['subscriptions']['pubsub_handler'])) |
|
| 136 | - ->addArgument(new Parameter('kernel.secret')); |
|
| 135 | + ->addArgument(new Reference($config['subscriptions']['pubsub_handler'])) |
|
| 136 | + ->addArgument(new Parameter('kernel.secret')); |
|
| 137 | 137 | |
| 138 | 138 | $container->getDefinition(Subscriber::class) |
| 139 | - ->addMethodCall('setMercureHubUrl', [new Parameter('mercure.hubs'), $mercureHub]); |
|
| 139 | + ->addMethodCall('setMercureHubUrl', [new Parameter('mercure.hubs'), $mercureHub]); |
|
| 140 | 140 | |
| 141 | 141 | $container->getDefinition(SubscriptionConsumerCommand::class) |
| 142 | - ->addArgument($mercurePublisherReference); |
|
| 142 | + ->addArgument($mercurePublisherReference); |
|
| 143 | 143 | |
| 144 | 144 | $container->getDefinition(GraphQLEndpointController::class)->addMethodCall('setPublisher', [$mercurePublisherReference]); |
| 145 | 145 | |
| 146 | 146 | $container->registerForAutoconfiguration(SubscriptionAwareInterface::class) |
| 147 | - ->addMethodCall('setPublisher', [new Reference(Publisher::class)]); |
|
| 147 | + ->addMethodCall('setPublisher', [new Reference(Publisher::class)]); |
|
| 148 | 148 | } else { |
| 149 | 149 | $container->removeDefinition(SubscriptionManager::class); |
| 150 | 150 | $container->removeDefinition(MercureHubCommand::class); |
@@ -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))); |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | protected function configure() |
| 58 | 58 | { |
| 59 | 59 | $this->setName('graphql:subscriptions:consume') |
| 60 | - ->setDescription('Listen for subscriptions to consume then and dispatch to mercure HUB.'); |
|
| 60 | + ->setDescription('Listen for subscriptions to consume then and dispatch to mercure HUB.'); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -136,12 +136,12 @@ |
||
| 136 | 136 | |
| 137 | 137 | if ($resolver && $refMethod) { |
| 138 | 138 | $this->context = ContextBuilder::create($context->getEndpoint()) |
| 139 | - ->setRoot($root) |
|
| 140 | - ->setResolveInfo($resolveInfo) |
|
| 141 | - ->setArgs($args) |
|
| 142 | - ->setMetas($context->getMetas()) |
|
| 143 | - ->setDefinition($this->executableDefinition) |
|
| 144 | - ->build(); |
|
| 139 | + ->setRoot($root) |
|
| 140 | + ->setResolveInfo($resolveInfo) |
|
| 141 | + ->setArgs($args) |
|
| 142 | + ->setMetas($context->getMetas()) |
|
| 143 | + ->setDefinition($this->executableDefinition) |
|
| 144 | + ->build(); |
|
| 145 | 145 | |
| 146 | 146 | if ($resolver instanceof ResolverInterface) { |
| 147 | 147 | $resolver->setContext($this->context); |
@@ -88,12 +88,12 @@ |
||
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | $context = ContextBuilder::create($context->getEndpoint()) |
| 91 | - ->setArgs($args) |
|
| 92 | - ->setRoot($root) |
|
| 93 | - ->setDefinition($queryDefinition) |
|
| 94 | - ->setResolveInfo($info) |
|
| 95 | - ->setMetas($context->getMetas()) |
|
| 96 | - ->build(); |
|
| 91 | + ->setArgs($args) |
|
| 92 | + ->setRoot($root) |
|
| 93 | + ->setDefinition($queryDefinition) |
|
| 94 | + ->setResolveInfo($info) |
|
| 95 | + ->setMetas($context->getMetas()) |
|
| 96 | + ->build(); |
|
| 97 | 97 | |
| 98 | 98 | $resolver = new ResolverExecutor($this->container, $queryDefinition); |
| 99 | 99 | $value = $resolver($root, $args, $context, $info); |
@@ -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 | |