ApiVersionController::behaviors()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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