@@ -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 | /** |
@@ -108,9 +108,9 @@ discard block |
||
108 | 108 | */ |
109 | 109 | public function jsonSerialize(): array |
110 | 110 | { |
111 | - $applicator = function ($value) { |
|
111 | + $applicator = function($value) { |
|
112 | 112 | if (\is_object($value) && \method_exists($value, '__toString')) { |
113 | - return (string)$value; |
|
113 | + return (string) $value; |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | return $value; |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | */ |
128 | 128 | public function toJson(int $options = 0): string |
129 | 129 | { |
130 | - return (string)\json_encode($this->jsonSerialize(), $options); |
|
130 | + return (string) \json_encode($this->jsonSerialize(), $options); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | /** |
@@ -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 |
@@ -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 | /** |
@@ -80,7 +80,7 @@ |
||
80 | 80 | * @return \Generator |
81 | 81 | * @throws \LogicException |
82 | 82 | */ |
83 | - private function forEach(Readable $readable, RuleInterface $ast): \Generator |
|
83 | + private function forEach (Readable $readable, RuleInterface $ast): \Generator |
|
84 | 84 | { |
85 | 85 | $builder = $this->factory->resolve($readable, $ast); |
86 | 86 | $result = $builder->build($readable, $ast); |
@@ -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 | } |