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