public function getEvents(array $tags = []): array
    {
        if ($tags === []) {
            return $this->events;
        }

        return array_filter($this->events, function (ScheduleEvent $event) use ($tags) {
            return array_intersect($event->getTags(), $tags) === $tags;
        });
    }