private function checkTransitionDuplicates(TransitionChain $transitionChain)
    {
        $states = [];

        /**
         * @var Transition $transition
         */
        foreach ($transitionChain->getTransitions() as $transition) {
            $startingStateName = $transition->getStart()->getName();
            $transitionName = $transition->getName();

            if (isset($states[$startingStateName])) {
                if (isset($states[$startingStateName][$transitionName])) {
                    throw new InconsistentTransitionConfigurationException(
                        $startingStateName,
                        $transitionName
                    );
                }
            } else {
                $states[$startingStateName] = [];
            }

            $states[$startingStateName][$transitionName] = true;
        }

        return $this;
    }