Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
40 | 1 | public function search( |
|
41 | array $params, |
||
42 | ?string $formName = '' |
||
43 | ): ?ActiveDataProvider { |
||
44 | 1 | $this->load($params, $formName); |
|
45 | 1 | if (!$this->validate()) { |
|
46 | 1 | return null; |
|
47 | } |
||
48 | 1 | if (null === $this->rule) { |
|
49 | 1 | throw new NotFoundHttpException('Rule not found'); |
|
50 | } |
||
51 | 1 | $this->rule->checkAccess($params); |
|
|
|||
52 | 1 | $class = get_parent_class(); |
|
53 | |||
54 | 1 | return new ActiveDataProvider([ |
|
55 | 1 | 'query' => $class::find()->andFilterWhere([ |
|
56 | 1 | 'rule_id' => $this->rule_id, |
|
57 | 1 | 'created_by' => $this->created_by, |
|
58 | ]), |
||
62 |