original_string: public function has($class, $entityId)
      {
          try {
              $em = $this->entityManager->getDoctrineEntityManager();
              $data = $em->getRepository($class)->findOneBy(array(
                  'id' => $entityId,
              ));
               
              if ($data !== null) {
                  return true;
              }
               
              return false;
          } catch (\Exception $e) {
              throw new Exception('Cannot check if there is an access entitiy for the given class "' . $class . '" and id "' . $entityId . '".', 0, $e);
          }
      }
code: public function has($class, $entityId)
      {
          try {
              $em = $this->entityManager->getDoctrineEntityManager();
              $data = $em->getRepository($class)->findOneBy(array(
                  'id' => $entityId,
              ));
               
              if ($data !== null) {
                  return true;
              }
               
              return false;
          } catch (\Exception $e) {
              throw new Exception('Cannot check if there is an access entitiy for the given class "' . $class . '" and id "' . $entityId . '".', 0, $e);
          }
      }
code_tokens: public function has ( $ class , $ entityId ) { try { $ em = $ this -> entityManager -> getDoctrineEntityManager ( ) ; $ data = $ em -> getRepository ( $ class ) -> findOneBy ( array ( 'id' => $ entityId , ) ) ; if ( $ data !== null ) { return true ; } return false ; } catch ( \ Exception $ e ) { throw new Exception ( 'Cannot check if there is an access entitiy for the given class "' . $ class . '" and id "' . $ entityId . '".' , 0 , $ e ) ; } }
docstring: Returns true if the given entity id exists
  
  @param string $class
  @param integer $entityId
  @return boolean
  
  @throws \Zepi\Core\AccessControl\Exception Cannot check if there is an access entitiy for the given class "{class}" and id "{entityId}".
docstring_tokens: Returns true if the given entity id exists