Module   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 18
ccs 0
cts 5
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 8 1
1
<?php
2
namespace App\Http\Api;
3
4
use Yii;
5
6
/**
7
 * API module definition class
8
 */
9
class Module extends \yii\base\Module
10
{
11
    /**
12
     * {@inheritdoc}
13
     */
14
    public $controllerNamespace = 'App\Http\Api\Controller';
15
16
    /**
17
     * {@inheritdoc}
18
     */
19
    public function init()
20
    {
21
        parent::init();
22
23
        // custom initialization code goes here
24
25
        $response = Yii::$app->getResponse();
26
        $response->format = 'json';
27
    }
28
}
29