@@ -55,7 +55,7 @@ |
||
| 55 | 55 | if (!empty($this->warnings)) { |
| 56 | 56 | uasort( |
| 57 | 57 | $this->warnings, |
| 58 | - function ($a, $b) { |
|
| 58 | + function($a, $b) { |
|
| 59 | 59 | if (count($a) === count($b)) { |
| 60 | 60 | return 0; |
| 61 | 61 | } |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | } |
| 69 | 69 | $this->definitionVisited[$key] = true; |
| 70 | 70 | |
| 71 | - $type = $endpoint->hasType($definition->getType()) ? $endpoint->getType($definition->getType()): null; |
|
| 71 | + $type = $endpoint->hasType($definition->getType()) ? $endpoint->getType($definition->getType()) : null; |
|
| 72 | 72 | |
| 73 | 73 | if (($roles = $definition->getRoles()) && !$this->authorizationChecker->isGranted($roles)) { |
| 74 | 74 | if ($parent) { |
@@ -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 | } |
@@ -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 | ); |
@@ -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 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | ->beforeNormalization() |
| 75 | 75 | ->ifString() |
| 76 | 76 | ->then( |
| 77 | - function ($v) { |
|
| 77 | + function($v) { |
|
| 78 | 78 | return [$v]; |
| 79 | 79 | } |
| 80 | 80 | ) |
@@ -87,14 +87,14 @@ discard block |
||
| 87 | 87 | ->beforeNormalization() |
| 88 | 88 | ->ifString() |
| 89 | 89 | ->then( |
| 90 | - function ($v) { |
|
| 90 | + function($v) { |
|
| 91 | 91 | return [$v]; |
| 92 | 92 | } |
| 93 | 93 | ) |
| 94 | 94 | ->end() |
| 95 | 95 | ->validate() |
| 96 | 96 | ->ifTrue( |
| 97 | - function (array $value) { |
|
| 97 | + function(array $value) { |
|
| 98 | 98 | foreach ($value as $val) { |
| 99 | 99 | try { |
| 100 | 100 | preg_match($val, null); |
@@ -111,14 +111,14 @@ discard block |
||
| 111 | 111 | ->beforeNormalization() |
| 112 | 112 | ->ifString() |
| 113 | 113 | ->then( |
| 114 | - function ($v) { |
|
| 114 | + function($v) { |
|
| 115 | 115 | return [$v]; |
| 116 | 116 | } |
| 117 | 117 | ) |
| 118 | 118 | ->end() |
| 119 | 119 | ->validate() |
| 120 | 120 | ->ifTrue( |
| 121 | - function (array $value) { |
|
| 121 | + function(array $value) { |
|
| 122 | 122 | foreach ($value as $val) { |
| 123 | 123 | try { |
| 124 | 124 | preg_match($val, null); |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | ->useAttributeAsKey('name') |
| 137 | 137 | ->validate() |
| 138 | 138 | ->ifTrue( |
| 139 | - function ($v) { |
|
| 139 | + function($v) { |
|
| 140 | 140 | return array_key_exists('default', $v); |
| 141 | 141 | } |
| 142 | 142 | )->thenInvalid('"default" can\'t be used as endpoint name, the system internally use this endpoint name to store the entire schema.') |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | ->beforeNormalization() |
| 149 | 149 | ->ifString() |
| 150 | 150 | ->then( |
| 151 | - function ($v) { |
|
| 151 | + function($v) { |
|
| 152 | 152 | return preg_split('/\s*,\s*/', $v); |
| 153 | 153 | } |
| 154 | 154 | ) |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | ->beforeNormalization() |
| 166 | 166 | ->ifString() |
| 167 | 167 | ->then( |
| 168 | - function ($v) { |
|
| 168 | + function($v) { |
|
| 169 | 169 | return preg_split('/\s*,\s*/', $v); |
| 170 | 170 | } |
| 171 | 171 | ) |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | */ |
| 60 | 60 | protected function execute(InputInterface $input, OutputInterface $output) |
| 61 | 61 | { |
| 62 | - $this->errorManager->clear();//force reload |
|
| 62 | + $this->errorManager->clear(); //force reload |
|
| 63 | 63 | $errors = $this->errorManager->all(); |
| 64 | 64 | |
| 65 | 65 | $result = $output; |