@@ -43,6 +43,6 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | public function getDeprecationReason(): string |
| 45 | 45 | { |
| 46 | - return (string)$this->deprecation; |
|
| 46 | + return (string) $this->deprecation; |
|
| 47 | 47 | } |
| 48 | 48 | } |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | */ |
| 49 | 49 | public function getDescription(): string |
| 50 | 50 | { |
| 51 | - return (string)$this->description; |
|
| 51 | + return (string) $this->description; |
|
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | { |
| 23 | 23 | $name = \ucwords(\mb_strtolower(\preg_replace('/\W+/u', ' ', $name))); |
| 24 | 24 | |
| 25 | - return (string)\str_replace(' ', '', $name); |
|
| 25 | + return (string) \str_replace(' ', '', $name); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -110,7 +110,7 @@ |
||
| 110 | 110 | * @version SDL June 2018 |
| 111 | 111 | * @var string |
| 112 | 112 | */ |
| 113 | - public const INTERFACE = 'INTERFACE'; |
|
| 113 | + public const INTERFACE = 'INTERFACE'; |
|
| 114 | 114 | |
| 115 | 115 | /** |
| 116 | 116 | * @version SDL June 2018 |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * @version SDL June 2018 |
| 111 | 111 | * @var string |
| 112 | 112 | */ |
| 113 | - public const INTERFACE = 'INTERFACE'; |
|
| 113 | + public const interface = 'INTERFACE'; |
|
| 114 | 114 | |
| 115 | 115 | /** |
| 116 | 116 | * @version SDL June 2018 |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | public const SDL_LOCATIONS = [ |
| 162 | 162 | self::SCALAR, |
| 163 | 163 | self::OBJECT, |
| 164 | - self::INTERFACE, |
|
| 164 | + self::interface, |
|
| 165 | 165 | self::UNION, |
| 166 | 166 | self::ENUM, |
| 167 | 167 | self::INPUT_OBJECT, |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | public const LOCATION_TO_TYPES = [ |
| 181 | 181 | self::SCALAR => TypeInterface::SCALAR, |
| 182 | 182 | self::OBJECT => TypeInterface::OBJECT, |
| 183 | - self::INTERFACE => TypeInterface::INTERFACE, |
|
| 183 | + self::interface => TypeInterface::interface, |
|
| 184 | 184 | self::UNION => TypeInterface::UNION, |
| 185 | 185 | self::ENUM => TypeInterface::ENUM, |
| 186 | 186 | self::INPUT_OBJECT => TypeInterface::INPUT_OBJECT, |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | public const TYPE_DESCRIPTION = <<<Description |
| 40 | 40 | The @skip directive may be provided for fields, fragment spreads, and inline fragments, |
| 41 | 41 | and allows for conditional exclusion during execution as described by the if argument. |
| 42 | -Description; |
|
| 42 | +description; |
|
| 43 | 43 | |
| 44 | 44 | /** |
| 45 | 45 | * BooleanScalar constructor. |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | ->withArgument((new ArgumentDefinition($this, 'if', 'Boolean')) |
| 55 | 55 | ->withLine(56) |
| 56 | 56 | ->withModifiers(ArgumentDefinition::IS_NOT_NULL)) |
| 57 | - ->withLocation(...\array_map(function (string $location) use ($document): DirectiveLocation { |
|
| 57 | + ->withLocation(...\array_map(function(string $location) use ($document): DirectiveLocation { |
|
| 58 | 58 | return new DirectiveLocation($this, $location); |
| 59 | 59 | }, self::LOCATIONS)); |
| 60 | 60 | } |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | private const LOCATIONS = [ |
| 26 | 26 | DirectiveLocation::OBJECT, |
| 27 | - DirectiveLocation::INTERFACE, |
|
| 27 | + DirectiveLocation::interface, |
|
| 28 | 28 | DirectiveLocation::FIELD_DEFINITION, |
| 29 | 29 | DirectiveLocation::SCALAR, |
| 30 | 30 | DirectiveLocation::UNION, |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | The @deprecated directive is used within the type system definition language to |
| 48 | 48 | indicate deprecated portions of a GraphQL service’s schema, such as deprecated |
| 49 | 49 | fields on a type or deprecated enum values. |
| 50 | -Description; |
|
| 50 | +description; |
|
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | * BooleanScalar constructor. |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | ->withArgument((new ArgumentDefinition($this, 'reason', 'String')) |
| 63 | 63 | ->withLine(39) |
| 64 | 64 | ->withDefaultValue('No longer supported')) |
| 65 | - ->withLocation(...\array_map(function (string $location) use ($document): DirectiveLocation { |
|
| 65 | + ->withLocation(...\array_map(function(string $location) use ($document): DirectiveLocation { |
|
| 66 | 66 | return new DirectiveLocation($this, $location); |
| 67 | 67 | }, self::LOCATIONS)); |
| 68 | 68 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | The @include directive may be provided for fields, fragment spreads, and inline |
| 41 | 41 | fragments, and allows for conditional inclusion during execution as described |
| 42 | 42 | by the if argument. |
| 43 | -Description; |
|
| 43 | +description; |
|
| 44 | 44 | |
| 45 | 45 | /** |
| 46 | 46 | * BooleanScalar constructor. |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | ->withArgument((new ArgumentDefinition($this, 'if', 'Boolean')) |
| 56 | 56 | ->withLine(67) |
| 57 | 57 | ->withModifiers(ArgumentDefinition::IS_NOT_NULL)) |
| 58 | - ->withLocation(...\array_map(function (string $location) use ($document): DirectiveLocation { |
|
| 58 | + ->withLocation(...\array_map(function(string $location) use ($document): DirectiveLocation { |
|
| 59 | 59 | return new DirectiveLocation($this, $location); |
| 60 | 60 | }, self::LOCATIONS)); |
| 61 | 61 | } |
@@ -71,6 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | 73 | * @param int ...$values |
| 74 | + * @param integer[] $values |
|
| 74 | 75 | * @return ProvidesTypeIndication|$this |
| 75 | 76 | */ |
| 76 | 77 | public function withModifiers(int ...$values): ProvidesTypeIndication |
@@ -83,7 +84,7 @@ discard block |
||
| 83 | 84 | } |
| 84 | 85 | |
| 85 | 86 | /** |
| 86 | - * @param string|TypeDefinition $type |
|
| 87 | + * @param string $type |
|
| 87 | 88 | * @return ProvidesTypeIndication|$this |
| 88 | 89 | */ |
| 89 | 90 | public function withTypeDefinition($type): ProvidesTypeIndication |
@@ -11,7 +11,6 @@ |
||
| 11 | 11 | |
| 12 | 12 | use Railt\Reflection\Contracts\Definition\Behaviour\ProvidesTypeIndication; |
| 13 | 13 | use Railt\Reflection\Contracts\Definition\TypeDefinition; |
| 14 | -use Railt\Reflection\Contracts\Dictionary; |
|
| 15 | 14 | |
| 16 | 15 | /** |
| 17 | 16 | * Trait HasTypeIndication |
@@ -65,14 +65,14 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | public function __toString(): string |
| 67 | 67 | { |
| 68 | - $parent = $this->getDictionary()->find($this->definition) ?: $this->definition . '<?>'; |
|
| 68 | + $parent = $this->getDictionary()->find($this->definition) ?: $this->definition.'<?>'; |
|
| 69 | 69 | |
| 70 | 70 | if ($this->isNonNull()) { |
| 71 | 71 | $parent .= '!'; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | if ($this->isList()) { |
| 75 | - $parent = '[' . $parent . ']'; |
|
| 75 | + $parent = '['.$parent.']'; |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | if ($this->isListOfNonNulls()) { |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | */ |
| 88 | 88 | public function isNonNull(): bool |
| 89 | 89 | { |
| 90 | - return (bool)($this->modifiers & ProvidesTypeIndication::IS_NOT_NULL); |
|
| 90 | + return (bool) ($this->modifiers & ProvidesTypeIndication::IS_NOT_NULL); |
|
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | */ |
| 96 | 96 | public function isList(): bool |
| 97 | 97 | { |
| 98 | - return (bool)($this->modifiers & ProvidesTypeIndication::IS_LIST); |
|
| 98 | + return (bool) ($this->modifiers & ProvidesTypeIndication::IS_LIST); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /** |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | public function isListOfNonNulls(): bool |
| 105 | 105 | { |
| 106 | - return (bool)($this->modifiers & ProvidesTypeIndication::IS_LIST_OF_NOT_NULL); |
|
| 106 | + return (bool) ($this->modifiers & ProvidesTypeIndication::IS_LIST_OF_NOT_NULL); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
@@ -168,7 +168,7 @@ |
||
| 168 | 168 | */ |
| 169 | 169 | protected function error(\Throwable $error): ExternalFileException |
| 170 | 170 | { |
| 171 | - if (! $error instanceof ExternalFileException) { |
|
| 171 | + if (!$error instanceof ExternalFileException) { |
|
| 172 | 172 | $error = new ReflectionException($error->getMessage(), $error->getCode(), $error); |
| 173 | 173 | } |
| 174 | 174 | |