mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-21 16:02:23 +02:00
[+]: try to fix issue #942 v3.1 (fix code-style)
This commit is contained in:
parent
e9037cf180
commit
4b700ff95b
@ -5,13 +5,13 @@ function includeProjectsAutoload(string $composerJsonPath, string $cwd): void
|
||||
$contents = file_get_contents($composerJsonPath);
|
||||
|
||||
$composerSettings = json_decode($contents, true);
|
||||
if (!is_array($composerSettings)) {
|
||||
if (! is_array($composerSettings)) {
|
||||
fwrite(STDERR, "Failed to load '${composerJsonPath}'\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$vendorPath = $composerSettings['config']['vendor-dir'] ?? $cwd . '/vendor';
|
||||
if (!is_dir($vendorPath)) {
|
||||
if (! is_dir($vendorPath)) {
|
||||
fwrite(STDERR, "Please check if 'composer.phar install' was run already (expected to find '${vendorPath}')\n");
|
||||
exit(1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user