This repository was archived by the owner on Mar 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff 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 /**
Original file line number Diff line number Diff 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 ];
You can’t perform that action at this time.
0 commit comments