original_string: public function transactional(callable $fn)
      {
          $pdo = $this->getPdo();
          $pdo->beginTransaction();
          try {
              call_user_func($fn);
              $pdo->commit();
          } catch (\Exception $e) {
              $pdo->rollBack();
              throw $e;
          }
      }
code: public function transactional(callable $fn)
      {
          $pdo = $this->getPdo();
          $pdo->beginTransaction();
          try {
              call_user_func($fn);
              $pdo->commit();
          } catch (\Exception $e) {
              $pdo->rollBack();
              throw $e;
          }
      }
code_tokens: public function transactional ( callable $ fn ) { $ pdo = $ this -> getPdo ( ) ; $ pdo -> beginTransaction ( ) ; try { call_user_func ( $ fn ) ; $ pdo -> commit ( ) ; } catch ( \ Exception $ e ) { $ pdo -> rollBack ( ) ; throw $ e ; } }
docstring: Execute a function in a transaction
  
  @param callable $fn
  @throws \Exception
docstring_tokens: Execute a function in a transaction