diff --git a/src/AbstractServer.php b/src/AbstractServer.php index 16c4b931..38347f6f 100644 --- a/src/AbstractServer.php +++ b/src/AbstractServer.php @@ -25,7 +25,7 @@ abstract class AbstractServer /** * The request object * - * @var Util\RequestInterface + * @var \Symfony\Component\HttpFoundation\Request */ protected $request; @@ -37,12 +37,13 @@ abstract class AbstractServer /** * Token type - * @var TokenTypeInterface + * @var \League\OAuth2\Server\TokenType\TokenTypeInterface */ protected $tokenType; /** * Event emitter + * @var \League\Event\Emitter */ protected $eventEmitter; @@ -67,11 +68,20 @@ abstract class AbstractServer } } + /** + * Add an event listener to the event emitter + * @param string $eventName Event name + * @param callable $listener Callable function or method + */ public function addEventListener($eventName, callable $listener) { $this->eventEmitter->addListener($eventName, $listener); } + /** + * Returns the event emitter + * @return \League\Event\Emitter + */ public function getEventEmitter() { return $this->eventEmitter; diff --git a/src/Entity/AccessTokenEntity.php b/src/Entity/AccessTokenEntity.php index 76e8093a..c717ad80 100644 --- a/src/Entity/AccessTokenEntity.php +++ b/src/Entity/AccessTokenEntity.php @@ -18,11 +18,11 @@ class AccessTokenEntity extends AbstractTokenEntity { /** * Get session - * @return \League\OAuth2\Server\SessionEntity + * @return \League\OAuth2\Server\Entity\SessionEntity */ public function getSession() { - if ($this->session instanceof SessionEntity) { + if ($this->session instanceof Entity\SessionEntity) { return $this->session; } @@ -47,7 +47,7 @@ class AccessTokenEntity extends AbstractTokenEntity /** * Return all scopes associated with the session - * @return array Array of \League\OAuth2\Server\Entity\Scope + * @return [\League\OAuth2\Server\Entity\Scope] */ public function getScopes() {