original_string: public function insert($table, array $data)
      {
          $nameFields = join(',', array_keys($data));
          $preparedValues = $this->prepareValues($data);
          $keyValues = join(",", array_keys($preparedValues));
          $queryString = "INSERT INTO {$table} ({$nameFields}) VALUES ({$keyValues});";
  
          $this->query($queryString, $preparedValues);
  
          return $this->getInsertId();
      }
code: public function insert($table, array $data)
      {
          $nameFields = join(',', array_keys($data));
          $preparedValues = $this->prepareValues($data);
          $keyValues = join(",", array_keys($preparedValues));
          $queryString = "INSERT INTO {$table} ({$nameFields}) VALUES ({$keyValues});";
  
          $this->query($queryString, $preparedValues);
  
          return $this->getInsertId();
      }
code_tokens: public function insert ( $ table , array $ data ) { $ nameFields = join ( ',' , array_keys ( $ data ) ) ; $ preparedValues = $ this -> prepareValues ( $ data ) ; $ keyValues = join ( "," , array_keys ( $ preparedValues ) ) ; $ queryString = "INSERT INTO {$table} ({$nameFields}) VALUES ({$keyValues});" ; $ this -> query ( $ queryString , $ preparedValues ) ; return $ this -> getInsertId ( ) ; }
docstring: Perform a INSERT statement
  
  @param string $table
  @param array $data
  
  @return int last inserted id
docstring_tokens: Perform a INSERT statement