<commit_before><?php
/**
 * This file belongs to the AnoynmFramework
 *
 * @author vahitserifsaglam <<EMAIL>>
 * @see http://gemframework.com
 *
 * Thanks for using
 */

namespace Anonym\Database\QueryBuilder\Sql\Insert;


use Anonym\Database\QueryBuilder\QueryBuilder;

/**
 * Class MultipileInsert
 * @package Anonym\Database\QueryBuilder\Sql\Insert
 */
class MultipileInsert extends QueryBuilder
{

    /**
     * @var array
     */
    protected $parameters;

    /**
     * create a new instance
     *
     * @param array $patterns
     * @param array $parameters
     * @param $table
     */
    public function __construct($patterns, $parameters, $table){
        $this->pattern = $patterns['multipile'];
        $this->parameters = $parameters;
        $this->table = $table;
    }

    /**
     * build and return query string
     *
     * @return string
     */
    public function buildQuery()
    {
        $builded = '';

        foreach($this->parameters as $value){
            $columns = array_keys($value);

            $parameters = array_fill(0, count($columns), '?');

            $columns = join(',', $columns);
            $parameters = join(',', $parameters);


            $builded .= $this->replacePattern([
                ':from' => $this->table,
                ':clms' => $columns,
                ':values' => $parameters
            ]).';';
        }

        var_dump($builded);
    }


}<commit_msg>made some updates<commit_after><?php
/**
 * This file belongs to the AnoynmFramework
 *
 * @author vahitserifsaglam <<EMAIL>>
 * @see http://gemframework.com
 *
 * Thanks for using
 */

namespace Anonym\Database\QueryBuilder\Sql\Insert;


use Anonym\Database\QueryBuilder\QueryBuilder;

/**
 * Class MultipileInsert
 * @package Anonym\Database\QueryBuilder\Sql\Insert
 */
class MultipileInsert extends QueryBuilder
{


    /**
     * create a new instance
     *
     * @param array $patterns
     * @param array $parameters
     * @param $table
     */
    public function __construct($patterns, $parameters, $table){
        $this->pattern = $patterns['multipile'];
        $this->parameters = $parameters;
        $this->table = $table;
    }

    /**
     * build and return query string
     *
     * @return string
     */
    public function buildQuery()
    {
        $builded = '';

        foreach($this->parameters as $value){
            $columns = array_keys($value);

            $parameters = array_fill(0, count($columns), '?');

            $columns = join(',', $columns);
            $parameters = join(',', $parameters);


            $builded .= $this->replacePattern([
                ':from' => $this->table,
                ':clms' => $columns,
                ':values' => $parameters
            ]).';';
        }

        var_dump($builded);
    }


}
{'fraction_non_alphanumeric': 0.14692280327285664, 'fraction_numerical': 0.000711490572749911, 'mean_word_length': 2.1106194690265485, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '531664', 'n_tokens_mistral': 829, 'n_tokens_neox': 795, 'n_words': 174}