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 ObjectWithXmlKeyValuePairsWithObjectType
11{
12    /**
13     * @var array
14     * @Type("array<string,JMS\Serializer\Tests\Fixtures\ObjectWithXmlKeyValuePairsWithType>")
15     * @XmlKeyValuePairs
16     */
17    private $list;
18
19    public function __construct(array $list)
20    {
21        $this->list = $list;
22    }
23
24    public static function create1()
25    {
26        return new self(
27            [
28                'key_first' => ObjectWithXmlKeyValuePairsWithType::create1(),
29                'key_second' => ObjectWithXmlKeyValuePairsWithType::create2(),
30            ]
31        );
32    }
33}
34