ApiVersionController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 18
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A actionIndex() 0 3 1
A behaviors() 0 3 1
1
<?php
2
3
namespace roaresearch\yii2\roa\controllers;
4
5
/**
6
 * Shows the fact sheet for the api version its contained.
7
 *
8
 * @property \roaresearch\yii2\roa\modules\ApiVersion $module
9
 *
10
 * @author Angel (Faryshta) Guevara <[email protected]>
11
 */
12
class ApiVersionController extends \yii\rest\Controller
13
{
14
    /**
15
     * @inheritdoc
16
     */
17 2
    public function behaviors()
18
    {
19 2
        return [];
20
    }
21
22
    /**
23
     * List of all the resources available for the parent module api version.
24
     *
25
     * @return array
26
     */
27 2
    public function actionIndex(): array
28
    {
29 2
        return $this->module->getFactSheet();
30
    }
31
}
32