@@ -52,11 +52,11 @@ |
||
52 | 52 | |
53 | 53 | $output = $this->option('out') ?: \dirname($schema->getPathname()); |
54 | 54 | |
55 | - if (! \is_dir($output)) { |
|
56 | - throw new NotReadableException('Output directory "' . $output . '" not exists'); |
|
55 | + if (!\is_dir($output)) { |
|
56 | + throw new NotReadableException('Output directory "'.$output.'" not exists'); |
|
57 | 57 | } |
58 | 58 | |
59 | - $outputPathname = $output . '/' . \basename($schema->getPathname()) . '.json'; |
|
59 | + $outputPathname = $output.'/'.\basename($schema->getPathname()).'.json'; |
|
60 | 60 | |
61 | 61 | \file_put_contents($outputPathname, \json_encode($result)); |
62 | 62 | } |
@@ -65,11 +65,11 @@ |
||
65 | 65 | continue; |
66 | 66 | } |
67 | 67 | |
68 | - $position = $def->getFile()->getPathname() . ':' . $def->getLine(); |
|
68 | + $position = $def->getFile()->getPathname().':'.$def->getLine(); |
|
69 | 69 | |
70 | - $this->writeln('<fg=white;bg=green> ' . \str_repeat(' ', \strlen($position)) . ' </>'); |
|
71 | - $this->writeln('<fg=white;bg=green> ' . $position . ' </>'); |
|
72 | - $this->writeln('<fg=white;bg=green> ' . \str_repeat(' ', \strlen($position)) . ' </>'); |
|
70 | + $this->writeln('<fg=white;bg=green> '.\str_repeat(' ', \strlen($position)).' </>'); |
|
71 | + $this->writeln('<fg=white;bg=green> '.$position.' </>'); |
|
72 | + $this->writeln('<fg=white;bg=green> '.\str_repeat(' ', \strlen($position)).' </>'); |
|
73 | 73 | |
74 | 74 | $this->render($def); |
75 | 75 | $this->writeln("\n\n"); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | private function renderUtfSequences(string $body): string |
95 | 95 | { |
96 | - $callee = function (array $matches): string { |
|
96 | + $callee = function(array $matches): string { |
|
97 | 97 | [$char, $code] = [$matches[0], $matches[1]]; |
98 | 98 | |
99 | 99 | try { |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | { |
124 | 124 | try { |
125 | 125 | if (\function_exists('\\json_decode')) { |
126 | - $result = @\json_decode('{"char": "' . $body . '"}')->char; |
|
126 | + $result = @\json_decode('{"char": "'.$body.'"}')->char; |
|
127 | 127 | |
128 | 128 | if (\json_last_error() === \JSON_ERROR_NONE) { |
129 | 129 | $body = $result; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | */ |
144 | 144 | private function renderSpecialCharacters(string $body): string |
145 | 145 | { |
146 | - $callee = function (array $matches): string { |
|
146 | + $callee = function(array $matches): string { |
|
147 | 147 | [$char, $code] = [$matches[0], $matches[1]]; |
148 | 148 | |
149 | 149 | switch ($code) { |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public function toString(): string |
23 | 23 | { |
24 | - $values = \array_map(function (ValueInterface $value) { |
|
24 | + $values = \array_map(function(ValueInterface $value) { |
|
25 | 25 | return $value->toString(); |
26 | 26 | }, \iterator_to_array($this->getValues())); |
27 | 27 | |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public function toPrimitive(): iterable |
35 | 35 | { |
36 | - return \array_map(function (ValueInterface $value) { |
|
36 | + return \array_map(function(ValueInterface $value) { |
|
37 | 37 | return $value->toPrimitive(); |
38 | 38 | }, \iterator_to_array($this->getValues())); |
39 | 39 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | public function toPrimitive(): string |
23 | 23 | { |
24 | - return (string)$this->getChild(0)->getValue(); |
|
24 | + return (string) $this->getChild(0)->getValue(); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | */ |
24 | 24 | public function toString(): string |
25 | 25 | { |
26 | - return (string)$this->toPrimitive(); |
|
26 | + return (string) $this->toPrimitive(); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | return $this->parseInt($value->getValue()); |
60 | 60 | } |
61 | 61 | |
62 | - return (float)$value->getValue(); |
|
62 | + return (float) $value->getValue(); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | private function parseExponential(string $value): float |
115 | 115 | { |
116 | - return (float)$value; |
|
116 | + return (float) $value; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | /** |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | */ |
132 | 132 | private function parseFloat(string $value): float |
133 | 133 | { |
134 | - return (float)$value; |
|
134 | + return (float) $value; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |