| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 64 | public function countByUser() |
||
| 65 | { |
||
| 66 | // SELECT user_id, COUNT(*) AS Cnt FROM canswers GROUP BY user_id ORDER BY user_id ASC LIMIT 3; |
||
| 67 | $this->db->select("user_id, COUNT(*) AS Cnt") |
||
| 68 | ->from($this->getSource()) |
||
| 69 | ->groupby("user_id") |
||
| 70 | ->orderby('user_id ASC') |
||
| 71 | ->execute(); |
||
| 72 | $this->db->execute(); |
||
| 73 | $this->db->setFetchModeClass(__CLASS__); |
||
| 74 | return $this->db->fetchAll(); |
||
| 75 | } |
||
| 76 | } |
||
| 77 |
Since your code implements the magic getter
_get, this function will be called for any read access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read 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.