1 | <?php |
||
17 | class Adventure implements AdventureInterface |
||
18 | { |
||
19 | /** @var int */ |
||
20 | private $id; |
||
21 | |||
22 | /** @var string */ |
||
23 | private $title; |
||
24 | |||
25 | /** @var string */ |
||
26 | private $description; |
||
27 | |||
28 | /** @var int */ |
||
29 | private $rewardPoint; |
||
30 | |||
31 | /** @var bool */ |
||
32 | private $isStepLinked; |
||
33 | |||
34 | /** @var Badge */ |
||
35 | private $badge; |
||
36 | |||
37 | /** @var ArrayCollection */ |
||
38 | private $steps; |
||
39 | |||
40 | /** @var ArrayCollection */ |
||
41 | private $tags; |
||
42 | |||
43 | public function __construct() |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | public function getId() |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function setTitle($title) |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function getTitle() |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | public function setDescription($description) |
||
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | public function getDescription() |
||
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | public function setRewardPoint($rewardPoint) |
||
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | */ |
||
105 | public function getRewardPoint() |
||
109 | |||
110 | /** |
||
111 | * {@inheritdoc} |
||
112 | */ |
||
113 | public function setIsStepLinked($isStepLinked) |
||
119 | |||
120 | /** |
||
121 | * {@inheritdoc} |
||
122 | */ |
||
123 | public function isStepLinked() |
||
127 | |||
128 | /** |
||
129 | * {@inheritdoc} |
||
130 | */ |
||
131 | public function setBadge(BadgeInterface $badge) |
||
137 | |||
138 | /** |
||
139 | * {@inheritdoc} |
||
140 | */ |
||
141 | public function getBadge() |
||
145 | |||
146 | /** |
||
147 | * {@inheritdoc} |
||
148 | */ |
||
149 | public function addStep(AdventureStepInterface $step) |
||
156 | |||
157 | /** |
||
158 | * {@inheritdoc} |
||
159 | */ |
||
160 | public function removeStep(AdventureStepInterface $step) |
||
166 | |||
167 | /** |
||
168 | * {@inheritdoc} |
||
169 | */ |
||
170 | public function setSteps($steps) |
||
178 | |||
179 | /** |
||
180 | * {@inheritdoc} |
||
181 | */ |
||
182 | public function getSteps() |
||
186 | |||
187 | /** |
||
188 | * {@inheritdoc} |
||
189 | */ |
||
190 | public function setTags(ArrayCollection $tags) |
||
194 | |||
195 | /** |
||
196 | * {@inheritdoc} |
||
197 | */ |
||
198 | public function getTags() |
||
202 | |||
203 | /** |
||
204 | * {@inheritdoc} |
||
205 | */ |
||
206 | public function addTag(TagInterface $tag) |
||
212 | |||
213 | /** |
||
214 | * @return int |
||
215 | */ |
||
216 | public function countAllNuts() |
||
226 | |||
227 | /** |
||
228 | * @return int |
||
229 | */ |
||
230 | public function countAllBadges() |
||
240 | } |
||
241 | |||
242 |
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.