Skip to content

Commit 87504bb

Browse files
committed
refactor: fix linter issues
1 parent c84ff5a commit 87504bb

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
return (new PhpCsFixer\Config())
88
->setRules([
9+
'@PHP8x4Migration' => true,
910
'@PER-CS' => true,
1011
'array_syntax' => ['syntax' => 'short'],
1112
'declare_strict_types' => true,

src/SSOTokenGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class SSOTokenGenerator
3535
*
3636
* @return string Encoded token.
3737
*/
38-
public static function createSignedTokenFromData(string $privateKey, array $tokenData, Signer $signer = null): string
38+
public static function createSignedTokenFromData(string $privateKey, array $tokenData, ?Signer $signer = null): string
3939
{
4040

4141
$config = Configuration::forSymmetricSigner($signer ?: new Sha256(), InMemory::plainText($privateKey));

src/SessionHandling/SessionHandlerTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function setSessionVar($key, $val, ?string $parentKey = null): void
116116
* @param String|null $sessionId
117117
* @return bool true on success or false on failure.
118118
*/
119-
public function destroySession(String $sessionId = null): bool
119+
public function destroySession(?String $sessionId = null): bool
120120
{
121121
$sessionId = $sessionId ?: $this->sessionId;
122122

test/PluginSessionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function tearDown(): void
6969
* @param string|null $queryParamJwt JWT query param emulation
7070
* @param boolean $clearSession optionally clear out the $_SESSION array
7171
*/
72-
private function setupEnvironment(string $queryParamPid = null, string $queryParamJwt = null, bool $clearSession = true)
72+
private function setupEnvironment(?string $queryParamPid = null, ?string $queryParamJwt = null, bool $clearSession = true)
7373
{
7474

7575
$_REQUEST[PluginSession::QUERY_PARAM_PID] = $queryParamPid;

test/SSOTestData.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ class SSOTestData
4949
*/
5050
public static function getTokenData(?string $exp = '10 minutes', ?string $npf = '-1 minutes', ?string $iat = 'now'): array
5151
{
52-
$exp = $exp ?? '10 minutes';
53-
$npf = $npf ?? '-1 minutes';
54-
$iat = $iat ?? 'now';
52+
$exp ??= '10 minutes';
53+
$npf ??= '-1 minutes';
54+
$iat ??= 'now';
5555

5656
$date = new DateTimeImmutable($iat);
5757

0 commit comments

Comments
 (0)