1 | <?php |
||
20 | class Leg |
||
21 | { |
||
22 | /** |
||
23 | * @var string |
||
24 | */ |
||
25 | private $loadLocation; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $unloadLocation; |
||
31 | |||
32 | /** |
||
33 | * @var \DateTime |
||
34 | */ |
||
35 | private $loadTime; |
||
36 | |||
37 | /** |
||
38 | * @var \DateTime |
||
39 | */ |
||
40 | private $unloadTime; |
||
41 | |||
42 | /** |
||
43 | * @param string $aLoadLocation |
||
44 | * @param string $anUnloadLocation |
||
45 | * @param \DateTimeImmutable $aLoadTime |
||
46 | * @param \DateTimeImmutable $anUnloadTime |
||
47 | */ |
||
48 | public function __construct(string $aLoadLocation, |
||
49 | string $anUnloadLocation, |
||
50 | \DateTimeImmutable $aLoadTime, |
||
51 | \DateTimeImmutable $anUnloadTime) |
||
52 | { |
||
53 | $this->loadLocation = $aLoadLocation; |
||
54 | $this->unloadLocation = $anUnloadLocation; |
||
55 | $this->loadTime = $aLoadTime; |
||
|
|||
56 | $this->unloadTime = $anUnloadTime; |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * @return string |
||
61 | */ |
||
62 | public function loadLocation() |
||
66 | |||
67 | /** |
||
68 | * @return string |
||
69 | */ |
||
70 | public function unloadLocation() |
||
74 | |||
75 | /** |
||
76 | * @return \DateTimeImmutable |
||
77 | */ |
||
78 | public function loadTime() |
||
82 | |||
83 | /** |
||
84 | * @return \DateTimeImmutable |
||
85 | */ |
||
86 | public function unloadTime() |
||
90 | |||
91 | /** |
||
92 | * @param Leg $other |
||
93 | * @return bool |
||
94 | */ |
||
95 | public function sameValueAs(Leg $other) |
||
115 | |||
116 | } |
||
117 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..