Replace fqn with unqualified name

This commit is contained in:
Marc Ypes
2018-11-13 01:00:23 +01:00
parent 34ec35019b
commit 4bb5b747c1
23 changed files with 137 additions and 95 deletions

View File

@@ -9,6 +9,7 @@
namespace League\OAuth2\Server;
use DateInterval;
use Defuse\Crypto\Key;
use League\Event\EmitterAwareInterface;
use League\Event\EmitterAwareTrait;
@@ -34,7 +35,7 @@ class AuthorizationServer implements EmitterAwareInterface
protected $enabledGrantTypes = [];
/**
* @var \DateInterval[]
* @var DateInterval[]
*/
protected $grantTypeAccessTokenTTL = [];
@@ -126,12 +127,12 @@ class AuthorizationServer implements EmitterAwareInterface
* Enable a grant type on the server.
*
* @param GrantTypeInterface $grantType
* @param null|\DateInterval $accessTokenTTL
* @param null|DateInterval $accessTokenTTL
*/
public function enableGrantType(GrantTypeInterface $grantType, \DateInterval $accessTokenTTL = null)
public function enableGrantType(GrantTypeInterface $grantType, DateInterval $accessTokenTTL = null)
{
if ($accessTokenTTL instanceof \DateInterval === false) {
$accessTokenTTL = new \DateInterval('PT1H');
if ($accessTokenTTL instanceof DateInterval === false) {
$accessTokenTTL = new DateInterval('PT1H');
}
$grantType->setAccessTokenRepository($this->accessTokenRepository);