| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function __call($method, $arguments) |
||
| 11 | { |
||
| 12 | if (0 === strpos($method, 'find')) { |
||
| 13 | if (method_exists($this, $builder = 'build'.substr($method, 4))) { |
||
| 14 | $qb = call_user_func_array(array($this, $builder), $arguments); |
||
| 15 | |||
| 16 | if (0 === strpos(substr($method, 4), 'One')) { |
||
| 17 | return $qb->getQuery()->getOneOrNullResult(); |
||
| 18 | } |
||
| 19 | |||
| 20 | return $qb->getQuery()->getResult(); |
||
| 21 | } |
||
| 22 | } |
||
| 23 | |||
| 24 | return parent::__call($method, $arguments); |
||
| 25 | } |
||
| 26 | |||
| 49 |