@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | * For the full copyright and license information, please view the LICENSE |
| 6 | 6 | * file that was distributed with this source code. |
| 7 | 7 | */ |
| 8 | -declare(strict_types=1); |
|
| 8 | +declare(strict_types = 1); |
|
| 9 | 9 | |
| 10 | 10 | namespace Railt\Adapters\Webonyx; |
| 11 | 11 | |
@@ -103,8 +103,8 @@ discard block |
||
| 103 | 103 | $value = $this->executeSchema($request, $schema); |
| 104 | 104 | |
| 105 | 105 | [$data, $errors] = [ |
| 106 | - (array)($value['data'] ?? []), |
|
| 107 | - (array)($value['errors'] ?? []), |
|
| 106 | + (array) ($value['data'] ?? []), |
|
| 107 | + (array) ($value['errors'] ?? []), |
|
| 108 | 108 | ]; |
| 109 | 109 | |
| 110 | 110 | $response = new Response($data, $errors); |
@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | * For the full copyright and license information, please view the LICENSE |
| 6 | 6 | * file that was distributed with this source code. |
| 7 | 7 | */ |
| 8 | -declare(strict_types=1); |
|
| 8 | +declare(strict_types = 1); |
|
| 9 | 9 | |
| 10 | 10 | namespace Railt\Adapters\Webonyx\Builder; |
| 11 | 11 | |
@@ -37,17 +37,17 @@ discard block |
||
| 37 | 37 | return new ObjectType([ |
| 38 | 38 | 'name' => $this->type->getName(), |
| 39 | 39 | 'description' => $this->type->getDescription(), |
| 40 | - 'fields' => function (): array { |
|
| 40 | + 'fields' => function(): array { |
|
| 41 | 41 | return iterator_to_array($this->getObjectFields()); |
| 42 | 42 | }, |
| 43 | - 'resolveField' => function ($value, array $args = [], $context, ResolveInfo $info) { |
|
| 43 | + 'resolveField' => function($value, array $args = [], $context, ResolveInfo $info) { |
|
| 44 | 44 | $input = new Input($args, $info); |
| 45 | 45 | |
| 46 | - $input = $this->events->dispatch('request:' . $input->getPath(), $input); |
|
| 46 | + $input = $this->events->dispatch('request:'.$input->getPath(), $input); |
|
| 47 | 47 | |
| 48 | 48 | $value = $this->fetchData($input, $value); |
| 49 | 49 | |
| 50 | - $value = $this->events->dispatch('response:' . $input->getPath(), $value); |
|
| 50 | + $value = $this->events->dispatch('response:'.$input->getPath(), $value); |
|
| 51 | 51 | |
| 52 | 52 | return $value; |
| 53 | 53 | }, |
@@ -60,10 +60,10 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | private function getObjectFields(): \Traversable |
| 62 | 62 | { |
| 63 | - $prefix = 'field:' . $this->type->getName(); |
|
| 63 | + $prefix = 'field:'.$this->type->getName(); |
|
| 64 | 64 | |
| 65 | 65 | foreach ($this->type->getFields() as $field) { |
| 66 | - if ($this->events->dispatch($prefix . '.' . $field->getName(), $field)) { |
|
| 66 | + if ($this->events->dispatch($prefix.'.'.$field->getName(), $field)) { |
|
| 67 | 67 | yield $field->getName() => $this->make($field, FieldBuilder::class); |
| 68 | 68 | } |
| 69 | 69 | } |