diff options
-rw-r--r-- | app/Action/TaskClose.php | 2 | ||||
-rw-r--r-- | app/Core/Http/Route.php | 1 | ||||
-rw-r--r-- | app/Core/Ldap/User.php | 2 | ||||
-rw-r--r-- | app/Model/Config.php | 1 | ||||
-rw-r--r-- | app/Model/Group.php | 3 | ||||
-rw-r--r-- | app/Model/ProjectUserRole.php | 2 | ||||
-rw-r--r-- | app/ServiceProvider/EventDispatcherProvider.php | 1 | ||||
-rw-r--r-- | app/Validator/AuthValidator.php | 29 |
8 files changed, 11 insertions, 30 deletions
diff --git a/app/Action/TaskClose.php b/app/Action/TaskClose.php index b8c5e175..cf91e83e 100644 --- a/app/Action/TaskClose.php +++ b/app/Action/TaskClose.php @@ -2,8 +2,6 @@ namespace Kanboard\Action; -use Kanboard\Model\Task; - /** * Close automatically a task * diff --git a/app/Core/Http/Route.php b/app/Core/Http/Route.php index ed831467..7836146d 100644 --- a/app/Core/Http/Route.php +++ b/app/Core/Http/Route.php @@ -2,7 +2,6 @@ namespace Kanboard\Core\Http; -use RuntimeException; use Kanboard\Core\Base; /** diff --git a/app/Core/Ldap/User.php b/app/Core/Ldap/User.php index 04c4cc7e..d36d6f34 100644 --- a/app/Core/Ldap/User.php +++ b/app/Core/Ldap/User.php @@ -40,7 +40,7 @@ class User * @access public * @param Client $client * @param string $username - * @return array + * @return LdapUserProvider */ public static function getUser(Client $client, $username) { diff --git a/app/Model/Config.php b/app/Model/Config.php index d815246f..55999310 100644 --- a/app/Model/Config.php +++ b/app/Model/Config.php @@ -4,7 +4,6 @@ namespace Kanboard\Model; use Kanboard\Core\Translator; use Kanboard\Core\Security\Token; -use Kanboard\Core\Session\SessionManager; /** * Config model diff --git a/app/Model/Group.php b/app/Model/Group.php index ce8c0284..67899503 100644 --- a/app/Model/Group.php +++ b/app/Model/Group.php @@ -2,9 +2,6 @@ namespace Kanboard\Model; -use SimpleValidator\Validator; -use SimpleValidator\Validators; - /** * Group Model * diff --git a/app/Model/ProjectUserRole.php b/app/Model/ProjectUserRole.php index 6b9c23b0..8149a253 100644 --- a/app/Model/ProjectUserRole.php +++ b/app/Model/ProjectUserRole.php @@ -28,7 +28,7 @@ class ProjectUserRole extends Base */ public function getActiveProjectsByUser($user_id) { - return $this->getProjectsByUser($user_id, $status = array(Project::ACTIVE)); + return $this->getProjectsByUser($user_id, array(Project::ACTIVE)); } /** diff --git a/app/ServiceProvider/EventDispatcherProvider.php b/app/ServiceProvider/EventDispatcherProvider.php index 8280a138..880caa41 100644 --- a/app/ServiceProvider/EventDispatcherProvider.php +++ b/app/ServiceProvider/EventDispatcherProvider.php @@ -11,7 +11,6 @@ use Kanboard\Subscriber\NotificationSubscriber; use Kanboard\Subscriber\ProjectDailySummarySubscriber; use Kanboard\Subscriber\ProjectModificationDateSubscriber; use Kanboard\Subscriber\SubtaskTimeTrackingSubscriber; -use Kanboard\Subscriber\TaskMovedDateSubscriber; use Kanboard\Subscriber\TransitionSubscriber; use Kanboard\Subscriber\RecurringTaskSubscriber; diff --git a/app/Validator/AuthValidator.php b/app/Validator/AuthValidator.php index e77a88c8..36ccdff0 100644 --- a/app/Validator/AuthValidator.php +++ b/app/Validator/AuthValidator.php @@ -23,28 +23,17 @@ class AuthValidator extends Base */ public function validateForm(array $values) { - $result = false; - $errors = array(); - - foreach (array('validateFields', 'validateLocking', 'validateCaptcha', 'validateCredentials') as $method) { - list($result, $errors) = $this->$method($values); - - if (! $result) { - break; - } - } - - return array($result, $errors); + return $this->executeValidators(array('validateFields', 'validateLocking', 'validateCaptcha', 'validateCredentials'), $values); } /** * Validate credentials syntax * - * @access private + * @access protected * @param array $values Form values * @return array $valid, $errors [0] = Success or not, [1] = List of errors */ - private function validateFields(array $values) + protected function validateFields(array $values) { $v = new Validator($values, array( new Validators\Required('username', t('The username is required')), @@ -61,11 +50,11 @@ class AuthValidator extends Base /** * Validate user locking * - * @access private + * @access protected * @param array $values Form values * @return array $valid, $errors [0] = Success or not, [1] = List of errors */ - private function validateLocking(array $values) + protected function validateLocking(array $values) { $result = true; $errors = array(); @@ -82,11 +71,11 @@ class AuthValidator extends Base /** * Validate password syntax * - * @access private + * @access protected * @param array $values Form values * @return array $valid, $errors [0] = Success or not, [1] = List of errors */ - private function validateCredentials(array $values) + protected function validateCredentials(array $values) { $result = true; $errors = array(); @@ -102,11 +91,11 @@ class AuthValidator extends Base /** * Validate captcha * - * @access private + * @access protected * @param array $values Form values * @return boolean */ - private function validateCaptcha(array $values) + protected function validateCaptcha(array $values) { $result = true; $errors = array(); |