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 CurrencyAwareOrder
12{
13    /** @Type("JMS\Serializer\Tests\Fixtures\CurrencyAwarePrice") */
14    private $cost;
15
16    public function __construct(?CurrencyAwarePrice $price = null)
17    {
18        $this->cost = $price ?: new CurrencyAwarePrice(5);
19    }
20}
21