1 | <?php |
||
11 | class ShipmentEvent implements \JsonSerializable |
||
12 | { |
||
13 | /** |
||
14 | * @var \DateTime |
||
15 | * @deprecated |
||
16 | */ |
||
17 | protected $date; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $description; |
||
23 | |||
24 | /** |
||
25 | * @var string|LocationInterface |
||
26 | */ |
||
27 | protected $location; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $status; |
||
33 | |||
34 | /** |
||
35 | * @var \DateTime |
||
36 | */ |
||
37 | protected $time; |
||
38 | |||
39 | public function __construct(\DateTime $time = null, $description = null, $location = null) |
||
45 | |||
46 | /** |
||
47 | * @return \DateTime |
||
48 | * @deprecated |
||
49 | */ |
||
50 | public function getDate() |
||
54 | |||
55 | /** |
||
56 | * @param \DateTime $date |
||
57 | * @return ShipmentEvent |
||
58 | * @deprecated |
||
59 | */ |
||
60 | public function setDate($date) |
||
68 | |||
69 | /** |
||
70 | * @return \DateTime |
||
71 | */ |
||
72 | public function getTime() |
||
76 | |||
77 | /** |
||
78 | * @param \DateTime $time |
||
79 | * @return ShipmentEvent |
||
80 | */ |
||
81 | public function setTime($time) |
||
89 | |||
90 | /** |
||
91 | * @return string |
||
92 | */ |
||
93 | public function getDescription() |
||
97 | |||
98 | /** |
||
99 | * @param string $description |
||
100 | * @return ShipmentEvent |
||
101 | */ |
||
102 | public function setDescription($description) |
||
107 | |||
108 | /** |
||
109 | * @return string|LocationInterface |
||
110 | */ |
||
111 | public function getLocation() |
||
115 | |||
116 | /** |
||
117 | * @param string|LocationInterface $location |
||
118 | * @return ShipmentEvent |
||
119 | */ |
||
120 | public function setLocation($location) |
||
125 | |||
126 | /** |
||
127 | * @return string |
||
128 | */ |
||
129 | public function getStatus() |
||
133 | |||
134 | /** |
||
135 | * @param string $status |
||
136 | * @return ShipmentEvent |
||
137 | */ |
||
138 | public function setStatus($status) |
||
143 | |||
144 | /** |
||
145 | * Creates an event from an array |
||
146 | * @param array $data |
||
147 | * @return static |
||
148 | */ |
||
149 | public static function fromArray($data) |
||
159 | |||
160 | /** |
||
161 | * Converts the event to array |
||
162 | * @return array |
||
163 | */ |
||
164 | public function toArray() |
||
179 | |||
180 | /** |
||
181 | * {@inheritdoc} |
||
182 | */ |
||
183 | public function jsonSerialize() |
||
187 | } |
||
188 |
It seems like you allow that null is being passed for a parameter, however the function which is called does not seem to accept null.
We recommend to add an additional type check (or disallow null for the parameter):