Updating PHPMD to enforce rules being an array. Fixes #319

This commit is contained in:
Dan Cryer 2014-04-16 12:30:03 +01:00
parent 4b2815a76f
commit 1d92b5e890

View file

@ -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;