@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function isNonNull(): bool |
| 39 | 39 | { |
| 40 | - return (bool)($this->modifiers & static::IS_NOT_NULL); |
|
| 40 | + return (bool) ($this->modifiers & static::IS_NOT_NULL); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function isList(): bool |
| 47 | 47 | { |
| 48 | - return (bool)($this->modifiers & static::IS_LIST); |
|
| 48 | + return (bool) ($this->modifiers & static::IS_LIST); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function isListOfNonNulls(): bool |
| 55 | 55 | { |
| 56 | - return (bool)($this->modifiers & static::IS_LIST_OF_NOT_NULL); |
|
| 56 | + return (bool) ($this->modifiers & static::IS_LIST_OF_NOT_NULL); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | private function __construct(string $name) |
| 57 | 57 | { |
| 58 | - \assert(self::isValid($name), 'Invalid type ' . $name); |
|
| 58 | + \assert(self::isValid($name), 'Invalid type '.$name); |
|
| 59 | 59 | |
| 60 | 60 | $this->name = $name; |
| 61 | 61 | $this->parent = $this->getInheritanceSequence($name); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | private function bootInheritance(\SplStack $stack, array $children = []): void |
| 82 | 82 | { |
| 83 | - $push = function (string $type) use ($stack): void { |
|
| 83 | + $push = function(string $type) use ($stack): void { |
|
| 84 | 84 | self::$inheritance[$type] = \array_values(\iterator_to_array($stack)); |
| 85 | 85 | self::$inheritance[$type][] = static::ROOT_TYPE; |
| 86 | 86 | |
@@ -151,7 +151,7 @@ |
||
| 151 | 151 | /** |
| 152 | 152 | * {@inheritDoc} |
| 153 | 153 | */ |
| 154 | - public function instanceOf(TypeInterface $type): bool |
|
| 154 | + public function instanceof(TypeInterface $type): bool |
|
| 155 | 155 | { |
| 156 | 156 | $needle = $type->getName(); |
| 157 | 157 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | /** |
| 38 | 38 | * @var string |
| 39 | 39 | */ |
| 40 | - public const INTERFACE = 'Interface'; |
|
| 40 | + public const interface = 'Interface'; |
|
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * @var string |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | self::SCHEMA, |
| 120 | 120 | self::SCALAR, |
| 121 | 121 | self::OBJECT, |
| 122 | - self::INTERFACE, |
|
| 122 | + self::interface, |
|
| 123 | 123 | self::UNION, |
| 124 | 124 | self::ENUM, |
| 125 | 125 | self::INPUT_OBJECT, |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | public const ALLOWS_TO_OUTPUT = [ |
| 148 | 148 | self::SCALAR, |
| 149 | 149 | self::OBJECT, |
| 150 | - self::INTERFACE, |
|
| 150 | + self::interface, |
|
| 151 | 151 | self::UNION, |
| 152 | 152 | self::ENUM, |
| 153 | 153 | self::INPUT_OBJECT, |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | * @var string[]|array[] |
| 165 | 165 | */ |
| 166 | 166 | public const INHERITANCE_TREE = [ |
| 167 | - self::INTERFACE => [ |
|
| 167 | + self::interface => [ |
|
| 168 | 168 | self::OBJECT => [ |
| 169 | 169 | self::INPUT_OBJECT |
| 170 | 170 | ], |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | * @param TypeInterface $type |
| 217 | 217 | * @return bool |
| 218 | 218 | */ |
| 219 | - public function instanceOf(TypeInterface $type): bool; |
|
| 219 | + public function instanceof(TypeInterface $type): bool; |
|
| 220 | 220 | |
| 221 | 221 | /** |
| 222 | 222 | * Returns true if the type is the same as the current type. |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | return $this->parseInt($value->getValue()); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - return (float)$value->getValue(); |
|
| 55 | + return (float) $value->getValue(); |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | private function parseExponential(string $value): float |
| 81 | 81 | { |
| 82 | - return (float)$value; |
|
| 82 | + return (float) $value; |
|
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | /** |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | private function parseFloat(string $value): float |
| 90 | 90 | { |
| 91 | - return (float)$value; |
|
| 91 | + return (float) $value; |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | public function compile(Readable $file): DocumentInterface |
| 101 | 101 | { |
| 102 | - return $this->store->memoize($file, function (Readable $file): DocumentInterface { |
|
| 102 | + return $this->store->memoize($file, function(Readable $file): DocumentInterface { |
|
| 103 | 103 | return $this->generate($file, $this->ir($file)); |
| 104 | 104 | }); |
| 105 | 105 | } |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | */ |
| 115 | 115 | public function generate(Readable $file, $opcodes): DocumentInterface |
| 116 | 116 | { |
| 117 | - return $this->wrap(function () use ($file, $opcodes) { |
|
| 117 | + return $this->wrap(function() use ($file, $opcodes) { |
|
| 118 | 118 | return $this->back->run($file, $opcodes); |
| 119 | 119 | }); |
| 120 | 120 | } |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | */ |
| 150 | 150 | public function ir(Readable $readable) |
| 151 | 151 | { |
| 152 | - return $this->wrap(function () use ($readable) { |
|
| 152 | + return $this->wrap(function() use ($readable) { |
|
| 153 | 153 | return $this->front->load($readable); |
| 154 | 154 | }); |
| 155 | 155 | } |