Metabor\Statemachine\Util\StateCollectionMerger::addState PHP Метод

addState() защищенный Метод

protected addState ( MetaborStd\Statemachine\StateInterface $state )
$state MetaborStd\Statemachine\StateInterface
    protected function addState(StateInterface $state)
    {
        if ($this->targetCollection instanceof StateCollection) {
            $this->targetCollection->addState($state);
        } else {
            throw new \InvalidArgumentException('TargetCollection has to be a StateCollection. Overwrite this method to implement a different type!');
        }
    }