mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-15 09:47:46 +05:30
Little fixes
This commit is contained in:
parent
ca3b7d51df
commit
69571bc8ef
@ -14,8 +14,7 @@ namespace League\OAuth2\Server\Entities;
|
||||
use League\OAuth2\Server\Storage\SessionStorageInterface;
|
||||
use League\OAuth2\Server\Util\SecureKey;
|
||||
use League\OAuth2\Server\Exception\ServerException;
|
||||
use League\OAuth2\Server\Authorization;
|
||||
use League\OAuth2\Server\Resource;
|
||||
use League\OAuth2\Server\AbstractServer;
|
||||
use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
|
||||
/**
|
||||
@ -55,15 +54,11 @@ abstract class AbstractToken
|
||||
|
||||
/**
|
||||
* __construct
|
||||
* @param \League\OAuth2\Server\Authorization|\League\OAuth2\Server\Resource $server
|
||||
* @param \League\OAuth2\Server\AbstractServer $server
|
||||
* @return self
|
||||
*/
|
||||
public function __construct($server)
|
||||
public function __construct(AbstractServer $server)
|
||||
{
|
||||
if (! $server instanceof Authorization && ! $server instanceof Resource) {
|
||||
throw new ServerException('No instance of Authorization or Resource server injected');
|
||||
}
|
||||
|
||||
$this->server = $server;
|
||||
return $this;
|
||||
}
|
||||
|
@ -12,8 +12,7 @@
|
||||
namespace League\OAuth2\Server\Entities;
|
||||
|
||||
use League\OAuth2\Server\Exception\ServerException;
|
||||
use League\OAuth2\Server\Authorization;
|
||||
use League\OAuth2\Server\Resource;
|
||||
use League\OAuth2\Server\AbstractServer;
|
||||
|
||||
/**
|
||||
* Client entity class
|
||||
@ -52,14 +51,13 @@ class Client
|
||||
|
||||
/**
|
||||
* __construct
|
||||
* @param \League\OAuth2\Server\Authorization|\League\OAuth2\Server\Resource $server
|
||||
* @param \League\OAuth2\Server\AbstractServer $server
|
||||
* @return self
|
||||
*/
|
||||
public function __construct($server)
|
||||
public function __construct(AbstractServer $server)
|
||||
{
|
||||
if (! $server instanceof Authorization && ! $server instanceof Resource) {
|
||||
throw new ServerException('No instance of Authorization or Resource server injected');
|
||||
}
|
||||
$this->server = $server;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -12,8 +12,7 @@
|
||||
namespace League\OAuth2\Server\Entities;
|
||||
|
||||
use League\OAuth2\Server\Exception\ServerException;
|
||||
use League\OAuth2\Server\Authorization;
|
||||
use League\OAuth2\Server\Resource;
|
||||
use League\OAuth2\Server\AbstractServer;
|
||||
|
||||
/**
|
||||
* Scope entity class
|
||||
@ -40,14 +39,12 @@ class Scope
|
||||
|
||||
/**
|
||||
* __construct
|
||||
* @param \League\OAuth2\Server\Authorization|\League\OAuth2\Server\Resource $server
|
||||
* @param \League\OAuth2\Server\AbstractServer $server
|
||||
* @return self
|
||||
*/
|
||||
public function __construct($server)
|
||||
public function __construct(AbstractServer $server)
|
||||
{
|
||||
if (! $server instanceof Authorization && ! $server instanceof Resource) {
|
||||
throw new ServerException('No instance of Authorization or Resource server injected');
|
||||
}
|
||||
$this->server = $server;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -14,8 +14,7 @@ namespace League\OAuth2\Server\Entities;
|
||||
use League\OAuth2\Server\Exception\OAuth2Exception;
|
||||
use League\OAuth2\Server\Storage\SessionInterface;
|
||||
use League\OAuth2\Server\Exception\ServerException;
|
||||
use League\OAuth2\Server\Authorization;
|
||||
use League\OAuth2\Server\Resource;
|
||||
use League\OAuth2\Server\AbstractServer;
|
||||
use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
|
||||
/**
|
||||
@ -79,15 +78,11 @@ class Session
|
||||
|
||||
/**
|
||||
* __construct
|
||||
* @param \League\OAuth2\Server\Authorization|\League\OAuth2\Server\Resource $server
|
||||
* @param \League\OAuth2\Server\AbstractServer $server
|
||||
* @return self
|
||||
*/
|
||||
public function __construct($server)
|
||||
public function __construct(AbstractServer $server)
|
||||
{
|
||||
if (! $server instanceof Authorization && ! $server instanceof Resource) {
|
||||
throw new ServerException('No instance of Authorization or Resource server injected');
|
||||
}
|
||||
|
||||
$this->server = $server;
|
||||
return $this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user