<commit_before><?php
/**
 * <NAME>. Copyright 2013-2014 Silktide Ltd. All Rights Reserved.
 */
namespace Silktide\Reposition\QueryInterpreter;

/**
 *
 */
class CompiledQuery 
{

    /**
     * @var string
     */
    protected $table;

    /**
     * @var string
     */
    protected $method;

    /**
     * @var array
     */
    protected $arguments = [];

    /**
     * @var array
     */
    protected $calls = [];

    public function __construct($table, $method, $arguments, $calls = [])
    {
        $this->setTable($table);
        $this->setMethod($method);
        $this->setArguments($arguments);
        $this->setCalls($calls);
    }

    /**
     * @param array $arguments
     */
    protected function setArguments(array $arguments)
    {
        $this->arguments = $arguments;
    }

    /**
     * @return array
     */
    public function getArguments()
    {
        return $this->arguments;
    }

    /**
     * @param array $calls
     */
    protected function setCalls(array $calls)
    {
        $this->calls = [];
        foreach ($calls as $call) {
            $this->addCall($call);
        }
    }

    /**
     * @param array $call
     * @throws \InvalidArgumentException
     */
    protected function addCall(array $call)
    {
        if (count($call) != 2 || empty($call[0]) || empty($call[1])) {
            throw new \InvalidArgumentException("Cannot set query call. Invalid format");
        }

        $this->calls[] = $call;
    }

    /**
     * @return array
     */
    public function getCalls()
    {
        return $this->calls;
    }

    /**
     * @param string $method
     */
    protected function setMethod($method)
    {
        $this->method = $method;
    }

    /**
     * @return string
     */
    public function getMethod()
    {
        return $this->method;
    }

    /**
     * @param string $table
     */
    protected function setTable($table)
    {
        $this->table = $table;
    }

    /**
     * @return string
     */
    public function getTable()
    {
        return $this->table;
    }



} <commit_msg>make CompiledQuery require less information to construct and add "query" as a property<commit_after><?php
/**
 * <NAME>. Copyright 2013-2014 Silktide Ltd. All Rights Reserved.
 */
namespace Silktide\Reposition\QueryInterpreter;

/**
 *
 */
class CompiledQuery 
{

    /**
     * @var string
     */
    protected $table;

    /**
     * @var string
     */
    protected $method;

    /**
     * @var array
     */
    protected $arguments = [];

    /**
     * @var array
     */
    protected $calls = [];

    /**
     * @var string
     */
    protected $query = "";

    public function __construct($table = "", $method = "", $arguments = [], $calls = [])
    {
        $this->setTable($table);
        $this->setMethod($method);
        $this->setArguments($arguments);
        $this->setCalls($calls);
    }

    /**
     * @param array $arguments
     */
    protected function setArguments(array $arguments)
    {
        $this->arguments = $arguments;
    }

    /**
     * @return array
     */
    public function getArguments()
    {
        return $this->arguments;
    }

    /**
     * @param array $calls
     */
    protected function setCalls(array $calls)
    {
        $this->calls = [];
        foreach ($calls as $call) {
            $this->addCall($call);
        }
    }

    /**
     * @param array $call
     * @throws \InvalidArgumentException
     */
    protected function addCall(array $call)
    {
        if (count($call) != 2 || empty($call[0]) || empty($call[1])) {
            throw new \InvalidArgumentException("Cannot set query call. Invalid format");
        }

        $this->calls[] = $call;
    }

    /**
     * @return array
     */
    public function getCalls()
    {
        return $this->calls;
    }

    /**
     * @param string $method
     */
    protected function setMethod($method)
    {
        $this->method = $method;
    }

    /**
     * @return string
     */
    public function getMethod()
    {
        return $this->method;
    }

    /**
     * @param string $table
     */
    protected function setTable($table)
    {
        $this->table = $table;
    }

    /**
     * @return string
     */
    public function getTable()
    {
        return $this->table;
    }

    /**
     * @param string $query
     */
    public function setQuery($query)
    {
        $this->query = $query;
    }

    /**
     * @return string
     */
    public function getQuery()
    {
        return $this->query;
    }

}
{'fraction_non_alphanumeric': 0.15103024989039895, 'fraction_numerical': 0.004822446295484437, 'mean_word_length': 1.6841176470588235, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 35, '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': '3090705', 'n_tokens_mistral': 1392, 'n_tokens_neox': 1356, 'n_words': 289}