Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit d6a1b3c

Browse files
committed
:octocat: return unnecessary
1 parent ebca0fc commit d6a1b3c

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/Core/OAuth2CSRFTokenTrait.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ trait OAuth2CSRFTokenTrait{
2323
/**
2424
* @param string|null $state
2525
*
26-
* @return \chillerlan\OAuth\Core\OAuth2Interface
26+
* @return void
2727
* @throws \chillerlan\OAuth\Core\ProviderException
2828
*/
29-
protected function checkState(string $state = null):OAuth2Interface{
29+
protected function checkState(string $state = null):void{
3030

3131
if(empty($state) || !$this->storage->hasCSRFState($this->serviceName)){
3232
throw new ProviderException('invalid state for '.$this->serviceName);
@@ -38,8 +38,6 @@ protected function checkState(string $state = null):OAuth2Interface{
3838
throw new ProviderException('invalid CSRF state: '.$this->serviceName.' '.$state);
3939
}
4040

41-
/** @noinspection PhpIncompatibleReturnTypeInspection */
42-
return $this;
4341
}
4442

4543
/**

tests/API/APITestAbstract.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ abstract class APITestAbstract extends TestCase{
6060
*/
6161
protected $dotEnv;
6262

63+
/**
64+
* @var float
65+
*/
66+
protected $requestDelay = 0.25;
67+
6368
protected function setUp(){
6469
ini_set('date.timezone', 'Europe/Amsterdam');
6570

@@ -80,7 +85,7 @@ protected function setUp(){
8085
'ca_info' => $this->CFG.'/cacert.pem',
8186
'userAgent' => 'chillerlanPhpOAuth/3.0.0 +https://github.com/chillerlan/php-oauth',
8287
// testHTTPClient
83-
'sleep' => 0.25,
88+
'sleep' => $this->requestDelay,
8489
// logger
8590
'minLogLevel' => 'debug',
8691
];

0 commit comments

Comments
 (0)