1 | <?php |
||
17 | class DateTime extends AbstractFormatterProvider |
||
18 | { |
||
19 | 1 | public function asDate($value, $format = 'Y-m-d') |
|
23 | |||
24 | 1 | public function asTime($value, $format = 'H:i:s') |
|
28 | |||
29 | 1 | public function asDateTime($value, $format = 'Y-m-d H:i:s') |
|
33 | |||
34 | /** |
||
35 | * Take in a number of seconds and display that as a human readable amount of time |
||
36 | * |
||
37 | * @param int $value |
||
38 | * @return string |
||
39 | */ |
||
40 | public function asHuman($value) |
||
44 | |||
45 | 3 | private function output($value, $format) |
|
51 | |||
52 | 3 | private function normaliseValue($value) |
|
61 | |||
62 | /** |
||
63 | * Get an instance of the carbon datetime handler |
||
64 | * |
||
65 | * @return Carbon |
||
66 | */ |
||
67 | 3 | private function getCarbon() |
|
76 | } |
||
77 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.