@@ -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 |
@@ -15,21 +15,21 @@ |
||
15 | 15 | |
16 | 16 | public function testHasErrorWithWrongPath() |
17 | 17 | { |
18 | - $path = __DIR__ . '/wrong/path/non-existing-file.json'; |
|
18 | + $path = __DIR__.'/wrong/path/non-existing-file.json'; |
|
19 | 19 | $this->expectException(NotReadableException::class); |
20 | 20 | new JsonLoader($path); |
21 | 21 | } |
22 | 22 | |
23 | 23 | public function testHasErrorWithInvalidFile() |
24 | 24 | { |
25 | - $path = __DIR__ . '/../fixtures/invalidJson'; |
|
25 | + $path = __DIR__.'/../fixtures/invalidJson'; |
|
26 | 26 | $this->expectException(InvalidJsonException::class); |
27 | 27 | new JsonLoader($path); |
28 | 28 | } |
29 | 29 | |
30 | 30 | public function testHasDataWithValidFile() |
31 | 31 | { |
32 | - $path = __DIR__ . '/../fixtures/validJson.json'; |
|
32 | + $path = __DIR__.'/../fixtures/validJson.json'; |
|
33 | 33 | $loader = new JsonLoader($path); |
34 | 34 | $this->assertEquals($loader->getData(), ['foo' => 'bar']); |
35 | 35 | } |
@@ -45,13 +45,13 @@ discard block |
||
45 | 45 | protected function execute(InputInterface $input, OutputInterface $output) : int |
46 | 46 | { |
47 | 47 | |
48 | - if(!$output->isQuiet()) { |
|
48 | + if (!$output->isQuiet()) { |
|
49 | 49 | $output->writeln($this->getApplication()->getLongVersion()); |
50 | 50 | } |
51 | 51 | |
52 | 52 | $composerJson = realpath($input->getArgument('composer-json')); |
53 | - if(false === $composerJson) { |
|
54 | - throw new \InvalidArgumentException('file not found: [' . $input->getArgument('composer-json') . ']'); |
|
53 | + if (false === $composerJson) { |
|
54 | + throw new \InvalidArgumentException('file not found: ['.$input->getArgument('composer-json').']'); |
|
55 | 55 | } |
56 | 56 | $this->checkJsonFile($composerJson); |
57 | 57 | |
@@ -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,7 +109,7 @@ 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 | return new Options((new JsonLoader($fileName))->getData()); |