<commit_before><?php
namespace Kitpages\DataGridBundle\Grid;

class Field
{
    /** @var string */
    protected $fieldName = null;
    /** @var string */
    protected $label = null;
    /** @var boolean */
    protected $sortable = false;
    /** @var boolean */
    protected $filterable = false;
    /** @var boolean */
    protected $visible = true;
    /** @var function */
    protected $formatValueCallback = null;
    /** @var boolean */
    protected $autoEscape = true;
    /** @var boolean */
    protected $translatable = false;
    /** @var string  */
    protected $category = null;
    /** @var bool */
    protected $nullIfNotExists = false;

    public function __construct($fieldName, $optionList = array())
    {
        $this->fieldName = $fieldName;
        $this->label = $fieldName;
        foreach ($optionList as $key => $val) {
            if (in_array($key, array(
                "label",
                "sortable",
                "filterable",
                "visible",
                "formatValueCallback",
                "autoEscape",
                "translatable",
                "category",
                "nullIfNotExists"
            ) )) {
                $this->$key = $val;
            } else {
                throw new \InvalidArgumentException("key $key doesn't exist in option list");
            }
        }
    }

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

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

    /**
     * @param boolean $filterable
     */
    public function setFilterable($filterable)
    {
        $this->filterable = $filterable;
    }

    /**
     * @return boolean
     */
    public function getFilterable()
    {
        return $this->filterable;
    }

    /**
     * @param \Kitpages\DataGridBundle\Grid\function $formatValueCallback
     */
    public function setFormatValueCallback($formatValueCallback)
    {
        $this->formatValueCallback = $formatValueCallback;
    }

    /**
     * @return \Kitpages\DataGridBundle\Grid\function
     */
    public function getFormatValueCallback()
    {
        return $this->formatValueCallback;
    }

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

    /**
     * @return string
     */
    public function getLabel()
    {
        return $this->label;
    }<commit_msg>fix in phpdoc<commit_after><?php
namespace Kitpages\DataGridBundle\Grid;

class Field
{
    /** @var string */
    protected $fieldName = null;
    /** @var string */
    protected $label = null;
    /** @var boolean */
    protected $sortable = false;
    /** @var boolean */
    protected $filterable = false;
    /** @var boolean */
    protected $visible = true;
    /** @var function */
    protected $formatValueCallback = null;
    /** @var boolean */
    protected $autoEscape = true;
    /** @var boolean */
    protected $translatable = false;
    /** @var string  */
    protected $category = null;
    /** @var bool */
    protected $nullIfNotExists = false;

    public function __construct($fieldName, $optionList = array())
    {
        $this->fieldName = $fieldName;
        $this->label = $fieldName;
        foreach ($optionList as $key => $val) {
            if (in_array($key, array(
                "label",
                "sortable",
                "filterable",
                "visible",
                "formatValueCallback",
                "autoEscape",
                "translatable",
                "category",
                "nullIfNotExists"
            ) )) {
                $this->$key = $val;
            } else {
                throw new \InvalidArgumentException("key $key doesn't exist in option list");
            }
        }
    }

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

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

    /**
     * @param boolean $filterable
     */
    public function setFilterable($filterable)
    {
        $this->filterable = $filterable;
    }

    /**
     * @return boolean
     */
    public function getFilterable()
    {
        return $this->filterable;
    }

    /**
     * @param callable $formatValueCallback
     */
    public function setFormatValueCallback($formatValueCallback)
    {
        $this->formatValueCallback = $formatValueCallback;
    }

    /**
     * @return callable
     */
    public function getFormatValueCallback()
    {
        return $this->formatValueCallback;
    }

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

    /**
     * @return string
     */
    public function getLabel()
    {
        return $this->label;
    }
{'fraction_non_alphanumeric': 0.1282764098490866, 'fraction_numerical': 0.0, 'mean_word_length': 1.7124394184168013, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, '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': '7098412', 'n_tokens_mistral': 1425, 'n_tokens_neox': 1380, 'n_words': 308}