<commit_before><?php namespace Indikator\Backend\ReportWidgets;

use Backend\Classes\ReportWidgetBase;
use Exception;

class Server extends ReportWidgetBase
{
    public function render()
    {
        try {
            $this->loadData();
        }
        catch (Exception $ex) {
            $this->vars['error'] = $ex->getMessage();
        }

        return $this->makePartial('widget');
    }

    public function defineProperties()
    {
        return [
            'title' => [
                'title'             => 'backend::lang.dashboard.widget_title_label',
                'default'           => 'indikator.backend::lang.widgets.server.label',
                'type'              => 'string',
                'validationPattern' => '^.+$',
                'validationMessage' => 'backend::lang.dashboard.widget_title_error'
            ],
            'host' => [
                'title'             => 'indikator.backend::lang.properties.url',
                'default'           => true,
                'type'              => 'checkbox'
            ],
            'ip' => [
                'title'             => 'indikator.backend::lang.properties.ip',
                'default'           => true,
                'type'              => 'checkbox'
            ],
            'os' => [
                'title'             => 'indikator.backend::lang.properties.os',
                'default'           => true,
                'type'              => 'checkbox'
            ]
        ];
    }

    protected function loadData()
    {
        $this->vars['host'] = php_uname('n');
        $this->vars['ip']   = $_SERVER['SERVER_ADDR'];
        $this->vars['os']   = php_uname('s');
        foreach ($this->vars as $key=>$item){
            $this->vars[$key] = utf8_encode($this->vars[$key]);
        }
    }
}
<commit_msg>Minor typo<commit_after><?php namespace Indikator\Backend\ReportWidgets;

use Backend\Classes\ReportWidgetBase;
use Exception;

class Server extends ReportWidgetBase
{
    public function render()
    {
        try {
            $this->loadData();
        }
        catch (Exception $ex) {
            $this->vars['error'] = $ex->getMessage();
        }

        return $this->makePartial('widget');
    }

    public function defineProperties()
    {
        return [
            'title' => [
                'title'             => 'backend::lang.dashboard.widget_title_label',
                'default'           => 'indikator.backend::lang.widgets.server.label',
                'type'              => 'string',
                'validationPattern' => '^.+$',
                'validationMessage' => 'backend::lang.dashboard.widget_title_error'
            ],
            'host' => [
                'title'             => 'indikator.backend::lang.properties.url',
                'default'           => true,
                'type'              => 'checkbox'
            ],
            'ip' => [
                'title'             => 'indikator.backend::lang.properties.ip',
                'default'           => true,
                'type'              => 'checkbox'
            ],
            'os' => [
                'title'             => 'indikator.backend::lang.properties.os',
                'default'           => true,
                'type'              => 'checkbox'
            ]
        ];
    }

    protected function loadData()
    {
        $this->vars['host'] = php_uname('n');
        $this->vars['ip']   = $_SERVER['SERVER_ADDR'];
        $this->vars['os']   = php_uname('s');

        foreach ($this->vars as $key=>$item) {
            $this->vars[$key] = utf8_encode($this->vars[$key]);
        }
    }
}

{'fraction_non_alphanumeric': 0.15208503679476695, 'fraction_numerical': 0.0005451076587626056, 'mean_word_length': 1.3198482932996207, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 61, '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': '3274215', 'n_tokens_mistral': 1006, 'n_tokens_neox': 978, 'n_words': 147}