ModuleTrait::getAbstractModule()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
4
namespace andmemasin\myabstract\traits;
5
6
use andmemasin\myabstract\Module;
7
8
/**
9
 * Trait ModuleTrait
10
 * @property-read Module $abstractModule
11
 * @package andmemasin\myabstract
12
 */
13
trait ModuleTrait
14
{
15
    /**
16
     * @return Module
17
     */
18
    public function getAbstractModule()
19
    {
20
        /** @var Module $module */
21
        $module = \Yii::$app->getModule('myabstract');
22
        return $module;
23
    }
24
}