original_string: public function merge($query, array $data)
      {
          $expression = "/(\\?)(?=(?:[^']|'[^']*')*$)/";
          $callback   = function () use (&$data) {
              if (!$data) {
                  return '?';
              }
  
              return $this->quote(array_shift($data));
          };
  
          return preg_replace_callback($expression, $callback, $query);
      }
code: public function merge($query, array $data)
      {
          $expression = "/(\\?)(?=(?:[^']|'[^']*')*$)/";
          $callback   = function () use (&$data) {
              if (!$data) {
                  return '?';
              }
  
              return $this->quote(array_shift($data));
          };
  
          return preg_replace_callback($expression, $callback, $query);
      }
code_tokens: public function merge ( $ query , array $ data ) { $ expression = "/(\\?)(?=(?:[^']|'[^']*')*$)/" ; $ callback = function ( ) use ( & $ data ) { if ( ! $ data ) { return '?' ; } return $ this -> quote ( array_shift ( $ data ) ) ; } ; return preg_replace_callback ( $ expression , $ callback , $ query ) ; }
docstring: Merge data into an SQL query with placeholders
  
  @param string $query
  @param array  $data
  @return string
docstring_tokens: Merge data into an SQL query with placeholders