1 | <?php |
||
7 | class DateTime extends Column |
||
8 | { |
||
9 | protected $type = 'datetime'; |
||
10 | |||
11 | /** |
||
12 | * Datetime format. |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $format; |
||
17 | |||
18 | /** |
||
19 | * Datetime timezone. |
||
20 | * |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $timezone; |
||
24 | |||
25 | /** |
||
26 | * @return string |
||
27 | */ |
||
28 | public function getFormat() |
||
36 | |||
37 | /** |
||
38 | * @param string $format |
||
39 | * |
||
40 | * @return DateTime |
||
41 | */ |
||
42 | public function setFormat(string $format) |
||
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | public function getTimezone() |
||
60 | |||
61 | /** |
||
62 | * @param string $timezone |
||
63 | * |
||
64 | * @return DateTime |
||
65 | */ |
||
66 | public function setTimezone($timezone) |
||
72 | |||
73 | public function getValue() |
||
79 | |||
80 | protected function getFormatValue($date) |
||
101 | } |
||
102 |
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: