diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index c524bb14..c70398a1 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1756,30 +1756,40 @@ parameters: path: src/Component/KeyManagement/X5UFactory.php - - message: "#^Parameter \\#1 \\$recipientKey of method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:addRecipient\\(\\) expects Jose\\\\Component\\\\Core\\\\JWK, mixed given\\.$#" + message: "#^Call to function array_key_exists\\(\\) with 'key' and array\\{key\\: Jose\\\\Component\\\\Core\\\\JWK, header\\?\\: array\\\\} will always evaluate to true\\.$#" count: 1 path: src/Component/NestedToken/NestedTokenBuilder.php - - message: "#^Parameter \\#1 \\$signatureKey of method Jose\\\\Component\\\\Signature\\\\JWSBuilder\\:\\:addSignature\\(\\) expects Jose\\\\Component\\\\Core\\\\JWK, mixed given\\.$#" + message: "#^Call to function array_key_exists\\(\\) with 'key' and array\\{key\\: Jose\\\\Component\\\\Core\\\\JWK, protected_header\\?\\: array\\, header\\?\\: array\\\\} will always evaluate to true\\.$#" count: 1 path: src/Component/NestedToken/NestedTokenBuilder.php - - message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\JWSBuilder\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, mixed given\\.$#" + message: "#^Call to function is_array\\(\\) with array\\{key\\: Jose\\\\Component\\\\Core\\\\JWK, header\\?\\: array\\\\} will always evaluate to true\\.$#" count: 1 path: src/Component/NestedToken/NestedTokenBuilder.php - - message: "#^Parameter \\#2 \\$recipientHeader of method Jose\\\\Component\\\\Encryption\\\\JWEBuilder\\:\\:addRecipient\\(\\) expects array, mixed given\\.$#" + message: "#^Call to function is_array\\(\\) with array\\{key\\: Jose\\\\Component\\\\Core\\\\JWK, protected_header\\?\\: array\\, header\\?\\: array\\\\} will always evaluate to true\\.$#" count: 1 path: src/Component/NestedToken/NestedTokenBuilder.php - - message: "#^Parameter \\#3 \\$header of method Jose\\\\Component\\\\Signature\\\\JWSBuilder\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, mixed given\\.$#" + message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\JWSBuilder\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array\\ given\\.$#" count: 1 path: src/Component/NestedToken/NestedTokenBuilder.php + - + message: "#^Parameter \\#3 \\$header of method Jose\\\\Component\\\\Signature\\\\JWSBuilder\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array\\ given\\.$#" + count: 1 + path: src/Component/NestedToken/NestedTokenBuilder.php + + - + message: "#^Result of \\|\\| is always false\\.$#" + count: 2 + path: src/Component/NestedToken/NestedTokenBuilder.php + - message: "#^Parameter \\#2 \\$protectedHeader of method Jose\\\\Component\\\\Signature\\\\JWS\\:\\:addSignature\\(\\) expects array\\{alg\\?\\: string, string\\?\\: mixed\\}, array\\ given\\.$#" count: 1 diff --git a/src/Component/NestedToken/NestedTokenBuilder.php b/src/Component/NestedToken/NestedTokenBuilder.php index e9cae492..c245497e 100644 --- a/src/Component/NestedToken/NestedTokenBuilder.php +++ b/src/Component/NestedToken/NestedTokenBuilder.php @@ -26,10 +26,10 @@ public function __construct( /** * Creates a nested token. * - * @param array{key: JWK, protected_header?: array, header?: array} $signatures + * @param array{array{key: JWK, protected_header?: array, header?: array}} $signatures * @param array{alg?: string, string?: mixed} $jweSharedProtectedHeader * @param array{alg?: string, string?: mixed} $jweSharedHeader - * @param array{key: JWK, header?: array} $recipients + * @param array{array{key: JWK, header?: array}} $recipients */ public function create( string $payload,