| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 1 | public function search( |
|
| 30 | array $params, |
||
| 31 | ?string $formName = '' |
||
| 32 | ): ?ActiveDataProvider { |
||
| 33 | 1 | $this->load($params, $formName); |
|
| 34 | 1 | if (!$this->validate()) { |
|
| 35 | 1 | return null; |
|
| 36 | } |
||
| 37 | |||
| 38 | 1 | $class = get_parent_class(); |
|
| 39 | 1 | return new ActiveDataProvider([ |
|
| 40 | 1 | 'query' => $class::find()->andFilterWhere([ |
|
| 41 | 1 | 'created_by' => $this->created_by, |
|
|
|
|||
| 42 | ]) |
||
| 43 | 1 | ->andFilterWhere(['like', 'name', $this->name]) |
|
| 44 | 1 | ->notDeleted(), |
|
| 45 | ]); |
||
| 48 |