| Total Complexity | 8 |
| Total Lines | 74 |
| Duplicated Lines | 0 % |
| Coverage | 90% |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class CalendarEvent extends BaseEvent |
||
|
|
|||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var DateTimeInterface |
||
| 15 | */ |
||
| 16 | protected $start; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var DateTimeInterface |
||
| 20 | */ |
||
| 21 | protected $end; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var array |
||
| 25 | */ |
||
| 26 | protected $filters; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var Event[] |
||
| 30 | */ |
||
| 31 | protected $events = []; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var string|null |
||
| 35 | */ |
||
| 36 | private $timezone; |
||
| 37 | |||
| 38 | 4 | public function __construct( |
|
| 48 | 4 | } |
|
| 49 | |||
| 50 | 1 | public function getStart(): DateTimeInterface |
|
| 51 | { |
||
| 52 | 1 | return $this->start; |
|
| 53 | } |
||
| 54 | |||
| 55 | 1 | public function getEnd(): DateTimeInterface |
|
| 56 | { |
||
| 57 | 1 | return $this->end; |
|
| 58 | } |
||
| 59 | |||
| 60 | 1 | public function getFilters(): array |
|
| 61 | { |
||
| 62 | 1 | return $this->filters; |
|
| 63 | } |
||
| 64 | |||
| 65 | 1 | public function addEvent(Event $event): self |
|
| 66 | { |
||
| 67 | 1 | if (!\in_array($event, $this->events, true)) { |
|
| 68 | 1 | $this->events[] = $event; |
|
| 69 | } |
||
| 70 | |||
| 71 | 1 | return $this; |
|
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return Event[] |
||
| 76 | */ |
||
| 77 | 1 | public function getEvents(): array |
|
| 80 | } |
||
| 81 | |||
| 82 | public function getTimezone(): ?string |
||
| 83 | { |
||
| 85 | } |
||
| 86 | } |
||
| 87 |