Total Complexity | 5 |
Total Lines | 65 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
15 | class CarrierStatusHistoryType |
||
16 | { |
||
17 | /** |
||
18 | * @var carrierStatusType |
||
19 | */ |
||
20 | protected $current = null; |
||
21 | |||
22 | /** |
||
23 | * @var history |
||
24 | */ |
||
25 | protected $history = null; |
||
26 | |||
27 | /** |
||
28 | * Constructor. |
||
29 | * |
||
30 | * @var carrierStatusType |
||
31 | * @var history $history |
||
32 | * |
||
33 | * @param mixed $current |
||
34 | * @param mixed $history |
||
35 | */ |
||
36 | public function __construct($current, $history) |
||
37 | { |
||
38 | $this->current = $current; |
||
|
|||
39 | $this->history = $history; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return carrierStatusType |
||
44 | */ |
||
45 | public function getCurrent() |
||
46 | { |
||
47 | return $this->current; |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * @param carrierStatusType $current |
||
52 | * |
||
53 | * @return $this |
||
54 | */ |
||
55 | public function setCurrent($current) |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @return history |
||
64 | */ |
||
65 | public function getHistory() |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * @param history $history |
||
72 | * |
||
73 | * @return $this |
||
74 | */ |
||
75 | public function setHistory($history) |
||
80 | } |
||
81 | } |
||
82 |
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.