Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
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 | $class = get_parent_class(); |
|
49 | |||
50 | 1 | return new ActiveDataProvider([ |
|
51 | 1 | 'query' => $class::find()->andFilterWhere([ |
|
52 | 1 | 'created_by' => $this->created_by, |
|
53 | ]) |
||
54 | 1 | ->andFilterWhere(['like', 'name', $this->name]), |
|
55 | ]); |
||
58 |