Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function view() |
||
30 | { |
||
31 | $this->paginate = [ |
||
32 | 'maxLimit' => Configure::read('Group.user_per_page') |
||
33 | ]; |
||
34 | |||
35 | $this->Users = $this->loadModel('Users'); |
||
|
|||
36 | |||
37 | $users = $this->Users |
||
38 | ->find() |
||
39 | ->contain([ |
||
40 | 'Groups' |
||
41 | ]) |
||
42 | ->where([ |
||
43 | 'Groups.id' => $this->request->id |
||
44 | ]); |
||
45 | |||
46 | $users = $this->paginate($users); |
||
47 | |||
48 | $this->set(compact('users')); |
||
49 | } |
||
50 | } |
||
51 |
Since your code implements the magic setter
_set
, this function will be called for any write access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.