From bd12c8b1a97a435913d6b8fa18e1c26f25211d4c Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Thu, 17 Mar 2016 11:18:59 +0000 Subject: [PATCH] Fix exception usage --- src/Grant/PasswordGrant.php | 4 ++-- src/Grant/RefreshTokenGrant.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Grant/PasswordGrant.php b/src/Grant/PasswordGrant.php index f9298722..a2ce660b 100644 --- a/src/Grant/PasswordGrant.php +++ b/src/Grant/PasswordGrant.php @@ -72,12 +72,12 @@ class PasswordGrant extends AbstractGrant { $username = $this->getRequestParameter('username', $request); if (is_null($username)) { - throw OAuthServerException::invalidRequest('username', null, '`%s` parameter is missing'); + throw OAuthServerException::invalidRequest('username', '`%s` parameter is missing'); } $password = $this->getRequestParameter('password', $request); if (is_null($password)) { - throw OAuthServerException::invalidRequest('password', null, '`%s` parameter is missing'); + throw OAuthServerException::invalidRequest('password', '`%s` parameter is missing'); } $user = $this->userRepository->getUserEntityByUserCredentials($username, $password); diff --git a/src/Grant/RefreshTokenGrant.php b/src/Grant/RefreshTokenGrant.php index 04d078e4..a03bdc90 100644 --- a/src/Grant/RefreshTokenGrant.php +++ b/src/Grant/RefreshTokenGrant.php @@ -101,7 +101,7 @@ class RefreshTokenGrant extends AbstractGrant { $encryptedRefreshToken = $this->getRequestParameter('refresh_token', $request); if (is_null($encryptedRefreshToken)) { - throw OAuthServerException::invalidRequest('refresh_token', null, '`%s` parameter is missing'); + throw OAuthServerException::invalidRequest('refresh_token', '`%s` parameter is missing'); } // Validate refresh token