<commit_before><?php

namespace worstinme\widgets; 

use Yii;

class Module extends \yii\base\Module
{
    /**
     * @inheritdoc
     */
    public $controllerNamespace = 'worstinme\widgets\controllers';

    /**
     * @inheritdoc
     */
    public function init()
    {
        parent::init();

        $this->registerTranslations();
    }

    public function registerTranslations()
    {
        Yii::$app->i18n->translations['widgets'] = [
            'class' => 'yii\i18n\PhpMessageSource',
            'sourceLanguage' => 'en-GB',
            'basePath' => '@worstinme/widgets/messages',
        ];
    }
}<commit_msg>layout & nav method<commit_after><?php

namespace worstinme\widgets;

use Yii;

class Module extends \yii\base\Module
{
    /** @var string The Widgets admin layout. */
    public $layout = '@worstinme/widgets/views/layouts/widgets.php';
    /**
     * @inheritdoc
     */
    public $controllerNamespace = 'worstinme\widgets\controllers';

    public function getNav()
    {
        return array_filter([
            ['label' => Yii::t('widgets', 'NAV_WIDGETS'), 'url' => ['/widgets/default/index'], 'items' => [
                ['label' => Yii::t('widgets', 'NAV_WIDGET_CREATE'), 'url' => ['/widgets/default/create']],
            ]],
        ]);
    }
}
{'fraction_non_alphanumeric': 0.16601714731098988, 'fraction_numerical': 0.003117692907248636, 'mean_word_length': 2.4148936170212765, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 14, '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': '6011770', 'n_tokens_mistral': 424, 'n_tokens_neox': 407, 'n_words': 69}