Updating PHPMD to enforce rules being an array. Fixes #319
This commit is contained in:
parent
959864c582
commit
acf4d093bb
1 changed files with 5 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue