<commit_before><?php

namespace PHPOrchestra\ModelBundle\Document;

use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
use PHPOrchestra\ModelBundle\Model\FieldOptionInterface;

/**
 * Description of FieldOption
 *
 * @MongoDB\EmbeddedDocument
 */
class FieldOption implements FieldOptionInterface
{
    /**
     * @var string
     *
     * @MongoDB\Field(type="string")
     */
    protected $key;

    /**
     * @var string
     *
     * @MongoDB\Field(type="string")
     */
    protected $value;

    /**
     * @param string $key
     */
    public function setKey($key)
    {
        $this->key = $key;
    }

    /**
     * @return string
     */
    public function getKey()
    {
        return $this->key;
    }

    /**
     * @param string $value
     */
    public function setValue($value)
    {
        $this->value = $value;
    }

    /**
     * @return string
     */
    public function getValue()
    {
        return $this->value;
    }
}<commit_msg>Field options can now be of complexe type<commit_after><?php

namespace PHPOrchestra\ModelBundle\Document;

use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
use PHPOrchestra\ModelBundle\Model\FieldOptionInterface;

/**
 * Description of FieldOption
 *
 * @MongoDB\EmbeddedDocument
 */
class FieldOption implements FieldOptionInterface
{
    /**
     * @var string
     *
     * @MongoDB\Field(type="string")
     */
    protected $key;

    /**
     * @var string
     *
     * @MongoDB\Field(type="string")
     */
    protected $value;

    /**
     * @param string $key
     */
    public function setKey($key)
    {
        $this->key = $key;
    }

    /**
     * @return string
     */
    public function getKey()
    {
        return $this->key;
    }

    /**
     * @param string $value
     */
    public function setValue($value)
    {
        $this->value = serialize($value);
    }

    /**
     * @return string
     */
    public function getValue()
    {
        return unserialize($this->value);
    }
}
{'fraction_non_alphanumeric': 0.1345962113659023, 'fraction_numerical': 0.0, 'mean_word_length': 2.0135135135135136, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, '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': '3293958', 'n_tokens_mistral': 639, 'n_tokens_neox': 629, 'n_words': 121}