original_string: protected function _executeTransaction(callable $worker, $atomic = true)
      {
          if ($atomic) {
              return $this->getConnection()->transactional(function () use ($worker) {
                  return $worker();
              });
          }
  
          return $worker();
      }
code: protected function _executeTransaction(callable $worker, $atomic = true)
      {
          if ($atomic) {
              return $this->getConnection()->transactional(function () use ($worker) {
                  return $worker();
              });
          }
  
          return $worker();
      }
code_tokens: protected function _executeTransaction ( callable $ worker , $ atomic = true ) { if ( $ atomic ) { return $ this -> getConnection ( ) -> transactional ( function ( ) use ( $ worker ) { return $ worker ( ) ; } ) ; } return $ worker ( ) ; }
docstring: Handles the logic executing of a worker inside a transaction.
  
  @param callable $worker The worker that will run inside the transaction.
  @param bool $atomic Whether to execute the worker inside a database transaction.
  @return mixed
docstring_tokens: Handles the logic executing of a worker inside a transaction .