Skip to content

Commit

Permalink
fix bootstrap option handling
Browse files Browse the repository at this point in the history
  • Loading branch information
llaville committed May 17, 2024
1 parent 1f04c8a commit b3b315b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 7 additions & 0 deletions phplint.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@
};
}

if (true === $input->hasParameterOption(['--bootstrap'], true)) {
$bootstrap = $input->getParameterOption('--bootstrap');
if ($bootstrap) {
require_once $bootstrap;
}
}

$formats = [
OptionDefinition::LOG_JSON,
OptionDefinition::LOG_JUNIT,
Expand Down
4 changes: 0 additions & 4 deletions src/Command/LintCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$configResolver = new FileOptionsResolver($input);
}

if ($bootstrap = $configResolver->getOption(OptionDefinition::BOOTSTRAP)) {
require_once $bootstrap;
}

$finder = (new Finder($configResolver))->getFiles();
/** @var Application $app */
$app = $this->getApplication();
Expand Down

0 comments on commit b3b315b

Please sign in to comment.