Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
39 | 1 | public function search( |
|
40 | array $params, |
||
41 | ?string $formName = '' |
||
42 | ): ?ActiveDataProvider { |
||
43 | 1 | $this->load($params, $formName); |
|
44 | 1 | if (!$this->validate()) { |
|
45 | 1 | return null; |
|
46 | } |
||
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 | 1 | 'data_type_id' => $this->data_type_id, |
|
54 | ]) |
||
55 | 1 | ->andFilterWhere(['like', 'name', $this->name]) |
|
56 | 1 | ->andFilterWhere(['like', 'label', $this->label]), |
|
57 | ]); |
||
60 |