Skip to content

Commit

Permalink
Remove unnecessary null type in serializer property annotations
Browse files Browse the repository at this point in the history
The baseline update reflects changes to remove `null` from property types that are never actually assigned as null across multiple services. Additionally, a minor code improvement was made by adding the `sprintf` function import in the MockClientCallback.
  • Loading branch information
Spomky committed Jan 4, 2025
1 parent 8fe3462 commit fc2b808
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -2706,6 +2706,11 @@ parameters:
count: 1
path: src/webauthn/src/MetadataService/Service/DistantResourceMetadataService.php

-
message: "#^Property Webauthn\\\\MetadataService\\\\Service\\\\DistantResourceMetadataService\\:\\:\\$serializer \\(Symfony\\\\Component\\\\Serializer\\\\SerializerInterface\\|null\\) is never assigned null so it can be removed from the property type\\.$#"
count: 1
path: src/webauthn/src/MetadataService/Service/DistantResourceMetadataService.php

-
message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#"
count: 1
Expand Down Expand Up @@ -2759,6 +2764,11 @@ parameters:
count: 1
path: src/webauthn/src/MetadataService/Service/FidoAllianceCompliantMetadataService.php

-
message: "#^Property Webauthn\\\\MetadataService\\\\Service\\\\FidoAllianceCompliantMetadataService\\:\\:\\$serializer \\(Symfony\\\\Component\\\\Serializer\\\\SerializerInterface\\|null\\) is never assigned null so it can be removed from the property type\\.$#"
count: 1
path: src/webauthn/src/MetadataService/Service/FidoAllianceCompliantMetadataService.php

-
message: """
#^Call to deprecated method createFromString\\(\\) of class Webauthn\\\\MetadataService\\\\Statement\\\\MetadataStatement\\:
Expand All @@ -2772,6 +2782,11 @@ parameters:
count: 1
path: src/webauthn/src/MetadataService/Service/FolderResourceMetadataService.php

-
message: "#^Property Webauthn\\\\MetadataService\\\\Service\\\\FolderResourceMetadataService\\:\\:\\$serializer \\(Symfony\\\\Component\\\\Serializer\\\\SerializerInterface\\|null\\) is never assigned null so it can be removed from the property type\\.$#"
count: 1
path: src/webauthn/src/MetadataService/Service/FolderResourceMetadataService.php

-
message: """
#^Call to deprecated method createFromString\\(\\) of class Webauthn\\\\MetadataService\\\\Statement\\\\MetadataStatement\\:
Expand All @@ -2780,6 +2795,11 @@ parameters:
count: 1
path: src/webauthn/src/MetadataService/Service/JsonMetadataService.php

-
message: "#^Property Webauthn\\\\MetadataService\\\\Service\\\\JsonMetadataService\\:\\:\\$serializer \\(Symfony\\\\Component\\\\Serializer\\\\SerializerInterface\\|null\\) is never assigned null so it can be removed from the property type\\.$#"
count: 1
path: src/webauthn/src/MetadataService/Service/JsonMetadataService.php

-
message: """
#^Call to deprecated method createFromString\\(\\) of class Webauthn\\\\MetadataService\\\\Statement\\\\MetadataStatement\\:
Expand All @@ -2798,6 +2818,11 @@ parameters:
count: 1
path: src/webauthn/src/MetadataService/Service/LocalResourceMetadataService.php

-
message: "#^Property Webauthn\\\\MetadataService\\\\Service\\\\LocalResourceMetadataService\\:\\:\\$serializer \\(Symfony\\\\Component\\\\Serializer\\\\SerializerInterface\\|null\\) is never assigned null so it can be removed from the property type\\.$#"
count: 1
path: src/webauthn/src/MetadataService/Service/LocalResourceMetadataService.php

-
message: "#^Parameter \\#1 \\$data of static method Webauthn\\\\MetadataService\\\\Service\\\\MetadataBLOBPayloadEntry\\:\\:createFromArray\\(\\) expects array\\<string, mixed\\>, mixed given\\.$#"
count: 1
Expand Down
1 change: 1 addition & 0 deletions tests/symfony/functional/MockClientCallback.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use RuntimeException;
use Symfony\Contracts\HttpClient\ResponseInterface;
use function sprintf;

/**
* @internal
Expand Down

0 comments on commit fc2b808

Please sign in to comment.