<commit_before><?php
/**
 * (c) Vespolina Project http://www.vespolina-project.org
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */
namespace Vespolina\ProductBundle\Model\Node;

use Vespolina\ProductBundle\Model\ProductNode;
use Vespolina\ProductBundle\Model\Node\ProductOptionsInterface;

/**
 * @author <NAME> <<EMAIL>>
 */
class ProductOptions extends ProductNode implements ProductOptionsInterface
{
    /*
     * @inheritdoc
     */
    public function addOption(OptionNodeInterface $option)
    {
        $this->addChild($option);
    }

    /**
     * @inheritdoc
     */
    public function clearOptions()
    {
        $this->clearChildren();<commit_msg>adding option creates OptionTypeNode class for each type<commit_after><?php
/**
 * (c) Vespolina Project http://www.vespolina-project.org
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */
namespace Vespolina\ProductBundle\Model\Node;

use Vespolina\ProductBundle\Model\ProductNode;
use Vespolina\ProductBundle\Model\Node\OptionTypeNode;
use Vespolina\ProductBundle\Model\Node\ProductOptionsInterface;

/**
 * @author <NAME> <<EMAIL>>
 */
class ProductOptions extends ProductNode implements ProductOptionsInterface
{
    /*
     * @inheritdoc
     */
    public function addOption(OptionNodeInterface $option)
    {
        $typeName = $option->getType();
        if (!isset($this->children[$typeName])) {
            $this->children[$typeName] = new OptionTypeNode();
        }
        $this->children[$typeName]->addOption($option);
    }

    /**
     * @inheritdoc
     */
    public function clearOptions()
    {
        $this->clearChildren();
{'fraction_non_alphanumeric': 0.11936036550542548, 'fraction_numerical': 0.0, 'mean_word_length': 3.347394540942928, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '6933079', 'n_tokens_mistral': 499, 'n_tokens_neox': 488, 'n_words': 117}