1 | <?php |
||
8 | class DateTime extends \DateTime |
||
9 | { |
||
10 | /** |
||
11 | * Support timestamp and available date format |
||
12 | * @param string $time |
||
13 | * @param \DateTimeZone $timezone |
||
|
|||
14 | * @link http://php.net/manual/en/datetime.construct.php |
||
15 | */ |
||
16 | public function __construct($time = 'now', \DateTimeZone $timezone = null) |
||
25 | |||
26 | /** |
||
27 | * Calculates a difference between two dates |
||
28 | * @see http://www.php.net/manual/en/datetime.diff.php |
||
29 | * @param integer|string|\DateTimeInterface $datetime1 |
||
30 | * @param integer|string|\DateTimeInterface $datetime2 |
||
31 | * @param boolean $absolute |
||
32 | * @return string Something like this: 1 year. 2 mon. 6 day. 4 hours. 21 min. 10 sec. |
||
33 | */ |
||
34 | public static function diffAsText($datetime1, $datetime2, $absolute = false) |
||
54 | } |
||
55 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.