1<?php
2
3declare(strict_types=1);
4
5namespace JMS\Serializer\Tests\Fixtures;
6
7use JMS\Serializer\Annotation\Type;
8
9class CircularReferenceChild
10{
11    /** @Type("string") */
12    private $name;
13
14    /** @Type("JMS\Serializer\Tests\Fixtures\CircularReferenceParent") */
15    private $parent;
16
17    public function __construct($name, CircularReferenceParent $parent)
18    {
19        $this->name = $name;
20        $this->parent = $parent;
21    }
22
23    public function getName()
24    {
25        return $this->name;
26    }
27
28    public function getParent()
29    {
30        return $this->parent;
31    }
32
33    public function setParent(CircularReferenceParent $parent)
34    {
35        $this->parent = $parent;
36    }
37}
38