Completed
Push — master ( 6db6da...5370d9 )
by Angel
03:42
created

View::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 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