<commit_before><?php

namespace humhub\modules\discordapp\models;

use Yii;
use yii\base\Model;

/**
 * ConfigureForm defines the configurable fields.
 */
class ConfigureForm extends Model
{

    public $serverUrl;

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            ['serverUrl', 'string'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'serverUrl' => Yii::t('DiscordappModule.base', 'Discord Widget URL:'),
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeHints()
    {
        return [
            'serverUrl' => Yii::t('DiscordappModule.base', 'e.g. https://discordapp.com/widget?id={server-id} or https://discordapp.com/widget?id={server-id}&theme=dark'),
        ];
    }

    public function loadSettings()
    {
        $this->serverUrl = Yii::$app->getModule('discordapp')->settings->get('serverUrl');

        return true;
    }

    public function save()
    {
        Yii::$app->getModule('discordapp')->settings->set('serverUrl', $this->serverUrl);

        return true;
    }

}
<commit_msg>Update ConfigureForm.php<commit_after><?php

namespace humhub\modules\discordapp\models;

use Yii;
use yii\base\Model;

/**
 * ConfigureForm defines the configurable fields.
 */
class ConfigureForm extends Model
{

    public $serverUrl;

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            ['serverUrl', 'string'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'serverUrl' => Yii::t('DiscordappModule.base', 'Discord Widget URL:'),
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeHints()
    {
        return [
            'serverUrl' => Yii::t('DiscordappModule.base', 'e.g. https://discordapp.com/widget?id={server-id} or https://discord.com/widget?id={server-id}'),
        ];
    }

    public function loadSettings()
    {
        $this->serverUrl = Yii::$app->getModule('discordapp')->settings->get('serverUrl');

        return true;
    }

    public function save()
    {
        Yii::$app->getModule('discordapp')->settings->set('serverUrl', $this->serverUrl);

        return true;
    }

}

{'fraction_non_alphanumeric': 0.1567196221554315, 'fraction_numerical': 0.0, 'mean_word_length': 2.178717598908595, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 4, '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': '5968861', 'n_tokens_mistral': 728, 'n_tokens_neox': 719, 'n_words': 121}