<commit_before><?php

/*
 * This file is part of the Indigo Cart package.
 *
 * (c) Indigo Development Team
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Indigo\Cart\Option;

use Indigo\Cart\Option\OptionInterface;
use Indigo\Container\Collection as CollectionContainer;
use Fuel\Validation\Rule\Type;
use Fuel\Common\Arr;

/**
 * Option collection class
 *
 * @author <NAME> <<EMAIL>>
 */
class Collection extends CollectionContainer implements OptionInterface
{
    use \Indigo\Container\Helper\Insert;
    use \Indigo\Container\Helper\Id;

    public function __construct(array $data = array(), $readOnly = false)
    {
        parent::__construct(new Type('Indigo\\Cart\\Option\\OptionInterface'), array(), $readOnly);

        foreach ($data as $value) {<commit_msg>Made Option Collection Serializable<commit_after><?php

/*
 * This file is part of the Indigo Cart package.
 *
 * (c) Indigo Development Team
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Indigo\Cart\Option;

use Indigo\Cart\Option\OptionInterface;
use Indigo\Container\Collection as CollectionContainer;
use Fuel\Validation\Rule\Type;
use Fuel\Common\Arr;
use Serializable;

/**
 * Option collection class
 *
 * @author <NAME> <<EMAIL>>
 */
class Collection extends CollectionContainer implements OptionInterface, Serializable
{
    use \Indigo\Container\Helper\Id;
    use \Indigo\Container\Helper\Insert;
    use \Indigo\Container\Helper\Serializable;

    public function __construct(array $data = array(), $readOnly = false)
    {
        parent::__construct(new Type('Indigo\\Cart\\Option\\OptionInterface'), array(), $readOnly);

        foreach ($data as $value) {
{'fraction_non_alphanumeric': 0.11026615969581749, 'fraction_numerical': 0.0, 'mean_word_length': 4.046575342465753, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1277118', 'n_tokens_mistral': 508, 'n_tokens_neox': 500, 'n_words': 160}