Skip to content

Commit

Permalink
Fix PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
mabar committed Jun 19, 2024
1 parent 8a5ad49 commit 3fec7e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 2 additions & 3 deletions src/Utils/MediaTypes.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ public static function isValid(string $mediaType): bool
}

/**
* @template T of array<string, mixed>
* @param T $mediaTypes
* @param-out T $mediaTypes
* @param array<string, mixed> $mediaTypes
* @param-out array<string, mixed> $mediaTypes
*/
public static function sortTypesInKeys(array &$mediaTypes): void
{
Expand Down
5 changes: 0 additions & 5 deletions tools/phpstan.baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ parameters:
count: 1
path: ../tests/Unit/Utils/HeadersTest.php

-
message: "#^Call to static method PHPUnit\\\\Framework\\\\Assert\\:\\:assertSame\\(\\) with array\\{application/json\\: null, application/xml\\: null, application/x\\-neon\\: null, application/x\\-yaml\\: null, text/csv\\: null, text/\\*\\: null, \\*/\\*\\: null\\} and array\\{text/\\*\\: null, \\*/\\*\\: null, text/csv\\: null, application/x\\-neon\\: null, application/xml\\: null, application/x\\-yaml\\: null, application/json\\: null\\} will always evaluate to false\\.$#"
count: 1
path: ../tests/Unit/Utils/MediaTypesTest.php

-
message: "#^Offset 1 might not exist on list\\<string\\|null\\>\\|null\\.$#"
count: 1
Expand Down

0 comments on commit 3fec7e8

Please sign in to comment.