Skip to content

Commit bcedbeb

Browse files
Get options from config
1 parent de0a364 commit bcedbeb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/PhpCompatibilityTask.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,25 @@ public function canRunInContext(ContextInterface $context): bool
4848
public function run(ContextInterface $context): TaskResultInterface
4949
{
5050
$config = $this->getConfig();
51+
$options = $config->getOptions();
5152
$files = $context
5253
->getFiles()
53-
->notPaths($config['ignore_patterns'])
54-
->extensions($config['triggered_by']);
54+
->notPaths($options['ignore_patterns'])
55+
->extensions($options['triggered_by']);
5556

5657
if (0 === count($files)) {
5758
return TaskResult::createSkipped($this, $context);
5859
}
5960

6061
$arguments = $this->processBuilder->createArgumentsForCommand('phpcs');
61-
$arguments = $this->addArgumentsFromConfig($arguments, $config);
62+
$arguments = $this->addArgumentsFromConfig($arguments, $options);
6263
$arguments->add('--standard=vendor/wunderio/grumphp-php-compatibility/php-compatibility.xml');
6364

6465
// @todo: Until GrumPHP does not have solution for 'run' command with lots of files we'll use our custom codebase_path parameter with custom check for 'run' command.
6566
if ($this->isRunningFullCodeBase()) {
6667
// Add parallel workers as full code base scans can take long time.
6768
$arguments->add('--parallel=20');
68-
$arguments->add($config['codebase_path']);
69+
$arguments->add($options['codebase_path']);
6970
}
7071
else {
7172
$arguments->addFiles($files);

0 commit comments

Comments
 (0)