private function checkEventClassName(string $eventClassName): Observed
    {
        if (!\class_exists($eventClassName)) {
            throw new \RuntimeException('Missing event class '.$eventClassName);
        }

        $interfacesList = \class_implements($eventClassName);

        if (!isset($interfacesList['Teknoo\States\LifeCycle\Event\EventInterface'])) {
            throw new \RuntimeException('The event class does not implement the EventInterface');
        }

        $this->eventClassName = $eventClassName;

        return $this;
    }
private function checkEventClassName(string $eventClassName): Observed
    {
        if (!\class_exists($eventClassName)) {
            throw new \RuntimeException('Missing event class '.$eventClassName);
        }

        $interfacesList = \class_implements($eventClassName);

        if (!isset($interfacesList['Teknoo\States\LifeCycle\Event\EventInterface'])) {
            throw new \RuntimeException('The event class does not implement the EventInterface');
        }

        $this->eventClassName = $eventClassName;

        return $this;
    }
private function checkEventClassName ( string $ eventClassName ) : Observed { if ( ! \ class_exists ( $ eventClassName ) ) { throw new \ RuntimeException ( 'Missing event class ' . $ eventClassName ) ; } $ interfacesList = \ class_implements ( $ eventClassName ) ; if ( ! isset ( $ interfacesList [ 'Teknoo\States\LifeCycle\Event\EventInterface' ] ) ) { throw new \ RuntimeException ( 'The event class does not implement the EventInterface' ) ; } $ this -> eventClassName = $ eventClassName ; return $ this ; }
To check if the required event class name.

@param string $eventClassName

@return self
To check if the required event class name .