Conditions | 4 |
Paths | 3 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | protected function getFoundRows() { |
||
24 | $query = $this->table->count(); |
||
|
|||
25 | |||
26 | $query->marks($this->marks); |
||
27 | |||
28 | foreach ($this->where as $k => $where) { |
||
29 | if ($k === 'or') { |
||
30 | foreach ($where as $condition) { |
||
31 | $query->orWhere($condition); |
||
32 | } |
||
33 | } else { |
||
34 | $query->where($where); |
||
35 | } |
||
36 | } |
||
37 | |||
38 | return $query->run(); |
||
39 | } |
||
40 | } |
||
41 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: