Skip to content

Commit 35250f0

Browse files
NinerianOpencodeGitHub Copilot
committed
refactor: address PR review feedback on docblocks and gitignore
- Remove duplicate docblocks in ClaimAccessTrait, SSOTokenGenerator, and SSOTestData; merge typed @return/@param into existing blocks - Remove !/.gitignore from .gitignore (not needed) Co-Authored-By: Opencode <opencode@noreply.opencode.ai> Co-Authored-By: GitHub Copilot <copilot@noreply.github.com>
1 parent 02cc11f commit 35250f0

4 files changed

Lines changed: 4 additions & 19 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,3 @@ phpcs.xml
4040
/vendor/*
4141
/wpcs/*
4242

43-
!/.gitignore

src/SSOData/ClaimAccessTrait.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,11 @@ abstract protected function hasClaim(string $claim): bool;
3535
*
3636
* @return mixed
3737
*/
38-
/**
39-
* @return mixed
40-
*/
4138
abstract protected function getClaim(string $claim);
39+
4240
/**
4341
* Get an array of all available claims and their values.
4442
*
45-
* @return array
46-
*/
47-
/**
4843
* @return array<string, mixed>
4944
*/
5045
abstract protected function getAllClaims(): array;

src/SSOTokenGenerator.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,8 @@ public static function createSignedTokenFromData(string $privateKey, array $toke
4646

4747
/**
4848
* @param Configuration $config
49-
* @param array $tokenData
50-
* @return Token
51-
*/
52-
/**
5349
* @param array<string,mixed> $tokenData
50+
* @return Token
5451
*/
5552
private static function buildToken(Configuration $config, array $tokenData): Token
5653
{

test/SSOTestData.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,9 @@ class SSOTestData
4444
* @param string|null $exp
4545
* @param string|null $npf
4646
* @param string|null $iat
47-
* @return array Associative array of claims.
47+
* @return array<string,mixed> Associative array of claims.
4848
* @throws Exception
4949
*/
50-
/**
51-
* @return array<string,mixed>
52-
*/
5350
public static function getTokenData(?string $exp = '10 minutes', ?string $npf = '-1 minutes', ?string $iat = 'now'): array
5451
{
5552
$exp ??= '10 minutes';
@@ -91,10 +88,7 @@ public static function getTokenData(?string $exp = '10 minutes', ?string $npf =
9188
/**
9289
* Get accessors map for supported tokens.
9390
*
94-
* @return array Associative array of claim accessors.
95-
*/
96-
/**
97-
* @return array<string,string>
91+
* @return array<string,string> Associative array of claim accessors.
9892
*/
9993
public static function getTokenAccessors(): array
10094
{

0 commit comments

Comments
 (0)