@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | if ($formBuilder) { |
| 44 | 44 | $formBuilder->addEventListener( |
| 45 | 45 | FormEvents::SUBMIT, |
| 46 | - function (FormEvent $event) use (&$mutationEvent) { |
|
| 46 | + function(FormEvent $event) use (&$mutationEvent) { |
|
| 47 | 47 | if ($this->eventDispatcher) { |
| 48 | 48 | $mutationEvent = new GraphQLMutationEvent($this->context, $event); |
| 49 | 49 | $this->eventDispatcher->dispatch(GraphQLEvents::MUTATION_SUBMITTED, $mutationEvent); |
@@ -53,8 +53,8 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | $formBuilder->addEventSubscriber($this); |
| 55 | 55 | |
| 56 | - $extensionExecutor = function ($method) { |
|
| 57 | - return function (FormEvent $event) use ($method) { |
|
| 56 | + $extensionExecutor = function($method) { |
|
| 57 | + return function(FormEvent $event) use ($method) { |
|
| 58 | 58 | foreach ($this->extensions as $extension) { |
| 59 | 59 | return call_user_func_array([$extension, $method], [$event]); |
| 60 | 60 | } |
@@ -75,8 +75,8 @@ |
||
| 75 | 75 | |
| 76 | 76 | //build the ID encoder manager with configured encoder |
| 77 | 77 | $container->getDefinition(IDEncoderManager::class) |
| 78 | - ->setPublic(true) |
|
| 79 | - ->replaceArgument(0, $container->getDefinition($config['id_encoder'])); |
|
| 78 | + ->setPublic(true) |
|
| 79 | + ->replaceArgument(0, $container->getDefinition($config['id_encoder'])); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
@@ -103,9 +103,9 @@ |
||
| 103 | 103 | |
| 104 | 104 | /** @var iterable $files */ |
| 105 | 105 | $files = Finder::create() |
| 106 | - ->in($dirs) |
|
| 107 | - ->date(sprintf('>= %s', date('Y-m-d H:i:s', $controlTime))) |
|
| 108 | - ->files(); |
|
| 106 | + ->in($dirs) |
|
| 107 | + ->date(sprintf('>= %s', date('Y-m-d H:i:s', $controlTime))) |
|
| 108 | + ->files(); |
|
| 109 | 109 | |
| 110 | 110 | //exist at least one modified file |
| 111 | 111 | foreach ($files as $file) { |
@@ -37,13 +37,13 @@ |
||
| 37 | 37 | [ |
| 38 | 38 | 'name' => $definition->getName(), |
| 39 | 39 | 'description' => $definition->getDescription(), |
| 40 | - 'fields' => function () use ($definition) { |
|
| 40 | + 'fields' => function() use ($definition) { |
|
| 41 | 41 | return GraphQLBuilder::resolveFields($definition); |
| 42 | 42 | }, |
| 43 | - 'interfaces' => function () { |
|
| 43 | + 'interfaces' => function() { |
|
| 44 | 44 | return $this->resolveInterfaces(); |
| 45 | 45 | }, |
| 46 | - 'resolveField' => function ($root, array $args, $context, ResolveInfo $resolveInfo) { |
|
| 46 | + 'resolveField' => function($root, array $args, $context, ResolveInfo $resolveInfo) { |
|
| 47 | 47 | $resolver = new ObjectFieldResolver( |
| 48 | 48 | $this->container, |
| 49 | 49 | $this->endpoint, |
@@ -43,10 +43,10 @@ |
||
| 43 | 43 | [ |
| 44 | 44 | 'name' => $definition->getName(), |
| 45 | 45 | 'description' => $definition->getDescription(), |
| 46 | - 'fields' => function () use ($definition) { |
|
| 46 | + 'fields' => function() use ($definition) { |
|
| 47 | 47 | return GraphQLBuilder::resolveFields($definition); |
| 48 | 48 | }, |
| 49 | - 'resolveType' => function ($value) { |
|
| 49 | + 'resolveType' => function($value) { |
|
| 50 | 50 | return TypeUtil::resolveObjectType($this->endpoint, $value); |
| 51 | 51 | }, |
| 52 | 52 | ] |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | * |
| 83 | 83 | * @return null|string |
| 84 | 84 | */ |
| 85 | - public function getClassForType(string $type):?string |
|
| 85 | + public function getClassForType(string $type): ?string |
|
| 86 | 86 | { |
| 87 | 87 | if (isset($this->typeMap[$type])) { |
| 88 | 88 | return $this->typeMap[$type]; |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | { |
| 111 | 111 | $types = array_filter( |
| 112 | 112 | $this->typeMap, |
| 113 | - function ($val) use ($class) { |
|
| 113 | + function($val) use ($class) { |
|
| 114 | 114 | return $val === $class; |
| 115 | 115 | } |
| 116 | 116 | ); |
@@ -42,10 +42,10 @@ |
||
| 42 | 42 | protected function configure() |
| 43 | 43 | { |
| 44 | 44 | $this->setName('graphql:schema:export') |
| 45 | - ->setDescription('Export your schema.') |
|
| 46 | - ->addOption('endpoint', null, InputOption::VALUE_REQUIRED, 'Name of the endpoint to export', DefinitionRegistry::DEFAULT_ENDPOINT) |
|
| 47 | - ->addOption('output', 'o', InputOption::VALUE_REQUIRED, 'Name of the file to save the schema, e.i. schema.graphql or schema.json') |
|
| 48 | - ->addOption('json', null, InputOption::VALUE_NONE, 'Create json output, automatically used if the output contains json extension'); |
|
| 45 | + ->setDescription('Export your schema.') |
|
| 46 | + ->addOption('endpoint', null, InputOption::VALUE_REQUIRED, 'Name of the endpoint to export', DefinitionRegistry::DEFAULT_ENDPOINT) |
|
| 47 | + ->addOption('output', 'o', InputOption::VALUE_REQUIRED, 'Name of the file to save the schema, e.i. schema.graphql or schema.json') |
|
| 48 | + ->addOption('json', null, InputOption::VALUE_NONE, 'Create json output, automatically used if the output contains json extension'); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -57,11 +57,11 @@ |
||
| 57 | 57 | protected function configure() |
| 58 | 58 | { |
| 59 | 59 | $this->setName('graphql:schema:snapshot') |
| 60 | - ->setDescription('Create a snapshot of your schema to compare using behat tests.') |
|
| 61 | - ->addOption('endpoint', null, InputOption::VALUE_REQUIRED, 'Name of the endpoint to export', DefinitionRegistry::DEFAULT_ENDPOINT) |
|
| 62 | - ->addOption('all', 'a', InputOption::VALUE_NONE, 'Create snapshot for all registered endpoints') |
|
| 63 | - ->addOption('strict', null, InputOption::VALUE_NONE, 'When use strict mode the snapshot must be updated every time your schema change') |
|
| 64 | - ->addOption('features', null, InputOption::VALUE_REQUIRED, 'Path where should be located the generated features and fixtures'); |
|
| 60 | + ->setDescription('Create a snapshot of your schema to compare using behat tests.') |
|
| 61 | + ->addOption('endpoint', null, InputOption::VALUE_REQUIRED, 'Name of the endpoint to export', DefinitionRegistry::DEFAULT_ENDPOINT) |
|
| 62 | + ->addOption('all', 'a', InputOption::VALUE_NONE, 'Create snapshot for all registered endpoints') |
|
| 63 | + ->addOption('strict', null, InputOption::VALUE_NONE, 'When use strict mode the snapshot must be updated every time your schema change') |
|
| 64 | + ->addOption('features', null, InputOption::VALUE_REQUIRED, 'Path where should be located the generated features and fixtures'); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | /** |
@@ -239,7 +239,7 @@ |
||
| 239 | 239 | public function sendRequest($method, $uri, array $parameters = [], array $files = [], array $server = [], $content = null, $changeHistory = true) |
| 240 | 240 | { |
| 241 | 241 | set_error_handler( |
| 242 | - function ($level, $message, $errFile, $errLine) { |
|
| 242 | + function($level, $message, $errFile, $errLine) { |
|
| 243 | 243 | if ($this->deprecationAdviser) { |
| 244 | 244 | $this->deprecationAdviser->addWarning($message, $errFile, $errLine); |
| 245 | 245 | } |