<commit_before><?php

namespace Alchemy\expression;
use Exception;


/**
 * Represent an UPDATE statment in SQL
 */
class Update extends Query {
    protected $table;
    protected $values = array();


    /**
     * Set the table into update
     *
     * @param Table $table
     */
    public function table($table = null) {
        if (is_null($table)) {
            return $this->table;
        }

        $this->table = $table;
    }


    /**
     * Set the given column to be equal to the given Value
     *
     * @param Column $column
     * @param mixed $value
     */
    public function set(Column $column, $value) {
        if (!$value instanceof Scalar) {
            $value = new Scalar($value);
        }

        $this->values[] = array($column, $value);
    }


    /**
     * Return an array of set operations to perform
     *
     * @return array
     */
    public function sets() {
        return $this->values;
    }


    /**
     * Recursively get all scalar parameters used by this expression
     *
     * @return array array(Scalar, Scalar, ...)
     */
    public function getParameters() {
        $scalars = parent::getParameters();
        foreach ($this->values as $value) {
            $scalars[] = $value[1];
        }
        return $scalars;
    }
}
<commit_msg>Remove type hinting broke by Promises<commit_after><?php

namespace Alchemy\expression;
use Exception;


/**
 * Represent an UPDATE statment in SQL
 */
class Update extends Query {
    protected $table;
    protected $values = array();


    /**
     * Set the table into update
     *
     * @param Table $table
     */
    public function table($table = null) {
        if (is_null($table)) {
            return $this->table;
        }

        $this->table = $table;
    }


    /**
     * Set the given column to be equal to the given Value
     *
     * @param Column $column
     * @param mixed $value
     */
    public function set($column, $value) {
        if (!$value instanceof Scalar) {
            $value = new Scalar($value);
        }

        $this->values[] = array($column, $value);
    }


    /**
     * Return an array of set operations to perform
     *
     * @return array
     */
    public function sets() {
        return $this->values;
    }


    /**
     * Recursively get all scalar parameters used by this expression
     *
     * @return array array(Scalar, Scalar, ...)
     */
    public function getParameters() {
        $scalars = parent::getParameters();
        foreach ($this->values as $value) {
            $scalars[] = $value[1];
        }
        return $scalars;
    }
}

{'fraction_non_alphanumeric': 0.12371134020618557, 'fraction_numerical': 0.0007636502481863307, 'mean_word_length': 1.8447339847991313, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '216842', 'n_tokens_mistral': 758, 'n_tokens_neox': 731, 'n_words': 226}