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