<?php  namespace Symfony\Component\Serializer\Exception;  class NotNormalizableValueException extends UnexpectedValueException { private ?string $currentType = null; private ?array $expectedTypes = null; private ?string $path = null; private bool $useMessageForUser = false;  public static function createForUnexpectedDataType(string $message, mixed $data, array $expectedTypes, ?string $path = null, bool $useMessageForUser = false, int $code = 0, ?\Throwable $previous = null): self { $self = new self($message, $code, $previous); $self->currentType = get_debug_type($data); $self->expectedTypes = array_map(strval(...), $expectedTypes); $self->path = $path; $self->useMessageForUser = $useMessageForUser; return $self; } public function getCurrentType(): ?string { return $this->currentType; }  public function getExpectedTypes(): ?array { return $this->expectedTypes; } public function getPath(): ?string { return $this->path; } public function canUseMessageForUser(): ?bool { return $this->useMessageForUser; } }