Skip to content

Commit

Permalink
Merge pull request #536 from blat/master
Browse files Browse the repository at this point in the history
Fix declaration of requestAccessToken method (php 7.2 support)
  • Loading branch information
daviddesberg authored Feb 14, 2018
2 parents 09f4af3 + 5812501 commit fc11a53
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/OAuth/OAuth2/Service/Buffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected function parseRequestTokenResponse($responseBody)
return $data['code'];
}

public function requestAccessToken($code)
public function requestAccessToken($code, $state = null)
{
$bodyParams = array(
'client_id' => $this->credentials->getConsumerId(),
Expand Down
2 changes: 1 addition & 1 deletion src/OAuth/OAuth2/Service/Pocket.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected function parseRequestTokenResponse($responseBody)
return $data['code'];
}

public function requestAccessToken($code)
public function requestAccessToken($code, $state = null)
{
$bodyParams = array(
'consumer_key' => $this->credentials->getConsumerId(),
Expand Down
3 changes: 2 additions & 1 deletion src/OAuth/OAuth2/Service/ServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ interface ServiceInterface extends BaseServiceInterface
* Retrieves and stores/returns the OAuth2 access token after a successful authorization.
*
* @param string $code The access code from the callback.
* @param string $state
*
* @return TokenInterface $token
*
* @throws TokenResponseException
*/
public function requestAccessToken($code);
public function requestAccessToken($code, $state = null);
}

0 comments on commit fc11a53

Please sign in to comment.