@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | protected function execute(InputInterface $input, OutputInterface $output) : int |
51 | 51 | { |
52 | 52 | |
53 | - if(!$output->isQuiet()) { |
|
53 | + if (!$output->isQuiet()) { |
|
54 | 54 | $output->writeln($this->getApplication()->getLongVersion()); |
55 | 55 | } |
56 | 56 | |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | $getPackageSourceFiles = new LocateComposerPackageSourceFiles(); |
61 | 61 | |
62 | - $sourcesASTs = new LocateASTFromFiles((new ParserFactory())->create(ParserFactory::PREFER_PHP7)); |
|
62 | + $sourcesASTs = new LocateASTFromFiles((new ParserFactory())->create(ParserFactory::PREFER_PHP7)); |
|
63 | 63 | |
64 | 64 | $definedVendorSymbols = (new LocateDefinedSymbolsFromASTRoots())->__invoke($sourcesASTs( |
65 | 65 | (new ComposeGenerators())->__invoke( |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | foreach ($unknownSymbols as $unknownSymbol) { |
93 | 93 | $output->writeln(" " . $unknownSymbol); |
94 | 94 | $suggester = new DependencySuggester(); |
95 | - foreach($suggester($unknownSymbol) as $suggestion) { |
|
95 | + foreach ($suggester($unknownSymbol) as $suggestion) { |
|
96 | 96 | $output->writeln(' - defined in "' . $suggestion . '", probably add this to your require section'); |
97 | 97 | } |
98 | 98 | } |
@@ -103,16 +103,16 @@ discard block |
||
103 | 103 | private function getCheckOptions(InputInterface $input) : Options |
104 | 104 | { |
105 | 105 | $fileName = $input->getOption('config-file'); |
106 | - if(!$fileName) { |
|
106 | + if (!$fileName) { |
|
107 | 107 | return new Options(); |
108 | 108 | } |
109 | 109 | |
110 | - if(!is_readable($fileName)) { |
|
110 | + if (!is_readable($fileName)) { |
|
111 | 111 | throw new \InvalidArgumentException('unable to read ' . $fileName); |
112 | 112 | } |
113 | 113 | |
114 | 114 | $jsonData = json_decode(file_get_contents($fileName), true); |
115 | - if(false === $jsonData) { |
|
115 | + if (false === $jsonData) { |
|
116 | 116 | throw new \Exception('error parsing the config file: ' . json_last_error_msg()); |
117 | 117 | } |
118 | 118 | |
@@ -127,11 +127,11 @@ discard block |
||
127 | 127 | */ |
128 | 128 | private function checkJsonFile(string $jsonFile) |
129 | 129 | { |
130 | - if(!is_readable($jsonFile)) { |
|
130 | + if (!is_readable($jsonFile)) { |
|
131 | 131 | throw new InvalidInputFileException('cannot read ' . $jsonFile); |
132 | 132 | } |
133 | 133 | |
134 | - if(false == json_decode(file_get_contents($jsonFile))) { |
|
134 | + if (false == json_decode(file_get_contents($jsonFile))) { |
|
135 | 135 | throw new InvalidInputFileException('error parsing ' . $jsonFile . ': ' . json_last_error_msg()); |
136 | 136 | } |
137 | 137 |