original_string: public function createUseCaseDiagrammFor($entity)
      {
          if (is_int($entity)) {
              $entity = $this->getById($entity);
          } elseif (!$entity instanceof UseCaseEntity) {
              throw new \InvalidArgumentException('Unkown entity data type "' . gettype($entity) . '"');
          }
  
          $diagrammService = $this->getDiagrammService();
  
          return $diagrammService->createDiagrammFromNodes(array($entity), UseCaseDiagramm::TYPE_USE_CASE);
      }
code: public function createUseCaseDiagrammFor($entity)
      {
          if (is_int($entity)) {
              $entity = $this->getById($entity);
          } elseif (!$entity instanceof UseCaseEntity) {
              throw new \InvalidArgumentException('Unkown entity data type "' . gettype($entity) . '"');
          }
  
          $diagrammService = $this->getDiagrammService();
  
          return $diagrammService->createDiagrammFromNodes(array($entity), UseCaseDiagramm::TYPE_USE_CASE);
      }
code_tokens: public function createUseCaseDiagrammFor ( $ entity ) { if ( is_int ( $ entity ) ) { $ entity = $ this -> getById ( $ entity ) ; } elseif ( ! $ entity instanceof UseCaseEntity ) { throw new \ InvalidArgumentException ( 'Unkown entity data type "' . gettype ( $ entity ) . '"' ) ; } $ diagrammService = $ this -> getDiagrammService ( ) ; return $ diagrammService -> createDiagrammFromNodes ( array ( $ entity ) , UseCaseDiagramm :: TYPE_USE_CASE ) ; }
docstring: Creates an use case diagramm from an single entity
  
  @param int|\DlcUseCase\Entity\UseCase $entity
  @return UseCaseDiagramm
docstring_tokens: Creates an use case diagramm from an single entity