1 | <?php declare(strict_types=1); |
||
16 | class Dependency |
||
17 | { |
||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | private $id; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $rawVersion; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $currentVersion; |
||
32 | |||
33 | /** |
||
34 | * @var \DateTime |
||
35 | */ |
||
36 | private $createdAt; |
||
37 | |||
38 | /** |
||
39 | * @var \DateTime |
||
40 | */ |
||
41 | private $updatedAt; |
||
42 | |||
43 | /** |
||
44 | * @var Project |
||
45 | */ |
||
46 | private $project; |
||
47 | |||
48 | /** |
||
49 | * @var Package |
||
50 | */ |
||
51 | private $package; |
||
52 | |||
53 | /** |
||
54 | * Get id. |
||
55 | * |
||
56 | * @return int |
||
57 | */ |
||
58 | public function getId(): int |
||
62 | |||
63 | /** |
||
64 | * Set rawVersion. |
||
65 | * |
||
66 | * @param string $rawVersion |
||
67 | */ |
||
68 | public function setRawVersion(string $rawVersion) |
||
72 | |||
73 | /** |
||
74 | * Get rawVersion. |
||
75 | * |
||
76 | * @return string |
||
77 | */ |
||
78 | public function getRawVersion(): string |
||
82 | |||
83 | /** |
||
84 | * Set currentVersion. |
||
85 | * |
||
86 | * @param string $currentVersion |
||
87 | */ |
||
88 | public function setCurrentVersion(string $currentVersion) |
||
92 | |||
93 | /** |
||
94 | * Get currentVersion. |
||
95 | * |
||
96 | * @return string |
||
97 | */ |
||
98 | public function getCurrentVersion(): string |
||
102 | |||
103 | /** |
||
104 | * Set project. |
||
105 | * |
||
106 | * @param Project $project |
||
107 | */ |
||
108 | public function setProject(Project $project = null) |
||
112 | |||
113 | /** |
||
114 | * Get project. |
||
115 | * |
||
116 | * @return Project |
||
117 | */ |
||
118 | public function getProject(): ?Project |
||
122 | |||
123 | /** |
||
124 | * Set package. |
||
125 | * |
||
126 | * @param Package $package |
||
127 | */ |
||
128 | public function setPackage(Package $package = null) |
||
132 | |||
133 | /** |
||
134 | * Get package. |
||
135 | * |
||
136 | * @return Package |
||
137 | */ |
||
138 | public function getPackage(): ?Package |
||
142 | |||
143 | /** |
||
144 | * Get status. |
||
145 | * |
||
146 | * @return string |
||
147 | */ |
||
148 | public function getStatus(): string |
||
160 | |||
161 | /** |
||
162 | * Set createdAt. |
||
163 | * |
||
164 | * @param \DateTimeInterface $createdAt |
||
165 | */ |
||
166 | public function setCreatedAt(\DateTimeInterface $createdAt) |
||
170 | |||
171 | /** |
||
172 | * Get createdAt. |
||
173 | * |
||
174 | * @return \DateTimeInterface |
||
175 | */ |
||
176 | public function getCreatedAt(): \DateTimeInterface |
||
180 | |||
181 | /** |
||
182 | * Set updatedAt. |
||
183 | * |
||
184 | * @param \DateTimeInterface $updatedAt |
||
185 | */ |
||
186 | public function setUpdatedAt(\DateTimeInterface $updatedAt) |
||
190 | |||
191 | /** |
||
192 | * Get updatedAt. |
||
193 | * |
||
194 | * @return \DateTimeInterface |
||
195 | */ |
||
196 | public function getUpdatedAt(): \DateTimeInterface |
||
200 | } |
||
201 |
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.