Total Complexity | 5 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 80% |
Changes | 0 |
1 | <?php |
||
13 | final class SchedulableEvent implements Occurrable |
||
14 | { |
||
15 | /** |
||
16 | * @var EventInterface |
||
17 | */ |
||
18 | protected $event; |
||
19 | |||
20 | /** |
||
21 | * @var TemporalExpressionInterface |
||
22 | */ |
||
23 | protected $temporalExpression; |
||
24 | |||
25 | /** |
||
26 | * @param EventInterface $event |
||
27 | * @param TemporalExpressionInterface $temporalExpression |
||
28 | */ |
||
29 | 13 | public function __construct(EventInterface $event, TemporalExpressionInterface $temporalExpression) |
|
30 | { |
||
31 | 13 | $this->event = $event; |
|
32 | 13 | $this->temporalExpression = $temporalExpression; |
|
33 | 13 | } |
|
34 | |||
35 | /** |
||
36 | * @return EventInterface |
||
37 | */ |
||
38 | 7 | public function event(): EventInterface |
|
39 | { |
||
40 | 7 | return $this->event; |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * @return TemporalExpressionInterface |
||
45 | */ |
||
46 | public function temporalExpression(): TemporalExpressionInterface |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | 11 | public function isOccurring(EventInterface $event, DateTimeInterface $date): bool |
|
57 | } |
||
58 | } |
||
59 |