Skip to content

Commit 8a64441

Browse files
committed
:octocat: stop the yelling
1 parent 4fe7a8d commit 8a64441

File tree

5 files changed

+19
-21
lines changed

5 files changed

+19
-21
lines changed

examples/Providers/Spotify/SpotifyClient.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class SpotifyClient extends Spotify{
2424
protected string $market;
2525
/** @var array<string, object> */
2626
protected array $artists = [];
27-
/** @var array<string, object> */
27+
/** @var array<string, array<string, object>> */
2828
protected array $albums = [];
2929

3030
protected function construct():void{

src/Core/OAuth1Provider.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ abstract class OAuth1Provider extends OAuthProvider implements OAuth1Interface{
3333
protected string $requestTokenURL = '';
3434

3535
/**
36-
* @param array<string, string> $params
36+
* @param array<string, scalar>|null $params
3737
*/
3838
public function getAuthorizationURL(array|null $params = null, array|null $scopes = null):UriInterface{
3939
$response = $this->sendRequestTokenRequest($this->requestTokenURL);
@@ -150,7 +150,7 @@ protected function parseTokenResponse(ResponseInterface $response, bool|null $ch
150150
* @see \chillerlan\OAuth\Core\OAuth1Provider::getRequestTokenRequestParams()
151151
* @see \chillerlan\OAuth\Core\OAuth1Provider::getRequestAuthorization()
152152
*
153-
* @param array<string, string> $params
153+
* @param array<string, scalar> $params
154154
*
155155
* @throws \chillerlan\OAuth\Providers\ProviderException
156156
*/
@@ -231,7 +231,7 @@ protected function getAccessTokenRequestHeaderParams(AccessToken $requestToken,
231231
/**
232232
* Adds the "Authorization" header to the given `RequestInterface` using the given array or parameters
233233
*
234-
* @param array<string, string> $params
234+
* @param array<string, scalar> $params
235235
*/
236236
protected function setAuthorizationHeader(RequestInterface $request, array $params):RequestInterface{
237237
return $request->withHeader('Authorization', sprintf('OAuth %s', QueryUtil::build($params, null, ', ', '"')));
@@ -242,7 +242,7 @@ protected function setAuthorizationHeader(RequestInterface $request, array $para
242242
*
243243
* @see \chillerlan\OAuth\Core\OAuth1Provider::getAccessToken()
244244
*
245-
* @param array<string, string> $headerParams
245+
* @param array<string, scalar> $headerParams
246246
*/
247247
protected function sendAccessTokenRequest(array $headerParams):ResponseInterface{
248248

src/Core/OAuth2Provider.php

+11-11
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ abstract class OAuth2Provider extends OAuthProvider implements OAuth2Interface{
5656
protected string $parAuthorizationURL = '';
5757

5858
/**
59-
* @param array<string, string> $params
60-
* @param string[] $scopes
59+
* @param array<string, scalar>|null $params
60+
* @param string[]|null $scopes
6161
*/
6262
public function getAuthorizationURL(array|null $params = null, array|null $scopes = null):UriInterface{
6363
$queryParams = $this->getAuthorizationURLRequestParams(($params ?? []), ($scopes ?? $this::DEFAULT_SCOPES));
@@ -74,7 +74,7 @@ public function getAuthorizationURL(array|null $params = null, array|null $scope
7474
*
7575
* @see \chillerlan\OAuth\Core\OAuth2Provider::getAuthorizationURL()
7676
*
77-
* @param array<string, string> $params
77+
* @param array<string, scalar> $params
7878
* @param string[] $scopes
7979
*/
8080
protected function getAuthorizationURLRequestParams(array $params, array $scopes):array{
@@ -236,7 +236,7 @@ protected function getAccessTokenRequestBodyParams(string $code):array{
236236
* @see \chillerlan\OAuth\Core\OAuth2Provider::refreshAccessToken()
237237
* @see \chillerlan\OAuth\Core\OAuth2Provider::getParRequestUri()
238238
*
239-
* @param array<string, string> $body
239+
* @param array<string, scalar> $body
240240
*/
241241
protected function sendAccessTokenRequest(string $url, array $body):ResponseInterface{
242242

@@ -340,7 +340,7 @@ protected function getClientCredentialsTokenRequestBodyParams(array|null $scopes
340340
*
341341
* @see \chillerlan\OAuth\Core\OAuth2Provider::getClientCredentialsToken()
342342
*
343-
* @param array<string, string> $body
343+
* @param array<string, scalar> $body
344344
*/
345345
protected function sendClientCredentialsTokenRequest(string $url, array $body):ResponseInterface{
346346

@@ -467,7 +467,7 @@ public function invalidateAccessToken(AccessToken|null $token = null, string|nul
467467
*
468468
* @see \chillerlan\OAuth\Core\OAuth2Provider::invalidateAccessToken()
469469
*
470-
* @param array<string, string> $body
470+
* @param array<string, scalar> $body
471471
*/
472472
protected function sendTokenInvalidateRequest(string $url, array $body):ResponseInterface{
473473

@@ -505,7 +505,7 @@ protected function getInvalidateAccessTokenBodyParams(AccessToken $token, string
505505
* @see \chillerlan\OAuth\Core\CSRFToken::setState()
506506
* @see \chillerlan\OAuth\Core\OAuth2Provider::getAuthorizationURLRequestParams()
507507
*
508-
* @param array<string, string> $params
508+
* @param array<string, scalar> $params
509509
* @throws \chillerlan\OAuth\Providers\ProviderException
510510
*/
511511
final public function setState(array $params):array{
@@ -562,7 +562,7 @@ final public function checkState(string|null $state = null):void{
562562
* @see \chillerlan\OAuth\Core\PKCE::setCodeChallenge()
563563
* @see \chillerlan\OAuth\Core\OAuth2Provider::getAuthorizationURLRequestParams()
564564
*
565-
* @param array<string, string> $params
565+
* @param array<string, scalar> $params
566566
*/
567567
final public function setCodeChallenge(array $params, string $challengeMethod):array{
568568

@@ -590,7 +590,7 @@ final public function setCodeChallenge(array $params, string $challengeMethod):a
590590
* @see \chillerlan\OAuth\Core\PKCE::setCodeVerifier()
591591
* @see \chillerlan\OAuth\Core\OAuth2Provider::getAccessTokenRequestBodyParams()
592592
*
593-
* @param array<string, string> $params
593+
* @param array<string, scalar> $params
594594
*/
595595
final public function setCodeVerifier(array $params):array{
596596

@@ -669,7 +669,7 @@ final public function generateChallenge(string $verifier, string $challengeMetho
669669
* @see \chillerlan\OAuth\Core\PAR::getParRequestUri()
670670
* @see \chillerlan\OAuth\Core\OAuth2Provider::getAuthorizationURL()
671671
*
672-
* @param array<string, string> $body
672+
* @param array<string, scalar> $body
673673
*/
674674
public function getParRequestUri(array $body):UriInterface{
675675

@@ -704,7 +704,7 @@ public function getParRequestUri(array $body):UriInterface{
704704
*
705705
* @see \chillerlan\OAuth\Core\OAuth2Provider::getParRequestUri()
706706
*
707-
* @param array<string, string> $response
707+
* @param array<string, scalar> $response
708708
*
709709
* @codeCoverageIgnore
710710
*/

src/Providers/LastFM.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,7 @@ public function me():AuthenticatedUser{
276276
*
277277
* @link https://www.last.fm/api/show/track.scrobble
278278
*
279-
* @param array<string, scalar> $tracks
280-
* @return array<string, scalar>
279+
* @param array<string, scalar>|array<int, array<string, scalar>> $tracks
281280
*/
282281
public function scrobble(array $tracks):array{
283282

@@ -416,7 +415,6 @@ protected function set_duration(int $duration):void{
416415

417416
/**
418417
* @param array<string, string> $body
419-
* @return array<string, mixed>|null
420418
* @codeCoverageIgnore
421419
*/
422420
protected function sendScrobbles(array $body):array|null{

src/Providers/Steam.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class Steam extends OAuthProvider implements UserInfo{
3939
*
4040
* @inheritDoc
4141
*
42-
* @param array<string, string> $params
43-
* @param string[] $scopes
42+
* @param array<string, string>|null $params
43+
* @param string[]|null $scopes
4444
*/
4545
public function getAuthorizationURL(array|null $params = null, array|null $scopes = null):UriInterface{
4646

0 commit comments

Comments
 (0)