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