1 | <?php |
||
7 | class DateTime extends Column |
||
8 | { |
||
9 | |||
10 | /** |
||
11 | * Datetime format. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $format; |
||
16 | |||
17 | /** |
||
18 | * Datetime timezone. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $timezone; |
||
23 | |||
24 | /** |
||
25 | * @return string |
||
26 | */ |
||
27 | public function getFormat() |
||
35 | |||
36 | /** |
||
37 | * @param string $format |
||
38 | * |
||
39 | * @return DateTime |
||
40 | */ |
||
41 | public function setFormat(string $format) |
||
47 | |||
48 | /** |
||
49 | * @return string |
||
50 | */ |
||
51 | public function getTimezone() |
||
59 | |||
60 | /** |
||
61 | * @param string $timezone |
||
62 | * |
||
63 | * @return DateTime |
||
64 | */ |
||
65 | public function setTimezone($timezone) |
||
71 | |||
72 | public function getValue() |
||
78 | |||
79 | protected function getFormatValue($date) |
||
100 | } |
||
101 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: