@@ -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 | /** |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | * @param TypeDefinition $definition |
| 89 | 89 | * @return bool |
| 90 | 90 | */ |
| 91 | - public function instanceOf(TypeDefinition $definition): bool |
|
| 91 | + public function instanceof(TypeDefinition $definition): bool |
|
| 92 | 92 | { |
| 93 | 93 | if ($definition::getType()->is(Type::ANY)) { |
| 94 | 94 | return true; |
@@ -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 | /** |
@@ -50,8 +50,8 @@ |
||
| 50 | 50 | private function invoke(string $name, TypeDefinition $from = null): void |
| 51 | 51 | { |
| 52 | 52 | foreach ($this->callbacks as $callback) { |
| 53 | - if (! $this->has($name)) { |
|
| 54 | - $callback($name, $from, function (TypeDefinition $type): void { |
|
| 53 | + if (!$this->has($name)) { |
|
| 54 | + $callback($name, $from, function(TypeDefinition $type): void { |
|
| 55 | 55 | $this->add($type); |
| 56 | 56 | }); |
| 57 | 57 | } |
@@ -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, |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | public const LOCATION_TO_TYPES = [ |
| 182 | 182 | self::SCALAR => Type::SCALAR, |
| 183 | 183 | self::OBJECT => Type::OBJECT, |
| 184 | - self::INTERFACE => Type::INTERFACE, |
|
| 184 | + self::interface => Type::interface, |
|
| 185 | 185 | self::UNION => Type::UNION, |
| 186 | 186 | self::ENUM => Type::ENUM, |
| 187 | 187 | self::INPUT_OBJECT => Type::INPUT_OBJECT, |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | * @param TypeDefinition $definition |
| 39 | 39 | * @return bool |
| 40 | 40 | */ |
| 41 | - public function instanceOf(TypeDefinition $definition): bool; |
|
| 41 | + public function instanceof(TypeDefinition $definition): bool; |
|
| 42 | 42 | |
| 43 | 43 | /** |
| 44 | 44 | * @return Dictionary |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | */ |
| 71 | 71 | private function bootInheritance(\SplStack $stack, array $children = []): void |
| 72 | 72 | { |
| 73 | - $push = function (string $type) use ($stack): void { |
|
| 73 | + $push = function(string $type) use ($stack): void { |
|
| 74 | 74 | self::$inheritance[$type] = \array_values(\iterator_to_array($stack)); |
| 75 | 75 | self::$inheritance[$type][] = static::ROOT_TYPE; |
| 76 | 76 | |
@@ -114,7 +114,7 @@ |
||
| 114 | 114 | * @param TypeInterface $type |
| 115 | 115 | * @return bool |
| 116 | 116 | */ |
| 117 | - public function instanceOf(TypeInterface $type): bool |
|
| 117 | + public function instanceof(TypeInterface $type): bool |
|
| 118 | 118 | { |
| 119 | 119 | $needle = $type->getName(); |
| 120 | 120 | |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | an object or as the key for a cache. The ID type is serialized in the |
| 31 | 31 | same way as a String; however, defining it as an ID signifies that it |
| 32 | 32 | is not intended to be human‐readable. |
| 33 | -Description; |
|
| 33 | +description; |
|
| 34 | 34 | |
| 35 | 35 | /** |
| 36 | 36 | * BooleanScalar constructor. |
@@ -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 | } |