Fix Technical Debt Plugin configuration parameters
This commit is contained in:
parent
506af65421
commit
acf25afdd6
2 changed files with 20 additions and 2 deletions
|
|
@ -75,6 +75,21 @@ class TechnicalDebt extends Plugin implements ZeroConfigPluginInterface
|
|||
if (isset($options['zero_config']) && $options['zero_config']) {
|
||||
$this->allowed_errors = -1;
|
||||
}
|
||||
|
||||
$this->setOptions($options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle this plugin's options.
|
||||
* @param $options
|
||||
*/
|
||||
protected function setOptions($options)
|
||||
{
|
||||
foreach (array('directory', 'path', 'ignore', 'allowed_errors') as $key) {
|
||||
if (array_key_exists($key, $options)) {
|
||||
$this->{$key} = $options[$key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue