1<?php
2
3declare(strict_types=1);
4
5namespace JMS\Serializer\Tests\Fixtures;
6
7use JMS\Serializer\Annotation\Groups;
8use JMS\Serializer\Annotation\SerializedName;
9use JMS\Serializer\Annotation\Since;
10use JMS\Serializer\Annotation\Until;
11use JMS\Serializer\Annotation\VirtualProperty;
12
13/**
14 * dummy comment
15 *
16 * @VirtualProperty(
17 *     "classlow",
18 *     exp="object.getVirtualValue(1)",
19 *     options={@Until("8")}
20 * )
21 * @VirtualProperty(
22 *     "classhigh",
23 *     exp="object.getVirtualValue(8)",
24 *     options={@Since("6")}
25 * )
26 */
27class ObjectWithVersionedVirtualProperties
28{
29    /**
30     * @Groups({"versions"})
31     * @VirtualProperty
32     * @SerializedName("low")
33     * @Until("8")
34     */
35    public function getVirualLowValue()
36    {
37        return 1;
38    }
39
40    /**
41     * @Groups({"versions"})
42     * @VirtualProperty
43     * @SerializedName("high")
44     * @Since("6")
45     */
46    public function getVirualHighValue()
47    {
48        return 8;
49    }
50
51    /**
52     * @param int $int
53     *
54     * @return int
55     */
56    public function getVirtualValue($int)
57    {
58        return $int;
59    }
60}
61