src/Observing/ObservedFactory.php
private function checkObservedClassName(string $observedClassName)
    {
        if (!\class_exists($observedClassName)) {
            throw new \RuntimeException('Missing observed class '.$observedClassName);
        }

        $interfacesList = \class_implements($observedClassName);

        if (!isset($interfacesList['Teknoo\States\LifeCycle\Observing\ObservedInterface'])) {
            throw new \RuntimeException('The observed class does not implement the ObservedFactoryInterface');
        }

        $this->observedClassName = $observedClassName;

        return $this;
    }
private function checkObservedClassName(string $observedClassName)
    {
        if (!\class_exists($observedClassName)) {
            throw new \RuntimeException('Missing observed class '.$observedClassName);
        }

        $interfacesList = \class_implements($observedClassName);

        if (!isset($interfacesList['Teknoo\States\LifeCycle\Observing\ObservedInterface'])) {
            throw new \RuntimeException('The observed class does not implement the ObservedFactoryInterface');
        }

        $this->observedClassName = $observedClassName;

        return $this;
    }
@param string $observedClassName

@return $this