@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function testHasErrorWithWrongPath() |
15 | 15 | { |
16 | - $path = __DIR__ . '/wrong/path/non-existing-file.json'; |
|
16 | + $path = __DIR__.'/wrong/path/non-existing-file.json'; |
|
17 | 17 | $loader = new JsonLoader($path); |
18 | 18 | } |
19 | 19 | |
@@ -22,13 +22,13 @@ discard block |
||
22 | 22 | */ |
23 | 23 | public function testHasErrorWithInvalidFile() |
24 | 24 | { |
25 | - $path = __DIR__ . '/../fixtures/invalidJson'; |
|
25 | + $path = __DIR__.'/../fixtures/invalidJson'; |
|
26 | 26 | $loader = new JsonLoader($path); |
27 | 27 | } |
28 | 28 | |
29 | 29 | public function testHasDataWithValidFile() |
30 | 30 | { |
31 | - $path = __DIR__ . '/../fixtures/validJson.json'; |
|
31 | + $path = __DIR__.'/../fixtures/validJson.json'; |
|
32 | 32 | $loader = new JsonLoader($path); |
33 | 33 | $this->assertEquals($loader->getData(), ['foo' => 'bar']); |
34 | 34 | } |
@@ -20,11 +20,11 @@ |
||
20 | 20 | public function __construct($path) |
21 | 21 | { |
22 | 22 | if (!is_readable($path) || ($content = file_get_contents($path)) === false) { |
23 | - throw new NotReadableException('unable to read ' . $path); |
|
23 | + throw new NotReadableException('unable to read '.$path); |
|
24 | 24 | } |
25 | 25 | $this->data = json_decode($content, true); |
26 | 26 | if ($this->data === null && JSON_ERROR_NONE !== json_last_error()) { |
27 | - throw new InvalidJsonException('error parsing ' . $path . ': ' . json_last_error_msg()); |
|
27 | + throw new InvalidJsonException('error parsing '.$path.': '.json_last_error_msg()); |
|
28 | 28 | } |
29 | 29 | } |
30 | 30 |
@@ -52,19 +52,19 @@ 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 | |
59 | 59 | $composerJson = realpath($input->getArgument('composer-json')); |
60 | - if(false === $composerJson) { |
|
61 | - throw new \InvalidArgumentException('file not found: [' . $input->getArgument('composer-json') . ']'); |
|
60 | + if (false === $composerJson) { |
|
61 | + throw new \InvalidArgumentException('file not found: ['.$input->getArgument('composer-json').']'); |
|
62 | 62 | } |
63 | 63 | $this->checkJsonFile($composerJson); |
64 | 64 | |
65 | 65 | $getPackageSourceFiles = new LocateComposerPackageSourceFiles(); |
66 | 66 | |
67 | - $sourcesASTs = new LocateASTFromFiles((new ParserFactory())->create(ParserFactory::PREFER_PHP7)); |
|
67 | + $sourcesASTs = new LocateASTFromFiles((new ParserFactory())->create(ParserFactory::PREFER_PHP7)); |
|
68 | 68 | |
69 | 69 | $definedVendorSymbols = (new LocateDefinedSymbolsFromASTRoots())->__invoke($sourcesASTs( |
70 | 70 | (new ComposeGenerators())->__invoke( |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $guesser = new DependencyGuesser(); |
100 | 100 | foreach ($unknownSymbols as $unknownSymbol) { |
101 | 101 | $guessedDependencies = []; |
102 | - foreach($guesser($unknownSymbol) as $guessedDependency) { |
|
102 | + foreach ($guesser($unknownSymbol) as $guessedDependency) { |
|
103 | 103 | $guessedDependencies[] = $guessedDependency; |
104 | 104 | } |
105 | 105 | $table->addRow([$unknownSymbol, implode("\n", $guessedDependencies)]); |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | private function getCheckOptions(InputInterface $input) : Options |
113 | 113 | { |
114 | 114 | $fileName = $input->getOption('config-file'); |
115 | - if(!$fileName) { |
|
115 | + if (!$fileName) { |
|
116 | 116 | return new Options(); |
117 | 117 | } |
118 | 118 | return new Options((new JsonLoader($fileName))->getData()); |