Code Duplication    Length = 22-22 lines in 4 locations

modules/feedback/Module.php 1 location

@@ 10-31 (lines=22) @@
7
/**
8
 * feedback module definition class
9
 */
10
class Module extends \yii\base\Module
11
{
12
    /**
13
     * @inheritdoc
14
     */
15
    public $controllerNamespace = 'app\modules\feedback\controllers';
16
17
    /**
18
     * @inheritdoc
19
     */
20
    public function init()
21
    {
22
        parent::init();
23
24
        if (empty(Yii::$app->i18n->translations['feedback'])) {
25
            Yii::$app->i18n->translations['feedback'] = [
26
                'class' => 'yii\i18n\PhpMessageSource',
27
                'basePath' => __DIR__ . '/messages',
28
            ];
29
        }
30
    }
31
}
32

modules/mailTemplate/Module.php 1 location

@@ 10-31 (lines=22) @@
7
/**
8
 * mailTemplate module definition class
9
 */
10
class Module extends \yii\base\Module
11
{
12
    /**
13
     * @inheritdoc
14
     */
15
    public $controllerNamespace = 'app\modules\mailTemplate\controllers';
16
17
    /**
18
     * @inheritdoc
19
     */
20
    public function init()
21
    {
22
        parent::init();
23
24
        if (empty(Yii::$app->i18n->translations['mailTemplate'])) {
25
            Yii::$app->i18n->translations['mailTemplate'] = [
26
                'class' => 'yii\i18n\PhpMessageSource',
27
                'basePath' => __DIR__ . '/messages',
28
            ];
29
        }
30
    }
31
}
32

modules/page/Module.php 1 location

@@ 9-30 (lines=22) @@
6
/**
7
 * page module definition class
8
 */
9
class Module extends \yii\base\Module
10
{
11
    /**
12
     * @inheritdoc
13
     */
14
    public $controllerNamespace = 'app\modules\page\controllers';
15
16
    /**
17
     * @inheritdoc
18
     */
19
    public function init()
20
    {
21
        parent::init();
22
23
        if (empty(Yii::$app->i18n->translations['page'])) {
24
            Yii::$app->i18n->translations['page'] = [
25
                'class' => 'yii\i18n\PhpMessageSource',
26
                'basePath' => __DIR__ . '/messages',
27
            ];
28
        }
29
    }
30
}
31

modules/user/Module.php 1 location

@@ 10-31 (lines=22) @@
7
/**
8
 * user module definition class
9
 */
10
class Module extends \yii\base\Module
11
{
12
    /**
13
     * @inheritdoc
14
     */
15
    public $controllerNamespace = 'app\modules\user\controllers';
16
17
    /**
18
     * @inheritdoc
19
     */
20
    public function init()
21
    {
22
        parent::init();
23
24
        if (empty(Yii::$app->i18n->translations['user'])) {
25
            Yii::$app->i18n->translations['user'] = [
26
                'class' => 'yii\i18n\PhpMessageSource',
27
                'basePath' => __DIR__ . '/messages',
28
            ];
29
        }
30
    }
31
}
32