original_string: protected function createPdoStatement($query, $pdo = null)
      {
          if (is_null($pdo)) {
              $pdo = $this->getPdo();
          }
  
          $grammar = $this->getQueryGrammar();
  
          $query = preg_replace_callback('#\{(.*?)\}#', function ($matches) use ($grammar)
          {
              $value = $matches[1];
  
              return $grammar->wrap($value);
  
          }, $query);
  
          return $pdo->prepare($query);
      }
code: protected function createPdoStatement($query, $pdo = null)
      {
          if (is_null($pdo)) {
              $pdo = $this->getPdo();
          }
  
          $grammar = $this->getQueryGrammar();
  
          $query = preg_replace_callback('#\{(.*?)\}#', function ($matches) use ($grammar)
          {
              $value = $matches[1];
  
              return $grammar->wrap($value);
  
          }, $query);
  
          return $pdo->prepare($query);
      }
code_tokens: protected function createPdoStatement ( $ query , $ pdo = null ) { if ( is_null ( $ pdo ) ) { $ pdo = $ this -> getPdo ( ) ; } $ grammar = $ this -> getQueryGrammar ( ) ; $ query = preg_replace_callback ( '#\{(.*?)\}#' , function ( $ matches ) use ( $ grammar ) { $ value = $ matches [ 1 ] ; return $ grammar -> wrap ( $ value ) ; } , $ query ) ; return $ pdo -> prepare ( $ query ) ; }
docstring: Parse and wrap the variables from query, then return a propared PDO Statement instance.
  
  @param  string  $query
  @param  \PDO  $pdo
  @return \PDOStatement
docstring_tokens: Parse and wrap the variables from query then return a propared PDO Statement instance .