1<?php
2
3declare(strict_types=1);
4
5namespace JMS\Serializer\Tests\Fixtures;
6
7use JMS\Serializer\Annotation\Type;
8use JMS\Serializer\Annotation\XmlRoot;
9
10/** @XmlRoot("order") */
11class Order
12{
13    /** @Type("JMS\Serializer\Tests\Fixtures\Price") */
14    private $cost;
15
16    public function __construct(?Price $price = null)
17    {
18        $this->cost = $price ?: new Price(5);
19    }
20}
21