@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | $this->log($handler); |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - if (! \array_key_exists($priority, $this->queue)) { |
|
| 102 | + if (!\array_key_exists($priority, $this->queue)) { |
|
| 103 | 103 | $this->queue[$priority] = $this->createCollection(); |
| 104 | 104 | } |
| 105 | 105 | |
@@ -121,10 +121,10 @@ discard block |
||
| 121 | 121 | */ |
| 122 | 122 | public function count(): int |
| 123 | 123 | { |
| 124 | - $accumulator = function (int $result, \SplQueue $queue): int { |
|
| 124 | + $accumulator = function(int $result, \SplQueue $queue): int { |
|
| 125 | 125 | return $result + $queue->count(); |
| 126 | 126 | }; |
| 127 | 127 | |
| 128 | - return (int)\array_reduce($this->queue, $accumulator, 0); |
|
| 128 | + return (int) \array_reduce($this->queue, $accumulator, 0); |
|
| 129 | 129 | } |
| 130 | 130 | } |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | public function compile(Readable $file): DocumentInterface |
| 109 | 109 | { |
| 110 | 110 | try { |
| 111 | - return $this->memoize($file, function (Readable $file): DocumentInterface { |
|
| 111 | + return $this->memoize($file, function(Readable $file): DocumentInterface { |
|
| 112 | 112 | return $this->builder->run($this->reflection, $file, $this->parse($file)); |
| 113 | 113 | }); |
| 114 | 114 | } catch (CompilerException $e) { |
@@ -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"); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function isList(): bool |
| 72 | 72 | { |
| 73 | - return (bool)($this->modifiers & Hint::IS_LIST); |
|
| 73 | + return (bool) ($this->modifiers & Hint::IS_LIST); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | */ |
| 79 | 79 | public function isNonNull(): bool |
| 80 | 80 | { |
| 81 | - return (bool)($this->modifiers & Hint::IS_NOT_NULL); |
|
| 81 | + return (bool) ($this->modifiers & Hint::IS_NOT_NULL); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | /** |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public function isListOfNonNulls(): bool |
| 88 | 88 | { |
| 89 | - return (bool)($this->modifiers & Hint::IS_LIST_OF_NOT_NULL); |
|
| 89 | + return (bool) ($this->modifiers & Hint::IS_LIST_OF_NOT_NULL); |
|
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |