mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +00:00
Fix type-hinting of DocGenObjectNormalizer and related
This commit is contained in:
@@ -11,14 +11,14 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\DocGeneratorBundle\Serializer\Helper;
|
||||
|
||||
use Symfony\Component\Serializer\Mapping\ClassMetadata;
|
||||
use Symfony\Component\Serializer\Mapping\ClassMetadataInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||
|
||||
class NormalizeNullValueHelper
|
||||
{
|
||||
public function __construct(private readonly NormalizerInterface $normalizer, private readonly ?string $discriminatorType = null, private readonly ?string $discriminatorValue = null) {}
|
||||
|
||||
public function normalize(array $attributes, string $format = 'docgen', ?array $context = [], ClassMetadata $classMetadata = null)
|
||||
public function normalize(array $attributes, string $format = 'docgen', ?array $context = [], ClassMetadataInterface $classMetadata = null)
|
||||
{
|
||||
$data = [];
|
||||
$data['isNull'] = true;
|
||||
@@ -44,7 +44,7 @@ class NormalizeNullValueHelper
|
||||
return $data;
|
||||
}
|
||||
|
||||
private function getContextForAttribute(string $key, array $initialContext, ?ClassMetadata $classMetadata): array
|
||||
private function getContextForAttribute(string $key, array $initialContext, ?ClassMetadataInterface $classMetadata): array
|
||||
{
|
||||
if (null === $classMetadata) {
|
||||
return $initialContext;
|
||||
|
Reference in New Issue
Block a user