1<?php 2 3declare(strict_types=1); 4 5namespace JMS\Serializer\Tests\Fixtures; 6 7use JMS\Serializer\Annotation\Type; 8use JMS\Serializer\Annotation\XmlKeyValuePairs; 9 10class NamedDateTimeImmutableArraysObject 11{ 12 /** 13 * @var \DateTime[] 14 * @Type("array<string,DateTimeImmutable<'d.m.Y H:i:s'>>") 15 * @XmlKeyValuePairs 16 */ 17 private $namedArrayWithFormattedDate; 18 19 public function __construct($namedArrayWithFormattedDate) 20 { 21 $this->namedArrayWithFormattedDate = $namedArrayWithFormattedDate; 22 } 23 24 /** 25 * @return \DateTimeImmutable[] 26 */ 27 public function getNamedArrayWithFormattedDate() 28 { 29 return $this->namedArrayWithFormattedDate; 30 } 31} 32