@@ -21,7 +21,6 @@ |
||
21 | 21 | use PhpParser\ParserFactory; |
22 | 22 | use Symfony\Component\Console\Command\Command; |
23 | 23 | use Symfony\Component\Console\Helper\Table; |
24 | -use Symfony\Component\Console\Helper\TableCell; |
|
25 | 24 | use Symfony\Component\Console\Input\InputArgument; |
26 | 25 | use Symfony\Component\Console\Input\InputInterface; |
27 | 26 | use Symfony\Component\Console\Input\InputOption; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | protected function execute(InputInterface $input, OutputInterface $output) : int |
53 | 53 | { |
54 | 54 | |
55 | - if(!$output->isQuiet()) { |
|
55 | + if (!$output->isQuiet()) { |
|
56 | 56 | $output->writeln($this->getApplication()->getLongVersion()); |
57 | 57 | } |
58 | 58 | |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | $getPackageSourceFiles = new LocateComposerPackageSourceFiles(); |
63 | 63 | |
64 | - $sourcesASTs = new LocateASTFromFiles((new ParserFactory())->create(ParserFactory::PREFER_PHP7)); |
|
64 | + $sourcesASTs = new LocateASTFromFiles((new ParserFactory())->create(ParserFactory::PREFER_PHP7)); |
|
65 | 65 | |
66 | 66 | $definedVendorSymbols = (new LocateDefinedSymbolsFromASTRoots())->__invoke($sourcesASTs( |
67 | 67 | (new ComposeGenerators())->__invoke( |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $guesser = new DependencyGuesser(); |
97 | 97 | foreach ($unknownSymbols as $unknownSymbol) { |
98 | 98 | $guessedDependencies = []; |
99 | - foreach($guesser($unknownSymbol) as $guessedDependency) { |
|
99 | + foreach ($guesser($unknownSymbol) as $guessedDependency) { |
|
100 | 100 | $guessedDependencies[] = $guessedDependency; |
101 | 101 | } |
102 | 102 | $table->addRow([$unknownSymbol, implode("\n", $guessedDependencies)]); |
@@ -109,16 +109,16 @@ discard block |
||
109 | 109 | private function getCheckOptions(InputInterface $input) : Options |
110 | 110 | { |
111 | 111 | $fileName = $input->getOption('config-file'); |
112 | - if(!$fileName) { |
|
112 | + if (!$fileName) { |
|
113 | 113 | return new Options(); |
114 | 114 | } |
115 | 115 | |
116 | - if(!is_readable($fileName)) { |
|
116 | + if (!is_readable($fileName)) { |
|
117 | 117 | throw new \InvalidArgumentException('unable to read ' . $fileName); |
118 | 118 | } |
119 | 119 | |
120 | 120 | $jsonData = json_decode(file_get_contents($fileName), true); |
121 | - if(false === $jsonData) { |
|
121 | + if (false === $jsonData) { |
|
122 | 122 | throw new \Exception('error parsing the config file: ' . json_last_error_msg()); |
123 | 123 | } |
124 | 124 | |
@@ -133,11 +133,11 @@ discard block |
||
133 | 133 | */ |
134 | 134 | private function checkJsonFile(string $jsonFile) |
135 | 135 | { |
136 | - if(!is_readable($jsonFile)) { |
|
136 | + if (!is_readable($jsonFile)) { |
|
137 | 137 | throw new InvalidInputFileException('cannot read ' . $jsonFile); |
138 | 138 | } |
139 | 139 | |
140 | - if(false == json_decode(file_get_contents($jsonFile))) { |
|
140 | + if (false == json_decode(file_get_contents($jsonFile))) { |
|
141 | 141 | throw new InvalidInputFileException('error parsing ' . $jsonFile . ': ' . json_last_error_msg()); |
142 | 142 | } |
143 | 143 |
@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | public function __invoke($symbolName) : \Generator |
20 | 20 | { |
21 | - foreach($this->guessers as $guesser) { |
|
21 | + foreach ($this->guessers as $guesser) { |
|
22 | 22 | yield from $guesser($symbolName); |
23 | 23 | } |
24 | 24 | } |