@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | public static function allRules() |
| 116 | 116 | { |
| 117 | - if (! self::$initRules) { |
|
| 117 | + if (!self::$initRules) { |
|
| 118 | 118 | static::$rules = array_merge(static::defaultRules(), self::securityRules(), self::$rules); |
| 119 | 119 | static::$initRules = true; |
| 120 | 120 | } |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | return is_array($value) |
| 236 | 236 | ? count(array_filter( |
| 237 | 237 | $value, |
| 238 | - function ($item) { |
|
| 238 | + function($item) { |
|
| 239 | 239 | return $item instanceof \Exception || $item instanceof \Throwable; |
| 240 | 240 | } |
| 241 | 241 | )) === count($value) |
@@ -133,8 +133,8 @@ discard block |
||
| 133 | 133 | { |
| 134 | 134 | $result = []; |
| 135 | 135 | |
| 136 | - if (! empty($this->errors)) { |
|
| 137 | - $errorsHandler = $this->errorsHandler ?: function (array $errors, callable $formatter) { |
|
| 136 | + if (!empty($this->errors)) { |
|
| 137 | + $errorsHandler = $this->errorsHandler ?: function(array $errors, callable $formatter) { |
|
| 138 | 138 | return array_map($formatter, $errors); |
| 139 | 139 | }; |
| 140 | 140 | |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | $result['data'] = $this->data; |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | - if (! empty($this->extensions)) { |
|
| 151 | + if (!empty($this->extensions)) { |
|
| 152 | 152 | $result['extensions'] = (array) $this->extensions; |
| 153 | 153 | } |
| 154 | 154 | |
@@ -80,12 +80,12 @@ |
||
| 80 | 80 | // TODO: rework with generators when PHP minimum required version is changed to 5.5+ |
| 81 | 81 | $promisesOrValues = Utils::map( |
| 82 | 82 | $promisesOrValues, |
| 83 | - function ($item) { |
|
| 83 | + function($item) { |
|
| 84 | 84 | return $item instanceof Promise ? $item->adoptedPromise : $item; |
| 85 | 85 | } |
| 86 | 86 | ); |
| 87 | 87 | |
| 88 | - $promise = all($promisesOrValues)->then(function ($values) use ($promisesOrValues) { |
|
| 88 | + $promise = all($promisesOrValues)->then(function($values) use ($promisesOrValues) { |
|
| 89 | 89 | $orderedResults = []; |
| 90 | 90 | |
| 91 | 91 | foreach ($promisesOrValues as $key => $value) { |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | public static function runQueue() |
| 41 | 41 | { |
| 42 | 42 | $q = self::$queue; |
| 43 | - while ($q && ! $q->isEmpty()) { |
|
| 43 | + while ($q && !$q->isEmpty()) { |
|
| 44 | 44 | $task = $q->dequeue(); |
| 45 | 45 | $task(); |
| 46 | 46 | } |
@@ -55,10 +55,10 @@ discard block |
||
| 55 | 55 | } |
| 56 | 56 | if (is_object($value) && method_exists($value, 'then')) { |
| 57 | 57 | $value->then( |
| 58 | - function ($resolvedValue) { |
|
| 58 | + function($resolvedValue) { |
|
| 59 | 59 | $this->resolve($resolvedValue); |
| 60 | 60 | }, |
| 61 | - function ($reason) { |
|
| 61 | + function($reason) { |
|
| 62 | 62 | $this->reject($reason); |
| 63 | 63 | } |
| 64 | 64 | ); |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | public function reject($reason) |
| 86 | 86 | { |
| 87 | - if (! $reason instanceof \Exception && ! $reason instanceof \Throwable) { |
|
| 87 | + if (!$reason instanceof \Exception && !$reason instanceof \Throwable) { |
|
| 88 | 88 | throw new \Exception('SyncPromise::reject() has to be called with an instance of \Throwable'); |
| 89 | 89 | } |
| 90 | 90 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | ); |
| 115 | 115 | |
| 116 | 116 | foreach ($this->waiting as $descriptor) { |
| 117 | - self::getQueue()->enqueue(function () use ($descriptor) { |
|
| 117 | + self::getQueue()->enqueue(function() use ($descriptor) { |
|
| 118 | 118 | /** @var $promise self */ |
| 119 | 119 | list($promise, $onFulfilled, $onRejected) = $descriptor; |
| 120 | 120 | |
@@ -151,10 +151,10 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | public function then(?callable $onFulfilled = null, ?callable $onRejected = null) |
| 153 | 153 | { |
| 154 | - if ($this->state === self::REJECTED && ! $onRejected) { |
|
| 154 | + if ($this->state === self::REJECTED && !$onRejected) { |
|
| 155 | 155 | return $this; |
| 156 | 156 | } |
| 157 | - if ($this->state === self::FULFILLED && ! $onFulfilled) { |
|
| 157 | + if ($this->state === self::FULFILLED && !$onFulfilled) { |
|
| 158 | 158 | return $this; |
| 159 | 159 | } |
| 160 | 160 | $tmp = new self(); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | */ |
| 32 | 32 | public function convertThenable($thenable) |
| 33 | 33 | { |
| 34 | - if (! $thenable instanceof Deferred) { |
|
| 34 | + if (!$thenable instanceof Deferred) { |
|
| 35 | 35 | throw new InvariantViolation('Expected instance of GraphQL\Deferred, got ' . Utils::printSafe($thenable)); |
| 36 | 36 | } |
| 37 | 37 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | if ($promiseOrValue instanceof Promise) { |
| 112 | 112 | $result[$index] = null; |
| 113 | 113 | $promiseOrValue->then( |
| 114 | - function ($value) use ($index, &$count, $total, &$result, $all) { |
|
| 114 | + function($value) use ($index, &$count, $total, &$result, $all) { |
|
| 115 | 115 | $result[$index] = $value; |
| 116 | 116 | $count++; |
| 117 | 117 | if ($count < $total) { |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | $promiseQueue = SyncPromise::getQueue(); |
| 147 | 147 | |
| 148 | 148 | while ($promise->adoptedPromise->state === SyncPromise::PENDING && |
| 149 | - ! ($dfdQueue->isEmpty() && $promiseQueue->isEmpty()) |
|
| 149 | + !($dfdQueue->isEmpty() && $promiseQueue->isEmpty()) |
|
| 150 | 150 | ) { |
| 151 | 151 | Deferred::runQueue(); |
| 152 | 152 | SyncPromise::runQueue(); |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | */ |
| 24 | 24 | public function __construct($adoptedPromise, PromiseAdapter $adapter) |
| 25 | 25 | { |
| 26 | - Utils::invariant(! $adoptedPromise instanceof self, 'Expecting promise from adapted system, got ' . __CLASS__); |
|
| 26 | + Utils::invariant(!$adoptedPromise instanceof self, 'Expecting promise from adapted system, got ' . __CLASS__); |
|
| 27 | 27 | |
| 28 | 28 | $this->adapter = $adapter; |
| 29 | 29 | $this->adoptedPromise = $adoptedPromise; |
@@ -489,7 +489,7 @@ |
||
| 489 | 489 | case 117: |
| 490 | 490 | $position = $this->position; |
| 491 | 491 | list ($hex) = $this->readChars(4, true); |
| 492 | - if (! preg_match('/[0-9a-fA-F]{4}/', $hex)) { |
|
| 492 | + if (!preg_match('/[0-9a-fA-F]{4}/', $hex)) { |
|
| 493 | 493 | throw new SyntaxError( |
| 494 | 494 | $this->source, |
| 495 | 495 | $position - 1, |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | $this->endToken = $endToken; |
| 68 | 68 | $this->source = $source; |
| 69 | 69 | |
| 70 | - if (! $startToken || ! $endToken) { |
|
| 70 | + if (!$startToken || !$endToken) { |
|
| 71 | 71 | return; |
| 72 | 72 | } |
| 73 | 73 | |
@@ -94,19 +94,19 @@ discard block |
||
| 94 | 94 | $ast, |
| 95 | 95 | [ |
| 96 | 96 | 'leave' => [ |
| 97 | - NodeKind::NAME => function (Node $node) { |
|
| 97 | + NodeKind::NAME => function(Node $node) { |
|
| 98 | 98 | return '' . $node->value; |
| 99 | 99 | }, |
| 100 | 100 | |
| 101 | - NodeKind::VARIABLE => function ($node) { |
|
| 101 | + NodeKind::VARIABLE => function($node) { |
|
| 102 | 102 | return '$' . $node->name; |
| 103 | 103 | }, |
| 104 | 104 | |
| 105 | - NodeKind::DOCUMENT => function (DocumentNode $node) { |
|
| 105 | + NodeKind::DOCUMENT => function(DocumentNode $node) { |
|
| 106 | 106 | return $this->join($node->definitions, "\n\n") . "\n"; |
| 107 | 107 | }, |
| 108 | 108 | |
| 109 | - NodeKind::OPERATION_DEFINITION => function (OperationDefinitionNode $node) { |
|
| 109 | + NodeKind::OPERATION_DEFINITION => function(OperationDefinitionNode $node) { |
|
| 110 | 110 | $op = $node->operation; |
| 111 | 111 | $name = $node->name; |
| 112 | 112 | $varDefs = $this->wrap('(', $this->join($node->variableDefinitions, ', '), ')'); |
@@ -114,20 +114,20 @@ discard block |
||
| 114 | 114 | $selectionSet = $node->selectionSet; |
| 115 | 115 | // Anonymous queries with no directives or variable definitions can use |
| 116 | 116 | // the query short form. |
| 117 | - return ! $name && ! $directives && ! $varDefs && $op === 'query' |
|
| 117 | + return !$name && !$directives && !$varDefs && $op === 'query' |
|
| 118 | 118 | ? $selectionSet |
| 119 | 119 | : $this->join([$op, $this->join([$name, $varDefs]), $directives, $selectionSet], ' '); |
| 120 | 120 | }, |
| 121 | 121 | |
| 122 | - NodeKind::VARIABLE_DEFINITION => function (VariableDefinitionNode $node) { |
|
| 122 | + NodeKind::VARIABLE_DEFINITION => function(VariableDefinitionNode $node) { |
|
| 123 | 123 | return $node->variable . ': ' . $node->type . $this->wrap(' = ', $node->defaultValue); |
| 124 | 124 | }, |
| 125 | 125 | |
| 126 | - NodeKind::SELECTION_SET => function (SelectionSetNode $node) { |
|
| 126 | + NodeKind::SELECTION_SET => function(SelectionSetNode $node) { |
|
| 127 | 127 | return $this->block($node->selections); |
| 128 | 128 | }, |
| 129 | 129 | |
| 130 | - NodeKind::FIELD => function (FieldNode $node) { |
|
| 130 | + NodeKind::FIELD => function(FieldNode $node) { |
|
| 131 | 131 | return $this->join( |
| 132 | 132 | [ |
| 133 | 133 | $this->wrap('', $node->alias, ': ') . $node->name . $this->wrap( |
@@ -142,15 +142,15 @@ discard block |
||
| 142 | 142 | ); |
| 143 | 143 | }, |
| 144 | 144 | |
| 145 | - NodeKind::ARGUMENT => function (ArgumentNode $node) { |
|
| 145 | + NodeKind::ARGUMENT => function(ArgumentNode $node) { |
|
| 146 | 146 | return $node->name . ': ' . $node->value; |
| 147 | 147 | }, |
| 148 | 148 | |
| 149 | - NodeKind::FRAGMENT_SPREAD => function (FragmentSpreadNode $node) { |
|
| 149 | + NodeKind::FRAGMENT_SPREAD => function(FragmentSpreadNode $node) { |
|
| 150 | 150 | return '...' . $node->name . $this->wrap(' ', $this->join($node->directives, ' ')); |
| 151 | 151 | }, |
| 152 | 152 | |
| 153 | - NodeKind::INLINE_FRAGMENT => function (InlineFragmentNode $node) { |
|
| 153 | + NodeKind::INLINE_FRAGMENT => function(InlineFragmentNode $node) { |
|
| 154 | 154 | return $this->join( |
| 155 | 155 | [ |
| 156 | 156 | '...', |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | ); |
| 163 | 163 | }, |
| 164 | 164 | |
| 165 | - NodeKind::FRAGMENT_DEFINITION => function (FragmentDefinitionNode $node) { |
|
| 165 | + NodeKind::FRAGMENT_DEFINITION => function(FragmentDefinitionNode $node) { |
|
| 166 | 166 | // Note: fragment variable definitions are experimental and may be changed or removed in the future. |
| 167 | 167 | return sprintf('fragment %s', $node->name) |
| 168 | 168 | . $this->wrap('(', $this->join($node->variableDefinitions, ', '), ')') |
@@ -171,15 +171,15 @@ discard block |
||
| 171 | 171 | . $node->selectionSet; |
| 172 | 172 | }, |
| 173 | 173 | |
| 174 | - NodeKind::INT => function (IntValueNode $node) { |
|
| 174 | + NodeKind::INT => function(IntValueNode $node) { |
|
| 175 | 175 | return $node->value; |
| 176 | 176 | }, |
| 177 | 177 | |
| 178 | - NodeKind::FLOAT => function (FloatValueNode $node) { |
|
| 178 | + NodeKind::FLOAT => function(FloatValueNode $node) { |
|
| 179 | 179 | return $node->value; |
| 180 | 180 | }, |
| 181 | 181 | |
| 182 | - NodeKind::STRING => function (StringValueNode $node, $key) { |
|
| 182 | + NodeKind::STRING => function(StringValueNode $node, $key) { |
|
| 183 | 183 | if ($node->block) { |
| 184 | 184 | return $this->printBlockString($node->value, $key === 'description'); |
| 185 | 185 | } |
@@ -187,47 +187,47 @@ discard block |
||
| 187 | 187 | return json_encode($node->value); |
| 188 | 188 | }, |
| 189 | 189 | |
| 190 | - NodeKind::BOOLEAN => function (BooleanValueNode $node) { |
|
| 190 | + NodeKind::BOOLEAN => function(BooleanValueNode $node) { |
|
| 191 | 191 | return $node->value ? 'true' : 'false'; |
| 192 | 192 | }, |
| 193 | 193 | |
| 194 | - NodeKind::NULL => function (NullValueNode $node) { |
|
| 194 | + NodeKind::NULL => function(NullValueNode $node) { |
|
| 195 | 195 | return 'null'; |
| 196 | 196 | }, |
| 197 | 197 | |
| 198 | - NodeKind::ENUM => function (EnumValueNode $node) { |
|
| 198 | + NodeKind::ENUM => function(EnumValueNode $node) { |
|
| 199 | 199 | return $node->value; |
| 200 | 200 | }, |
| 201 | 201 | |
| 202 | - NodeKind::LST => function (ListValueNode $node) { |
|
| 202 | + NodeKind::LST => function(ListValueNode $node) { |
|
| 203 | 203 | return '[' . $this->join($node->values, ', ') . ']'; |
| 204 | 204 | }, |
| 205 | 205 | |
| 206 | - NodeKind::OBJECT => function (ObjectValueNode $node) { |
|
| 206 | + NodeKind::OBJECT => function(ObjectValueNode $node) { |
|
| 207 | 207 | return '{' . $this->join($node->fields, ', ') . '}'; |
| 208 | 208 | }, |
| 209 | 209 | |
| 210 | - NodeKind::OBJECT_FIELD => function (ObjectFieldNode $node) { |
|
| 210 | + NodeKind::OBJECT_FIELD => function(ObjectFieldNode $node) { |
|
| 211 | 211 | return $node->name . ': ' . $node->value; |
| 212 | 212 | }, |
| 213 | 213 | |
| 214 | - NodeKind::DIRECTIVE => function (DirectiveNode $node) { |
|
| 214 | + NodeKind::DIRECTIVE => function(DirectiveNode $node) { |
|
| 215 | 215 | return '@' . $node->name . $this->wrap('(', $this->join($node->arguments, ', '), ')'); |
| 216 | 216 | }, |
| 217 | 217 | |
| 218 | - NodeKind::NAMED_TYPE => function (NamedTypeNode $node) { |
|
| 218 | + NodeKind::NAMED_TYPE => function(NamedTypeNode $node) { |
|
| 219 | 219 | return $node->name; |
| 220 | 220 | }, |
| 221 | 221 | |
| 222 | - NodeKind::LIST_TYPE => function (ListTypeNode $node) { |
|
| 222 | + NodeKind::LIST_TYPE => function(ListTypeNode $node) { |
|
| 223 | 223 | return '[' . $node->type . ']'; |
| 224 | 224 | }, |
| 225 | 225 | |
| 226 | - NodeKind::NON_NULL_TYPE => function (NonNullTypeNode $node) { |
|
| 226 | + NodeKind::NON_NULL_TYPE => function(NonNullTypeNode $node) { |
|
| 227 | 227 | return $node->type . '!'; |
| 228 | 228 | }, |
| 229 | 229 | |
| 230 | - NodeKind::SCHEMA_DEFINITION => function (SchemaDefinitionNode $def) { |
|
| 230 | + NodeKind::SCHEMA_DEFINITION => function(SchemaDefinitionNode $def) { |
|
| 231 | 231 | return $this->join( |
| 232 | 232 | [ |
| 233 | 233 | 'schema', |
@@ -238,15 +238,15 @@ discard block |
||
| 238 | 238 | ); |
| 239 | 239 | }, |
| 240 | 240 | |
| 241 | - NodeKind::OPERATION_TYPE_DEFINITION => function (OperationTypeDefinitionNode $def) { |
|
| 241 | + NodeKind::OPERATION_TYPE_DEFINITION => function(OperationTypeDefinitionNode $def) { |
|
| 242 | 242 | return $def->operation . ': ' . $def->type; |
| 243 | 243 | }, |
| 244 | 244 | |
| 245 | - NodeKind::SCALAR_TYPE_DEFINITION => $this->addDescription(function (ScalarTypeDefinitionNode $def) { |
|
| 245 | + NodeKind::SCALAR_TYPE_DEFINITION => $this->addDescription(function(ScalarTypeDefinitionNode $def) { |
|
| 246 | 246 | return $this->join(['scalar', $def->name, $this->join($def->directives, ' ')], ' '); |
| 247 | 247 | }), |
| 248 | 248 | |
| 249 | - NodeKind::OBJECT_TYPE_DEFINITION => $this->addDescription(function (ObjectTypeDefinitionNode $def) { |
|
| 249 | + NodeKind::OBJECT_TYPE_DEFINITION => $this->addDescription(function(ObjectTypeDefinitionNode $def) { |
|
| 250 | 250 | return $this->join( |
| 251 | 251 | [ |
| 252 | 252 | 'type', |
@@ -259,14 +259,14 @@ discard block |
||
| 259 | 259 | ); |
| 260 | 260 | }), |
| 261 | 261 | |
| 262 | - NodeKind::FIELD_DEFINITION => $this->addDescription(function (FieldDefinitionNode $def) { |
|
| 262 | + NodeKind::FIELD_DEFINITION => $this->addDescription(function(FieldDefinitionNode $def) { |
|
| 263 | 263 | return $def->name |
| 264 | 264 | . $this->wrap('(', $this->join($def->arguments, ', '), ')') |
| 265 | 265 | . ': ' . $def->type |
| 266 | 266 | . $this->wrap(' ', $this->join($def->directives, ' ')); |
| 267 | 267 | }), |
| 268 | 268 | |
| 269 | - NodeKind::INPUT_VALUE_DEFINITION => $this->addDescription(function (InputValueDefinitionNode $def) { |
|
| 269 | + NodeKind::INPUT_VALUE_DEFINITION => $this->addDescription(function(InputValueDefinitionNode $def) { |
|
| 270 | 270 | return $this->join( |
| 271 | 271 | [ |
| 272 | 272 | $def->name . ': ' . $def->type, |
@@ -278,7 +278,7 @@ discard block |
||
| 278 | 278 | }), |
| 279 | 279 | |
| 280 | 280 | NodeKind::INTERFACE_TYPE_DEFINITION => $this->addDescription( |
| 281 | - function (InterfaceTypeDefinitionNode $def) { |
|
| 281 | + function(InterfaceTypeDefinitionNode $def) { |
|
| 282 | 282 | return $this->join( |
| 283 | 283 | [ |
| 284 | 284 | 'interface', |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | } |
| 292 | 292 | ), |
| 293 | 293 | |
| 294 | - NodeKind::UNION_TYPE_DEFINITION => $this->addDescription(function (UnionTypeDefinitionNode $def) { |
|
| 294 | + NodeKind::UNION_TYPE_DEFINITION => $this->addDescription(function(UnionTypeDefinitionNode $def) { |
|
| 295 | 295 | return $this->join( |
| 296 | 296 | [ |
| 297 | 297 | 'union', |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | ); |
| 306 | 306 | }), |
| 307 | 307 | |
| 308 | - NodeKind::ENUM_TYPE_DEFINITION => $this->addDescription(function (EnumTypeDefinitionNode $def) { |
|
| 308 | + NodeKind::ENUM_TYPE_DEFINITION => $this->addDescription(function(EnumTypeDefinitionNode $def) { |
|
| 309 | 309 | return $this->join( |
| 310 | 310 | [ |
| 311 | 311 | 'enum', |
@@ -317,11 +317,11 @@ discard block |
||
| 317 | 317 | ); |
| 318 | 318 | }), |
| 319 | 319 | |
| 320 | - NodeKind::ENUM_VALUE_DEFINITION => $this->addDescription(function (EnumValueDefinitionNode $def) { |
|
| 320 | + NodeKind::ENUM_VALUE_DEFINITION => $this->addDescription(function(EnumValueDefinitionNode $def) { |
|
| 321 | 321 | return $this->join([$def->name, $this->join($def->directives, ' ')], ' '); |
| 322 | 322 | }), |
| 323 | 323 | |
| 324 | - NodeKind::INPUT_OBJECT_TYPE_DEFINITION => $this->addDescription(function ( |
|
| 324 | + NodeKind::INPUT_OBJECT_TYPE_DEFINITION => $this->addDescription(function( |
|
| 325 | 325 | InputObjectTypeDefinitionNode $def |
| 326 | 326 | ) { |
| 327 | 327 | return $this->join( |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | ); |
| 336 | 336 | }), |
| 337 | 337 | |
| 338 | - NodeKind::SCALAR_TYPE_EXTENSION => function (ScalarTypeExtensionNode $def) { |
|
| 338 | + NodeKind::SCALAR_TYPE_EXTENSION => function(ScalarTypeExtensionNode $def) { |
|
| 339 | 339 | return $this->join( |
| 340 | 340 | [ |
| 341 | 341 | 'extend scalar', |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | ); |
| 347 | 347 | }, |
| 348 | 348 | |
| 349 | - NodeKind::OBJECT_TYPE_EXTENSION => function (ObjectTypeExtensionNode $def) { |
|
| 349 | + NodeKind::OBJECT_TYPE_EXTENSION => function(ObjectTypeExtensionNode $def) { |
|
| 350 | 350 | return $this->join( |
| 351 | 351 | [ |
| 352 | 352 | 'extend type', |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | ); |
| 360 | 360 | }, |
| 361 | 361 | |
| 362 | - NodeKind::INTERFACE_TYPE_EXTENSION => function (InterfaceTypeExtensionNode $def) { |
|
| 362 | + NodeKind::INTERFACE_TYPE_EXTENSION => function(InterfaceTypeExtensionNode $def) { |
|
| 363 | 363 | return $this->join( |
| 364 | 364 | [ |
| 365 | 365 | 'extend interface', |
@@ -371,7 +371,7 @@ discard block |
||
| 371 | 371 | ); |
| 372 | 372 | }, |
| 373 | 373 | |
| 374 | - NodeKind::UNION_TYPE_EXTENSION => function (UnionTypeExtensionNode $def) { |
|
| 374 | + NodeKind::UNION_TYPE_EXTENSION => function(UnionTypeExtensionNode $def) { |
|
| 375 | 375 | return $this->join( |
| 376 | 376 | [ |
| 377 | 377 | 'extend union', |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | ); |
| 386 | 386 | }, |
| 387 | 387 | |
| 388 | - NodeKind::ENUM_TYPE_EXTENSION => function (EnumTypeExtensionNode $def) { |
|
| 388 | + NodeKind::ENUM_TYPE_EXTENSION => function(EnumTypeExtensionNode $def) { |
|
| 389 | 389 | return $this->join( |
| 390 | 390 | [ |
| 391 | 391 | 'extend enum', |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | ); |
| 398 | 398 | }, |
| 399 | 399 | |
| 400 | - NodeKind::INPUT_OBJECT_TYPE_EXTENSION => function (InputObjectTypeExtensionNode $def) { |
|
| 400 | + NodeKind::INPUT_OBJECT_TYPE_EXTENSION => function(InputObjectTypeExtensionNode $def) { |
|
| 401 | 401 | return $this->join( |
| 402 | 402 | [ |
| 403 | 403 | 'extend input', |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | ); |
| 410 | 410 | }, |
| 411 | 411 | |
| 412 | - NodeKind::DIRECTIVE_DEFINITION => $this->addDescription(function (DirectiveDefinitionNode $def) { |
|
| 412 | + NodeKind::DIRECTIVE_DEFINITION => $this->addDescription(function(DirectiveDefinitionNode $def) { |
|
| 413 | 413 | return 'directive @' |
| 414 | 414 | . $def->name |
| 415 | 415 | . $this->wrap('(', $this->join($def->arguments, ', '), ')') |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | |
| 423 | 423 | public function addDescription(\Closure $cb) |
| 424 | 424 | { |
| 425 | - return function ($node) use ($cb) { |
|
| 425 | + return function($node) use ($cb) { |
|
| 426 | 426 | return $this->join([$node->description, $cb($node)], "\n"); |
| 427 | 427 | }; |
| 428 | 428 | } |
@@ -469,8 +469,8 @@ discard block |
||
| 469 | 469 | $separator, |
| 470 | 470 | Utils::filter( |
| 471 | 471 | $maybeArray, |
| 472 | - function ($x) { |
|
| 473 | - return ! ! $x; |
|
| 472 | + function($x) { |
|
| 473 | + return !!$x; |
|
| 474 | 474 | } |
| 475 | 475 | ) |
| 476 | 476 | ) |