| 1 | <?php |
||
| 3 | trait Time { |
||
| 4 | |||
| 5 | /** |
||
| 6 | * Convert timestamp to HTTP-date (RFC2616) |
||
| 7 | * |
||
| 8 | * For use in "Last-Modified" headers. |
||
| 9 | * |
||
| 10 | * @param string $timestamp |
||
| 11 | * @return string |
||
|
|
|||
| 12 | */ |
||
| 13 | public static function timestamp_to_http_date($timestamp) { |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Convert timestamp to "x unit" |
||
| 20 | * |
||
| 21 | * @param string $timestamp |
||
| 22 | * @return string |
||
| 23 | */ |
||
| 24 | public static function time_elapsed($timestamp) { |
||
| 49 | |||
| 50 | } |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.