@param array $taxValuesAllowed

@return $this
774513
public function setTaxPercentClosest(array $taxValuesAllowed)
    {
        $taxOld = $this->getTaxPercent();
        $taxNew = $taxOld;

        $diffLeast = null;
        foreach ($taxValuesAllowed as $taxCurrent) {
            $diffCurrent = abs($taxOld - $taxCurrent);
            if ($diffLeast === null || $diffLeast > $diffCurrent) {
                $diffLeast = $diffCurrent;
                $taxNew    = $taxCurrent;
            }

            $taxDifferences[$taxNew] = abs($taxOld - $taxNew);
        }

        if ($taxOld != $taxNew) {
            $this->set('taxPercent', $taxNew);
        }

        return $this;
    }
943974
public function setAllowedExtensions($extensions)
    {
        if (is_string($extensions)) {
            $extensions = explode(',', $extensions);
        }

        $this->allowedExtensions = array_map('trim', $extensions);

        return $this;
    }
463347
public function in(array $values)
    {
        foreach ($values as $value) {
            if (\is_array($value)) {
                $this->in($value);
            } else {
                $this->is($value);
            }
        }

        return $this;
    }
933348
protected function values(array $values)
    {
        if (is_numeric(key($values))) {
            $this->insertValues[] = $values;
        } else {
            // Reorder the submitted values to match the fields array.
            foreach ($this->insertFields as $key) {
                $insert_values[$key] = $values[$key];
            }
            $this->insertValues[] = array_values($insert_values);
        }
        return $this;
    }
343326
public function bindValues($values)
    {
        foreach($values as $k => $v)
        {
            $this->binds[$k] = $v;
        }
        return $this;
    }
541487
public function setResults(array $values)
    {
        foreach ($values as $field => $value) {
            if (empty($value)) {
                continue;
            }
            $this->setResult($field, $value);
        }

        return $this;
    }
1318741
public function setWritableValues(array $values)
    {
        foreach ($values as $key => $value) {
            if ($this->isWritable($key)) {
                $this->$key = $value;
            }
        }

        return $this;
    }
1239201
public void setAllowedValues(java.util.Collection<String> allowedValues) {
        if (allowedValues == null) {
            this.allowedValues = null;
            return;
        }

        this.allowedValues = new com.amazonaws.internal.SdkInternalList<String>(allowedValues);
    }
1236782
private function setValues($values)
    {
        if (! empty($values)) {
            if ($this->canHaveMultipleValues()) {
                $this->addValues($values);
            } elseif ($this->canHaveValue()) {
                $this->addValue($values);
            }
        }

        return $this;
    }
700381
public function setAll(array $values)
    {
        if ($this->getResource()) {
            if ($this->useLocalResource) {
                $this->localResource = $values;
            } else {
                $GLOBALS[$this->getResource()] = $values;
            }
        }
        return $this;
    }
383407
public function addAllowedMethods(array $methods): MethodNotAllowed
    {
        $this->allowedMethods = array_merge($this->allowedMethods, $methods);

        return $this;
    }
243125
public function setValues(array $values)
    {
        $this->values = array();
        foreach ($values as $value) {
            $this->addValue($value);
        }
        return $this;
    }
1057192
public function pushAll(array $values): self
    {
        foreach ($values as $value) {
            $this->push($value);
        }

        return $this;
    }
714999
protected function addValues($values)
    {
        if (!is_array($values) && !$values instanceof \Traversable) {
            //Unable to process values
            return;
        }

        foreach ($values as $value) {
            //Passing every value thought the filter
            $value = $this->filterValue($value);
            if (!is_null($value)) {
                $this->values[] = $value;
            }
        }
    }
853915
public function setValues(array $values) : CheckboxGroup
    {
        foreach ($this->checkboxes as $checkbox) {
            $checkbox->setChecked(in_array($checkbox->getValue(), $values, true));
        }

        return $this;
    }
330542
public function except(array $values): self
    {
        return $this->filter(function ($value) use ($values) {
            return !in_array($value, $values);
        });
    }
963089
public function setAllowedMimeTypes($types = '*')
        {
            if(is_string($types))
            {
                if ('*' !== $types) {
                    $types = (array) $types;
                }else{
                    $this->allowedTypes = $types;
                    return $this;
                }
            }

            if(is_array($types))
            {
                $this->allowedTypes = $types;
                return $this;
            }else{
                return false;
            }
        }