final protected static function occurred(array $payload, ?TimeProvider $timeProvider = null)
    {
        $timeProvider = $timeProvider ?? new SystemTimeProvider();

        return new static($payload, $timeProvider->getCurrentTime());
    }
final protected static function occurred(array $payload, ?TimeProvider $timeProvider = null)
    {
        $timeProvider = $timeProvider ?? new SystemTimeProvider();

        return new static($payload, $timeProvider->getCurrentTime());
    }
final protected static function occurred ( array $ payload , ? TimeProvider $ timeProvider = null ) { $ timeProvider = $ timeProvider ?? new SystemTimeProvider ( ) ; return new static ( $ payload , $ timeProvider -> getCurrentTime ( ) ) ; }
Instantiate new event.

@param array<string, mixed> $payload
@param TimeProvider         $timeProvider

@return mixed|self
Instantiate new event .