From 1eb5248319eafe03613245a592c447470995937d Mon Sep 17 00:00:00 2001 From: Stephen Ball Date: Thu, 14 May 2015 13:19:55 +0100 Subject: [PATCH] Removed allowed_warnings as it is not used Calling setOptions Closed #975 --- PHPCI/Plugin/TechnicalDebt.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/PHPCI/Plugin/TechnicalDebt.php b/PHPCI/Plugin/TechnicalDebt.php index eca05213..163c94c6 100755 --- a/PHPCI/Plugin/TechnicalDebt.php +++ b/PHPCI/Plugin/TechnicalDebt.php @@ -42,11 +42,6 @@ class TechnicalDebt implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin */ protected $allowed_errors; - /** - * @var int - */ - protected $allowed_warnings; - /** * @var string, based on the assumption the root may not hold the code to be * tested, extends the base path @@ -94,7 +89,6 @@ class TechnicalDebt implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin $this->directory = $phpci->buildPath; $this->path = ''; $this->ignore = $this->phpci->ignore; - $this->allowed_warnings = 0; $this->allowed_errors = 0; $this->searches = array('TODO', 'FIXME', 'TO DO', 'FIX ME'); @@ -103,9 +97,10 @@ class TechnicalDebt implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin } if (isset($options['zero_config']) && $options['zero_config']) { - $this->allowed_warnings = -1; $this->allowed_errors = -1; } + + $this->setOptions($options); } /** @@ -114,7 +109,7 @@ class TechnicalDebt implements PHPCI\Plugin, PHPCI\ZeroConfigPlugin */ protected function setOptions($options) { - foreach (array('directory', 'path', 'ignore', 'allowed_warnings', 'allowed_errors') as $key) { + foreach (array('directory', 'path', 'ignore', 'allowed_errors') as $key) { if (array_key_exists($key, $options)) { $this->{$key} = $options[$key]; }