Skip to content

Commit

Permalink
OAuth2\Provider getAccessToken $code must be a string
Browse files Browse the repository at this point in the history
  • Loading branch information
ovr committed Jan 11, 2015
1 parent c9f0d9c commit e0c03ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Provider/OAuth2/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,15 @@ public function parseToken($body)
}

/**
* @param $code
* @param string $code
* @return AccessToken
*/
public function getAccessToken($code)
{
if (!is_string($code)) {
throw new \InvalidArgumentException('Parameter $code must be a string');
}

$parameters = array(
'client_id' => $this->applicationId,
'client_secret' => $this->applicationSecret,
Expand Down

0 comments on commit e0c03ae

Please sign in to comment.