Completed
Pull Request — master (#2)
by Angel
03:03
created

View   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 9 1
1
<?php
2
3
namespace roaresearch\yii2\roa\actions;
4
5
use Yii;
6
7
class View extends Action
8
{
9
    /**
10
     * @return ActiveDataProvider
0 ignored issues
show
Documentation introduced by
Should the return type not be \yii\db\ActiveRecordInterface?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
11
     * @param mixed $id
12
     */
13
    public function run($id)
14
    {
15
        /* @var $model \yii\db\ActiveRecordInterface */
16
        $model = $this->findModel($id);
17
        $request = Yii::$app->getRequest();
18
        $this->checkAccess($model, $request->getQueryParams());
19
20
        return $model;
21
    }
22
}
23