Total Complexity | 6 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Coverage | 15.38% |
Changes | 0 |
1 | <?php |
||
13 | final class Trimester implements TemporalExpressionInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var TrimesterValueObject |
||
17 | */ |
||
18 | protected $trimester; |
||
19 | |||
20 | /** |
||
21 | * @param TrimesterValueObject $trimester |
||
22 | */ |
||
23 | public function __construct(TrimesterValueObject $trimester) |
||
24 | { |
||
25 | $this->trimester = $trimester; |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * @return Trimester |
||
30 | */ |
||
31 | public static function first(): self |
||
32 | { |
||
33 | return new self(TrimesterValueObject::first()); |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @return Trimester |
||
38 | */ |
||
39 | public static function second(): self |
||
40 | { |
||
41 | return new self(TrimesterValueObject::second()); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @return Trimester |
||
46 | */ |
||
47 | public static function third(): self |
||
48 | { |
||
49 | return new self(TrimesterValueObject::third()); |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @return Trimester |
||
54 | */ |
||
55 | public static function fourth(): self |
||
56 | { |
||
57 | return new self(TrimesterValueObject::fourth()); |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | 16 | public function includes(DateTimeInterface $date): bool |
|
66 | } |
||
67 | } |
||
68 |