diff --git a/phpstan.neon.dist b/phpstan.neon.dist index ee3f9221f4..7ee3b59458 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -89,7 +89,6 @@ parameters: - "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component\\\\\\\\HttpFoundation\\\\\\\\Request' and 'getContentTypeFormat' will always evaluate to true\\.#" - '#Call to an undefined method Symfony\\Component\\HttpFoundation\\Request::getContentType\(\)\.#' - "#Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component\\\\\\\\Serializer\\\\\\\\Serializer' and 'getSupportedTypes' will always evaluate to true\\.#" - - "#Call to function method_exists\\(\\) with Symfony\\\\Component\\\\Serializer\\\\Normalizer\\\\NormalizerInterface and 'getSupportedTypes' will always evaluate to true\\.#" - "#Call to function method_exists\\(\\) with Doctrine\\\\ODM\\\\MongoDB\\\\Mapping\\\\ClassMetadata\\|Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadata and 'isChangeTrackingDef…' will always evaluate to true\\.#" - "#Call to function method_exists\\(\\) with Symfony\\\\Component\\\\Serializer\\\\Exception\\\\PartialDenormalizationException and 'getNotNormalizableV…' will always evaluate to true\\.#" diff --git a/src/JsonLd/Serializer/ErrorNormalizer.php b/src/JsonLd/Serializer/ErrorNormalizer.php index aa786d80b2..a99e6f02a6 100644 --- a/src/JsonLd/Serializer/ErrorNormalizer.php +++ b/src/JsonLd/Serializer/ErrorNormalizer.php @@ -70,10 +70,6 @@ public function supportsNormalization(mixed $data, ?string $format = null, array */ public function getSupportedTypes(?string $format): array { - if (method_exists($this->inner, 'getSupportedTypes')) { - return $this->inner->getSupportedTypes($format); - } - - return []; + return $this->inner->getSupportedTypes($format); } }