Set allowed errors to the correct property.

This commit is contained in:
Glenn McEwan 2018-02-23 18:48:42 +00:00 committed by Dmitry Khomutov
parent 4a8d66beaf
commit 40541f16d2
No known key found for this signature in database
GPG key ID: EC19426474B37AAC

View file

@ -138,6 +138,10 @@ class TechnicalDebt extends Plugin implements ZeroConfigPluginInterface
$this->allowedErrors = -1;
}
if (array_key_exists('allowed_errors', $options) && $options['allowed_errors']) {
$this->allowedErrors = (int) $options['allowed_errors'];
}
$this->setOptions($options);
}
@ -148,7 +152,7 @@ class TechnicalDebt extends Plugin implements ZeroConfigPluginInterface
*/
protected function setOptions($options)
{
foreach (['directory', 'ignore', 'allowed_errors'] as $key) {
foreach (['directory', 'ignore'] as $key) {
if (array_key_exists($key, $options)) {
$this->{$key} = $options[$key];
}