Make sure $this is returned

This commit is contained in:
Alex Bilbie 2013-11-25 23:58:42 +00:00
parent b4bfa69c88
commit 44408b873f
2 changed files with 13 additions and 2 deletions

View File

@ -261,6 +261,11 @@ class Authorization
return (array_key_exists($identifier, $this->grantTypes)); return (array_key_exists($identifier, $this->grantTypes));
} }
/**
* Returns response types
*
* @return array
*/
public function getResponseTypes() public function getResponseTypes()
{ {
return $this->responseTypes; return $this->responseTypes;
@ -287,11 +292,12 @@ class Authorization
/** /**
* Default scope to be used if none is provided and requireScopeParam is false * Default scope to be used if none is provided and requireScopeParam is false
* @var string|array * @param string|array $default
*/ */
public function setDefaultScope($default = null) public function setDefaultScope($default = null)
{ {
$this->defaultScope = $default; $this->defaultScope = $default;
return $this;
} }
/** /**
@ -321,6 +327,7 @@ class Authorization
public function requireStateParam($require = true) public function requireStateParam($require = true)
{ {
$this->requireStateParam = $require; $this->requireStateParam = $require;
return $this;
} }
/** /**
@ -341,6 +348,7 @@ class Authorization
public function setScopeDelimeter($scopeDelimeter = ' ') public function setScopeDelimeter($scopeDelimeter = ' ')
{ {
$this->scopeDelimeter = $scopeDelimeter; $this->scopeDelimeter = $scopeDelimeter;
return $this;
} }
/** /**
@ -359,6 +367,7 @@ class Authorization
public function setAccessTokenTTL($accessTokenTTL = 3600) public function setAccessTokenTTL($accessTokenTTL = 3600)
{ {
$this->accessTokenTTL = $accessTokenTTL; $this->accessTokenTTL = $accessTokenTTL;
return $this;
} }
/** /**
@ -369,6 +378,7 @@ class Authorization
public function setRequest(Util\RequestInterface $request) public function setRequest(Util\RequestInterface $request)
{ {
$this->request = $request; $this->request = $request;
return $this;
} }
/** /**
@ -381,7 +391,6 @@ class Authorization
if ($this->request === null) { if ($this->request === null) {
// @codeCoverageIgnoreStart // @codeCoverageIgnoreStart
$this->request = Request::buildFromGlobals(); $this->request = Request::buildFromGlobals();
} }
// @codeCoverageIgnoreEnd // @codeCoverageIgnoreEnd

View File

@ -93,6 +93,7 @@ class Resource
public function setRequest(RequestInterface $request) public function setRequest(RequestInterface $request)
{ {
$this->request = $request; $this->request = $request;
return $this;
} }
/** /**
@ -129,6 +130,7 @@ class Resource
public function setTokenKey($key) public function setTokenKey($key)
{ {
$this->tokenKey = $key; $this->tokenKey = $key;
return $this;
} }
/** /**