From 8c532efd5f02f7a7e5ea322a07ddcf49d130a8ec Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 17 Oct 2015 10:09:03 -0400 Subject: Run php-cs-fixer on the code base --- app/Api/Auth.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'app/Api/Auth.php') diff --git a/app/Api/Auth.php b/app/Api/Auth.php index b741694b..b3627e4b 100644 --- a/app/Api/Auth.php +++ b/app/Api/Auth.php @@ -29,11 +29,9 @@ class Auth extends Base if ($username !== 'jsonrpc' && ! $this->authentication->hasCaptcha($username) && $this->authentication->authenticate($username, $password)) { $this->checkProcedurePermission(true, $method); $this->userSession->refresh($this->user->getByUsername($username)); - } - else if ($username === 'jsonrpc' && $password === $this->config->get('api_token')) { + } elseif ($username === 'jsonrpc' && $password === $this->config->get('api_token')) { $this->checkProcedurePermission(false, $method); - } - else { + } else { throw new AuthenticationFailure('Wrong credentials'); } } -- cgit v1.2.3