Updating PHPMD to enforce rules being an array. Fixes #319
This commit is contained in:
parent
4b2815a76f
commit
1d92b5e890
|
@ -86,6 +86,11 @@ class PhpMessDetector implements \PHPCI\Plugin
|
|||
$suffixes = ' --suffixes ' . implode(',', $this->suffixes);
|
||||
}
|
||||
|
||||
if (!empty($this->rules) && !is_array($this->rules)) {
|
||||
$this->phpci->logFailure('The "rules" option must be an array.');
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($this->rules as &$rule) {
|
||||
if (strpos($rule, '/') !== false) {
|
||||
$rule = $this->phpci->buildPath . $rule;
|
||||
|
|
Loading…
Reference in a new issue