<commit_before><?php
namespace Aura\Web\Request\Accept;

abstract class AbstractValues implements \IteratorAggregate, \Countable, \ArrayAccess {
    protected $values = array();

    protected $server_key;
    
    /**
     * @param string|array $values $_SERVER of an Accept* value
     */
    public function __construct($values = null)
    {
        if (! is_null($values)) {
            $this->addValues($values);
        }
    }

    public function setValues($values)
    {
        $this->values = array();
        $this->addValues($values);
    }
    
    /**
     * @param string|array $values $_SERVER of an Accept* value
     */
    public function addValues($values)
    {
        $key = $this->server_key;
        
        if (is_array($values)) {
            if (! isset($values[$key])) {
                $this->values = array();
                return;
            }
            $values = $values[$key];<commit_msg>initial values for accept always array<commit_after><?php
namespace Aura\Web\Request\Accept;

abstract class AbstractValues implements \IteratorAggregate, \Countable, \ArrayAccess {
    protected $values = array();

    protected $server_key;
    
    /**
     * @param array $server A copy of $_SERVER.
     */
    public function __construct(array $server = array())
    {
        $this->addValues($server);
    }

    public function setValues($values)
    {
        $this->values = array();
        $this->addValues($values);
    }
    
    /**
     * @param string|array $values $_SERVER of an Accept* value
     */
    public function addValues($values)
    {
        $key = $this->server_key;
        
        if (is_array($values)) {
            if (! isset($values[$key])) {
                $this->values = array();
                return;
            }
            $values = $values[$key];
{'fraction_non_alphanumeric': 0.13402625820568928, 'fraction_numerical': 0.0, 'mean_word_length': 1.988562091503268, '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': '5200887', 'n_tokens_mistral': 509, 'n_tokens_neox': 506, 'n_words': 118}