Conditions | 2 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
39 | 2 | public function run(): DataProviderInterface | ARContractSearch |
|
40 | { |
||
41 | /** @var ARContractSearch $searchModel */ |
||
42 | 2 | $searchModel = Instance::ensure( |
|
43 | 2 | ['class' => $this->searchClass], |
|
44 | ARContractSearch::class |
||
45 | ); |
||
46 | 2 | $dataProvider = $searchModel->search( |
|
47 | 2 | Yii::$app->request->getQueryParams(), |
|
48 | 2 | $this->formName |
|
49 | ); |
||
50 | 2 | $this->checkAccess($searchModel, Yii::$app->request->getQueryParams()); |
|
51 | |||
52 | 2 | return $dataProvider ?: $searchModel; |
|
53 | } |
||
55 |