File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,27 @@ function showOptions()
39
39
exit ;
40
40
}
41
41
42
- require_once __DIR__ . '/vendor/autoload.php ' ;
42
+ $ files = array (
43
+ __DIR__ . '/../../autoload.php ' ,
44
+ __DIR__ . '/vendor/autoload.php '
45
+ );
46
+
47
+ $ autoloadFileFound = false ;
48
+ foreach ($ files as $ file ) {
49
+ if (file_exists ($ file )) {
50
+ require $ file ;
51
+ $ autoloadFileFound = true ;
52
+ break ;
53
+ }
54
+ }
55
+
56
+ if (!$ autoloadFileFound ) {
57
+ die (
58
+ 'You need to set up the project dependencies using the following commands: ' . PHP_EOL .
59
+ 'curl -s http://getcomposer.org/installer | php ' . PHP_EOL .
60
+ 'php composer.phar install ' . PHP_EOL
61
+ );
62
+ }
43
63
44
64
try {
45
65
$ manager = new PhpParallelLint \Manager ;
@@ -53,4 +73,4 @@ function showOptions()
53
73
} catch (Exception $ e ) {
54
74
echo $ e ->getMessage (), PHP_EOL ;
55
75
die (FAILED );
56
- }
76
+ }
You can’t perform that action at this time.
0 commit comments