@@ -11,7 +11,6 @@ |
||
| 11 | 11 | |
| 12 | 12 | use GraphQL\Type\Definition\EnumType; |
| 13 | 13 | use Railt\Reflection\Abstraction\EnumTypeInterface; |
| 14 | -use Railt\Reflection\Abstraction\EnumValueInterface; |
|
| 15 | 14 | |
| 16 | 15 | /** |
| 17 | 16 | * Class EnumTypeBuilder |
@@ -5,7 +5,7 @@ |
||
| 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 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | * @param InputInterface $input |
| 120 | 120 | * @param mixed $value |
| 121 | 121 | * @param null $default |
| 122 | - * @return mixed|null |
|
| 122 | + * @return Action |
|
| 123 | 123 | */ |
| 124 | 124 | private function getFieldValue(InputInterface $input, $value, $default = null) |
| 125 | 125 | { |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | /** |
| 134 | 134 | * @param Action $action |
| 135 | 135 | * @param array $params |
| 136 | - * @return mixed |
|
| 136 | + * @return Action |
|
| 137 | 137 | */ |
| 138 | 138 | private function callAction(Action $action, array $params = []) |
| 139 | 139 | { |
@@ -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 | |
@@ -39,17 +39,17 @@ discard block |
||
| 39 | 39 | return new ObjectType([ |
| 40 | 40 | 'name' => $this->type->getName(), |
| 41 | 41 | 'description' => $this->type->getDescription(), |
| 42 | - 'fields' => function (): array { |
|
| 42 | + 'fields' => function(): array { |
|
| 43 | 43 | return iterator_to_array($this->getObjectFields()); |
| 44 | 44 | }, |
| 45 | - 'resolveField' => function ($value, array $args = [], $context, ResolveInfo $info) { |
|
| 45 | + 'resolveField' => function($value, array $args = [], $context, ResolveInfo $info) { |
|
| 46 | 46 | $input = new Input($args, $info); |
| 47 | 47 | |
| 48 | - $this->events->dispatch('request:' . $input->getPath(), $input); |
|
| 48 | + $this->events->dispatch('request:'.$input->getPath(), $input); |
|
| 49 | 49 | |
| 50 | 50 | $value = $this->fetchData($input, $value); |
| 51 | 51 | |
| 52 | - $this->events->dispatch('response:' . $input->getPath(), $value, $input); |
|
| 52 | + $this->events->dispatch('response:'.$input->getPath(), $value, $input); |
|
| 53 | 53 | |
| 54 | 54 | return $value; |
| 55 | 55 | }, |
@@ -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 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | } |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - throw new \LogicException($definition->getTypeName() . ' not buildable yet'); |
|
| 107 | + throw new \LogicException($definition->getTypeName().' not buildable yet'); |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | */ |
| 131 | 131 | private function makeCachedNamedDefinition(NamedDefinitionInterface $definition, string $class) |
| 132 | 132 | { |
| 133 | - if (! isset($this->dictionary[$definition->getName()])) { |
|
| 133 | + if (!isset($this->dictionary[$definition->getName()])) { |
|
| 134 | 134 | $this->dictionary[$definition->getName()] = $this->make($definition, $class); |
| 135 | 135 | } |
| 136 | 136 | |
@@ -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 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | 'types' => function() { |
| 34 | 34 | return iterator_to_array($this->getUnionTypes()); |
| 35 | 35 | }, |
| 36 | - 'resolveType' => function ($value) { |
|
| 36 | + 'resolveType' => function($value) { |
|
| 37 | 37 | dd($value); |
| 38 | 38 | } |
| 39 | 39 | ]); |
@@ -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 | |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | return new InputObjectType([ |
| 30 | 30 | 'name' => $this->type->getName(), |
| 31 | 31 | 'description' => $this->type->getDescription(), |
| 32 | - 'fields' => function (): array { |
|
| 32 | + 'fields' => function(): array { |
|
| 33 | 33 | return iterator_to_array($this->getInputFields()); |
| 34 | 34 | } |
| 35 | 35 | ]); |