diff --git a/composer.json b/composer.json
index 3fa6d231..8c09c503 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,8 @@
},
"require-dev": {
"roave/security-advisories": "dev-latest",
- "yoast/phpunit-polyfills": "^1.0"
+ "yoast/phpunit-polyfills": "^1.0",
+ "phpunit/phpunit": "^9.6"
},
"archive" : {
"exclude" : [
@@ -19,5 +20,8 @@
},
"autoload" : {
"classmap": [ "src/"]
+ },
+ "scripts" : {
+ "test": "phpunit"
}
}
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index df8ef259..ce4a62c6 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -9,20 +9,10 @@
stopOnFailure="false"
processIsolation="false"
backupGlobals="false"
- syntaxCheck="true"
>
./tests
-
-
- ./src
-
- ./vendor
- ./tests
-
-
-
diff --git a/src/OpenIDConnectClient.php b/src/OpenIDConnectClient.php
index 6aa80b17..d860a9cf 100644
--- a/src/OpenIDConnectClient.php
+++ b/src/OpenIDConnectClient.php
@@ -1223,9 +1223,9 @@ protected function urlEncode(string $str): string
/**
* @param string $jwt encoded JWT
* @param int $section the section we would like to decode
- * @return object
+ * @return ?object
*/
- protected function decodeJWT(string $jwt, int $section = 0): stdClass {
+ protected function decodeJWT(string $jwt, int $section = 0): ?stdClass {
$parts = explode('.', $jwt);
return json_decode(base64url_decode($parts[$section]), false);
@@ -1727,7 +1727,7 @@ public function getAccessToken(): string
return $this->accessToken;
}
- public function getRefreshToken(): string
+ public function getRefreshToken(): ?string
{
return $this->refreshToken;
}