<commit_before><?php

namespace Heyday\CacheInclude\Configs;

/**
 * Class ArrayConfig
 * @package Heyday\CacheInclude\Configs
 */
class ArrayConfig implements ConfigInterface
{
    /**
     * @var array
     */
    protected $config;

    /**
     * @param array|void $config
     */
    public function __construct(array $config = array())
    {
        $this->config = $config;
    }

    /**
     * @param  mixed      $id
     * @param  mixed      $value
     * @throws \Exception
     */
    public function offsetSet($id, $value)
    {
        throw new \Exception('Configs are immutable');
    }

    /**
     * @param  mixed                     $id
     * @return mixed
     * @throws \InvalidArgumentException
     */
    public function offsetGet($id)
    {<commit_msg>Add ability to use properties in Injector for ArrayConfig<commit_after><?php

namespace Heyday\CacheInclude\Configs;

/**
 * Class ArrayConfig
 * @package Heyday\CacheInclude\Configs
 */
class ArrayConfig implements ConfigInterface
{
    /**
     * @var array
     */
    protected $config;

    /**
     * @param array|void $config
     */
    public function __construct(array $config = array())
    {
        $this->config = $config;
    }

    /**
     * @param array $config
     */
    public function setConfig(array $config)
    {
        if (is_array($config)) {
            $this->config = $config;
        }
    }

    /**
     * @param  mixed      $id
     * @param  mixed      $value
     * @throws \Exception
     */
    public function offsetSet($id, $value)
    {
        throw new \Exception('Configs are immutable');
    }

    /**
     * @param  mixed                     $id
     * @return mixed
     * @throws \InvalidArgumentException
     */
    public function offsetGet($id)
    {
{'fraction_non_alphanumeric': 0.1210762331838565, 'fraction_numerical': 0.0, 'mean_word_length': 1.8883495145631068, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '5973435', 'n_tokens_mistral': 520, 'n_tokens_neox': 510, 'n_words': 123}