| Conditions | 1 |
| Paths | 1 |
| Total Lines | 24 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 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' => function ($q) { |
||
| 41 | return $q |
||
| 42 | ->find('translations'); |
||
| 43 | }, |
||
| 44 | ]) |
||
| 45 | ->where([ |
||
| 46 | 'Groups.id' => $this->request->id |
||
| 47 | ]); |
||
| 48 | |||
| 49 | $users = $this->paginate($users); |
||
| 50 | |||
| 51 | $this->set(compact('users')); |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
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@propertyannotation 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.