View   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 8 1
1
<?php
2
3
namespace roaresearch\yii2\roa\actions;
4
5
use roaresearch\yii2\roa\hal\ARContract;
6
use Yii;
7
8
class View extends Action
9
{
10
    /**
11
     * @return ARContract
12
     * @param mixed $id
13
     */
14 2
    public function run($id): ARContract
15
    {
16 2
        $this->checkAccess(
17 2
            ($model = $this->findModel($id)),
18 2
            Yii::$app->getRequest()->getQueryParams()
19
        );
20
21 2
        return $model;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $model returns the type yii\db\ActiveRecordInterface which includes types incompatible with the type-hinted return roaresearch\yii2\roa\hal\ARContract.
Loading history...
22
    }
23
}
24