| Total Complexity | 5 |
| Total Lines | 51 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | final class Duration extends DateInterval |
||
| 28 | { |
||
| 29 | /** |
||
| 30 | * Returns a continuous portion of time between two datepoints expressed as a DateInterval object. |
||
| 31 | * |
||
| 32 | * The duration can be |
||
| 33 | * <ul> |
||
| 34 | * <li>an Period object</li> |
||
| 35 | * <li>a DateInterval object</li> |
||
| 36 | * <li>an integer interpreted as the duration expressed in seconds.</li> |
||
| 37 | * <li>a string parsable by DateInterval::createFromDateString</li> |
||
| 38 | * </ul> |
||
| 39 | * |
||
| 40 | * @param mixed $duration a continuous portion of time |
||
| 41 | */ |
||
| 42 | public static function create($duration): DateInterval |
||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @inheritdoc |
||
| 61 | * |
||
| 62 | * @param mixed $duration a date with relative parts |
||
| 63 | */ |
||
| 64 | public static function createFromDateString($duration): self |
||
| 80 |