Conditions | 3 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function search($params = []) |
||
21 | { |
||
22 | $query = User::find(); |
||
23 | $dataProvider = new ActiveDataProvider([ |
||
24 | 'query' => $query, |
||
25 | ]); |
||
26 | $dataProvider->sort = [ |
||
|
|||
27 | 'defaultOrder' => [ |
||
28 | 'username' => SORT_ASC, |
||
29 | ], |
||
30 | ]; |
||
31 | if (!$this->load($params) || !$this->validate()) { |
||
32 | return $dataProvider; |
||
33 | } |
||
34 | $query->andWhere(['like', 'username', $this->username]); |
||
35 | return $dataProvider; |
||
36 | } |
||
38 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..