/**
  * @param IntrospectedState $introspectedState
  *
  * @return string
  */
 private function getStateShape(IntrospectedState $introspectedState)
 {
     if ($introspectedState->isRoot()) {
         return self::STATE_SHAPE_ROOT;
     }
     if ($introspectedState->isLeaf()) {
         return self::STATE_SHAPE_LEAF;
     }
     return self::STATE_SHAPE_NORMAL;
 }
 /**
  * @param IntrospectedState $introspectedState
  */
 private function guessIsIntrospectedStateLeaf(IntrospectedState $introspectedState)
 {
     $isLeaf = true;
     foreach ($this->introspectedTransitions as $introspectedTransition) {
         if ($introspectedTransition->getFromIntrospectedState()->getKey() === $introspectedState->getKey()) {
             $isLeaf = false;
         }
     }
     if ($isLeaf) {
         $introspectedState->setIsLeaf();
     }
 }