From 170ce2fd2d238a6c0cba46dbb4d27f28089f35b8 Mon Sep 17 00:00:00 2001 From: Diogo Oliveira de Melo Date: Fri, 30 Jun 2017 15:42:23 -0300 Subject: [PATCH] Replaces array_key_exists by isset, which is faster, on ImplicitGrant. --- src/Grant/ImplicitGrant.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Grant/ImplicitGrant.php b/src/Grant/ImplicitGrant.php index 62a48147..2ec9aed7 100644 --- a/src/Grant/ImplicitGrant.php +++ b/src/Grant/ImplicitGrant.php @@ -95,8 +95,8 @@ class ImplicitGrant extends AbstractAuthorizeGrant public function canRespondToAuthorizationRequest(ServerRequestInterface $request) { return ( - array_key_exists('response_type', $request->getQueryParams()) - && $request->getQueryParams()['response_type'] === 'token' + isset($request->getQueryParams()['response_type']) + && 'token' === $request->getQueryParams()['response_type'] && isset($request->getQueryParams()['client_id']) ); }