Passed
Pull Request — master (#42)
by Paweł
03:47
created

Module::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace app\modules\api\v1;
4
5
use yii\filters\auth\HttpBearerAuth;
6
7
/**
8
 * v1 module definition class
9
 */
10
class Module extends \yii\base\Module
11
{
12
    /**
13
     * @inheritdoc
14
     */
15
    public $controllerNamespace = 'app\modules\api\v1\controllers';
16
17
    /**
18
     * @inheritdoc
19
     */
20
    public function init()
21
    {
22
        parent::init();
23
24
        \Yii::$app->errorHandler->errorAction = '/v1/default/error';
25
    }
26
}
27