Skip to content

Commit

Permalink
Allows correct autoloading when installed as a dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsdeBlaauw authored Jan 17, 2019
1 parent 49c77ac commit ef043b6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bin/php-doc-check
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/usr/bin/env php
<?php
require_once(__DIR__.'/../vendor/autoload.php');

foreach ([__DIR__ . '/../../../autoload.php', __DIR__ . '/../vendor/autoload.php'] as $file) {
if (file_exists($file)) {
require $file;
break;
}
}

$arguments = new \cli\Arguments();
$arguments->addOption(array('directory', 'd'), array(
Expand Down Expand Up @@ -102,4 +108,4 @@ if(!empty($arguments['reportfile'])){
if($arguments['ignore-violations-on-exit']){
exit(0);
}
exit($outputFormatter->getExitCode());
exit($outputFormatter->getExitCode());

0 comments on commit ef043b6

Please sign in to comment.