1<?php
2
3declare(strict_types=1);
4
5namespace JMS\Serializer\Tests\Fixtures\DiscriminatorGroup;
6
7use JMS\Serializer\Annotation as Serializer;
8
9/**
10 * @Serializer\Discriminator(field = "type", groups={"foo"}, map = {
11 *    "car": "JMS\Serializer\Tests\Fixtures\DiscriminatorGroup\Car"
12 * })
13 */
14abstract class Vehicle
15{
16    /**
17     * @Serializer\Type("integer")
18     * @Serializer\Groups({"foo"})
19     */
20    public $km;
21
22    public function __construct($km)
23    {
24        $this->km = (int) $km;
25    }
26}
27