1 | <?php |
||
17 | class Vote |
||
18 | { |
||
19 | /** |
||
20 | * @var int |
||
21 | * |
||
22 | * @ORM\Column(name="id", type="integer") |
||
23 | * @ORM\Id |
||
24 | * @ORM\GeneratedValue(strategy="AUTO") |
||
25 | */ |
||
26 | private $id; |
||
27 | |||
28 | /** |
||
29 | * @var \Poll |
||
30 | * |
||
31 | * @ORM\ManyToOne(targetEntity="Poll", inversedBy="votes") |
||
32 | * @ORM\JoinColumn(name="poll_id", referencedColumnName="id") |
||
33 | */ |
||
34 | private $poll; |
||
35 | |||
36 | /** |
||
37 | * @var \User |
||
38 | * |
||
39 | * @ORM\ManyToOne(targetEntity="User", inversedBy="votes") |
||
40 | * @ORM\JoinColumn(name="caster_id", referencedColumnName="id") |
||
41 | */ |
||
42 | private $caster; |
||
43 | |||
44 | /** |
||
45 | * @var \DateTime |
||
46 | * |
||
47 | * @ORM\Column(name="time", type="datetime") |
||
48 | */ |
||
49 | private $time; |
||
50 | |||
51 | /** |
||
52 | * @var \Choice |
||
53 | * |
||
54 | * @ORM\ManyToOne(targetEntity="Choice", inversedBy="votes") |
||
55 | * @ORM\JoinColumn(name="choice_id", referencedColumnName="id") |
||
56 | */ |
||
57 | private $choice; |
||
58 | |||
59 | /** |
||
60 | * Get id |
||
61 | * |
||
62 | * @return integer |
||
63 | */ |
||
64 | public function getId(): int |
||
68 | |||
69 | /** |
||
70 | * Set time |
||
71 | * |
||
72 | * @param \DateTime $time |
||
73 | * |
||
74 | * @return Vote |
||
75 | */ |
||
76 | public function setTime(\DateTimeInterface $time) |
||
82 | |||
83 | /** |
||
84 | * Get time |
||
85 | * |
||
86 | * @return \DateTime |
||
87 | */ |
||
88 | public function getTime(): DateTime |
||
92 | |||
93 | /** |
||
94 | * Set poll |
||
95 | * |
||
96 | * @param \AppBundle\Entity\Poll $poll |
||
97 | * |
||
98 | * @return Vote |
||
99 | */ |
||
100 | public function setPoll(Poll $poll = null) |
||
106 | |||
107 | /** |
||
108 | * Get poll |
||
109 | * |
||
110 | * @return \AppBundle\Entity\Poll |
||
111 | */ |
||
112 | public function getPoll(): Poll |
||
116 | |||
117 | /** |
||
118 | * Set caster |
||
119 | * |
||
120 | * @param \AppBundle\Entity\User $caster |
||
121 | * |
||
122 | * @return Vote |
||
123 | */ |
||
124 | public function setCaster(User $caster = null) |
||
130 | |||
131 | /** |
||
132 | * Get caster |
||
133 | * |
||
134 | * @return \AppBundle\Entity\User |
||
135 | */ |
||
136 | public function getCaster(): User |
||
140 | |||
141 | /** |
||
142 | * Set choice |
||
143 | * |
||
144 | * @param \AppBundle\Entity\Choice $choice |
||
145 | * |
||
146 | * @return Vote |
||
147 | */ |
||
148 | public function setChoice(Choice $choice = null) |
||
154 | |||
155 | /** |
||
156 | * Get choice |
||
157 | * |
||
158 | * @return \AppBundle\Entity\Choice |
||
159 | */ |
||
160 | public function getChoice(): Choice |
||
164 | } |
||
165 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.