Explicitly compare to false when checking not instanceof

This commit is contained in:
Lukáš Unger
2016-07-09 12:09:21 +02:00
parent c3a4670c11
commit c874c59b9c
7 changed files with 15 additions and 15 deletions

View File

@@ -159,7 +159,7 @@ abstract class AbstractGrant implements GrantTypeInterface
true
);
if (!$client instanceof ClientEntityInterface) {
if ($client instanceof ClientEntityInterface === false) {
$this->getEmitter()->emit(new RequestEvent(RequestEvent::CLIENT_AUTHENTICATION_FAILED, $request));
throw OAuthServerException::invalidClient();
}
@@ -210,7 +210,7 @@ abstract class AbstractGrant implements GrantTypeInterface
foreach ($scopesList as $scopeItem) {
$scope = $this->scopeRepository->getScopeEntityByIdentifier($scopeItem);
if (!$scope instanceof ScopeEntityInterface) {
if ($scope instanceof ScopeEntityInterface === false) {
throw OAuthServerException::invalidScope($scopeItem, $redirectUri);
}