code: public function hasTransition(StatusInterface $fromStatus, StatusInterface $toStatus)
      {
          foreach ($this->transitions as $transition) {
              if ($transition->getStatusFrom()->getId() === $fromStatus->getId()
                  && $transition->getStatusTo()->getId() === $toStatus->getId()
              ) {
                  return true;
              }
          }
  
          return false;
      }
docs: @param StatusInterface $fromStatus
  @param StatusInterface $toStatus
  
  @return boolean