<commit_before><?php

namespace SleepingOwl\Admin\Display;

use Illuminate\Contracts\Validation\Validator;
use SleepingOwl\Admin\Contracts\FormInterface;
use SleepingOwl\Admin\Contracts\Initializable;
use SleepingOwl\Admin\Model\ModelConfiguration;
use SleepingOwl\Admin\Contracts\DisplayInterface;

// TODO: починить указание активности таба
class DisplayTab implements DisplayInterface, FormInterface
{
    /**
     * @var string
     */
    protected $label = '';

    /**
     * @var bool
     */
    protected $active = false;

    /**
     * @var string
     */
    protected $name;

    /**
     * @var string
     */
    protected $icon;

    /**
     * @var DisplayInterface
     */
    protected $content;

    /**
     * @param DisplayInterface $content
     */
    public function __construct(DisplayInterface $content)
    {
        $this->content = $content;
    }

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

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

        return $this;
    }

    /**
     * @return bool
     */
    public function isActive()
    {
        return $this->active;
    }

    /**
     * @param bool $active
     *
     * @return $this
     */
    public function setActive($active)
    {
        $this->active = (bool) $active;

        return $this;
    }

    /**
     * @return string
     */
    public function getName()
    {
        return is_null($this->name)
            ? md5($this->getLabel())
            : $this->name;
    }

    /**
     * @param string $name
     *
     * @return $this<commit_msg>Added setActive method default value<commit_after><?php

namespace SleepingOwl\Admin\Display;

use Illuminate\Contracts\Validation\Validator;
use SleepingOwl\Admin\Contracts\FormInterface;
use SleepingOwl\Admin\Contracts\Initializable;
use SleepingOwl\Admin\Model\ModelConfiguration;
use SleepingOwl\Admin\Contracts\DisplayInterface;

// TODO: починить указание активности таба
class DisplayTab implements DisplayInterface, FormInterface
{
    /**
     * @var string
     */
    protected $label = '';

    /**
     * @var bool
     */
    protected $active = false;

    /**
     * @var string
     */
    protected $name;

    /**
     * @var string
     */
    protected $icon;

    /**
     * @var DisplayInterface
     */
    protected $content;

    /**
     * @param DisplayInterface $content
     */
    public function __construct(DisplayInterface $content)
    {
        $this->content = $content;
    }

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

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

        return $this;
    }

    /**
     * @return bool
     */
    public function isActive()
    {
        return $this->active;
    }

    /**
     * @param bool $active
     *
     * @return $this
     */
    public function setActive($active = true)
    {
        $this->active = (bool) $active;

        return $this;
    }

    /**
     * @return string
     */
    public function getName()
    {
        return is_null($this->name)
            ? md5($this->getLabel())
            : $this->name;
    }

    /**
     * @param string $name
     *
     * @return $this
{'fraction_non_alphanumeric': 0.12839007501442584, 'fraction_numerical': 0.0005770340450086555, 'mean_word_length': 1.8394758394758395, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, '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': '3485748', 'n_tokens_mistral': 1058, 'n_tokens_neox': 1051, 'n_words': 216}