@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | case $value instanceof \JsonSerializable: |
| 132 | 132 | break; |
| 133 | 133 | case \is_object($value) && \method_exists($value, '__toString'): |
| 134 | - $value = (string)$value; |
|
| 134 | + $value = (string) $value; |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | $result[$key] = $value; |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | */ |
| 165 | 165 | public function offsetExists($offset): bool |
| 166 | 166 | { |
| 167 | - return $this->has((string)$offset); |
|
| 167 | + return $this->has((string) $offset); |
|
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | /** |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | */ |
| 174 | 174 | public function offsetGet($offset) |
| 175 | 175 | { |
| 176 | - return $this->get((string)$offset); |
|
| 176 | + return $this->get((string) $offset); |
|
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | /** |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | $offset = \count($this->attributes); |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | - $this->set((string)$offset, $value); |
|
| 189 | + $this->set((string) $offset, $value); |
|
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | /** |
@@ -194,6 +194,6 @@ discard block |
||
| 194 | 194 | */ |
| 195 | 195 | public function offsetUnset($offset): void |
| 196 | 196 | { |
| 197 | - $this->delete((string)$offset); |
|
| 197 | + $this->delete((string) $offset); |
|
| 198 | 198 | } |
| 199 | 199 | } |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | $name = yield $rule->first('> #TypeName'); |
| 46 | 46 | |
| 47 | 47 | yield $this->deferred($ctx, yield $rule->first('> #TypeName')) |
| 48 | - ->then(function (ContextInterface $context) use ($name, $rule) { |
|
| 48 | + ->then(function(ContextInterface $context) use ($name, $rule) { |
|
| 49 | 49 | return $this->then($context, $rule, $name); |
| 50 | 50 | }); |
| 51 | 51 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | $isConst = $name->getType()->typeOf(Type::const()); |
| 82 | 82 | |
| 83 | - if (! $isConst) { |
|
| 83 | + if (!$isConst) { |
|
| 84 | 84 | $error = 'Generic argument name must be a const but %s given'; |
| 85 | 85 | $exception = new TypeConflictException(\sprintf($error, $name)); |
| 86 | 86 | $exception->throwsIn($ctx->getFile(), $rule->getOffset()); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | throw $exception; |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - return Name::fromString((string)$name->getValue()); |
|
| 91 | + return Name::fromString((string) $name->getValue()); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | $isType = $value->getType()->typeOf(Type::type()); |
| 105 | 105 | |
| 106 | - if (! $isType) { |
|
| 106 | + if (!$isType) { |
|
| 107 | 107 | $error = 'Generic argument value must be a valid type, but %s given'; |
| 108 | 108 | $exception = new TypeConflictException(\sprintf($error, $value)); |
| 109 | 109 | $exception->throwsIn($ctx->getFile(), $rule->getOffset()); |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | switch (true) { |
| 130 | 130 | case $isConst: |
| 131 | - return new InvocationPrimitive(Name::fromString((string)$name->getValue())); |
|
| 131 | + return new InvocationPrimitive(Name::fromString((string) $name->getValue())); |
|
| 132 | 132 | |
| 133 | 133 | case $isType: |
| 134 | 134 | /** @var InvocationPrimitive $value */ |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | public function reduce(ContextInterface $ctx, RuleInterface $rule): \Generator |
| 45 | 45 | { |
| 46 | - yield function () use ($ctx, $rule): \Generator { |
|
| 46 | + yield function() use ($ctx, $rule): \Generator { |
|
| 47 | 47 | /** @var ValueInterface $value */ |
| 48 | 48 | [$isConstant, $value] = [$this->isConstant($rule), yield $this->getValueNode($rule)]; |
| 49 | 49 | |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public function reduce(ContextInterface $ctx, RuleInterface $rule) |
| 37 | 37 | { |
| 38 | - yield function () use ($ctx, $rule): \Generator { |
|
| 38 | + yield function() use ($ctx, $rule): \Generator { |
|
| 39 | 39 | /** @var ValueInterface $value */ |
| 40 | 40 | $value = yield $rule->first('> #VariableValue')->getChild(0); |
| 41 | 41 | |