1 | <?php declare(strict_types = 1); |
||
13 | class Parser |
||
14 | { |
||
15 | /** |
||
16 | * @var Normalizer |
||
17 | */ |
||
18 | private $normalizer; |
||
19 | |||
20 | /** |
||
21 | * Creates instance |
||
22 | * |
||
23 | * @param Normalizer $normalizer |
||
24 | */ |
||
25 | public function __construct(Normalizer $normalizer) |
||
29 | |||
30 | /** |
||
31 | * Normalizes any non-strtotime-compatible time string, then validates the interval and returns a DateInterval object. |
||
|
|||
32 | * No leading or trailing data is accepted. |
||
33 | * |
||
34 | * @param string $input |
||
35 | * @return \DateInterval |
||
36 | * @throws FormatException |
||
37 | */ |
||
38 | public function parse(string $input): \DateInterval |
||
51 | } |
||
52 |
Overly long lines are hard to read on any screen. Most code styles therefor impose a maximum limit on the number of characters in a line.