| Conditions | 3 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function __call($method, array $arguments) |
||
| 29 | { |
||
| 30 | if ($method === 'and' || $method === 'or') { |
||
| 31 | return \call_user_func_array(array($this, $method.'X'), $arguments); |
||
| 32 | } |
||
| 33 | |||
| 34 | throw new \BadMethodCallException(\sprintf('Call to undefined method %s::%s', \get_class($this), $method)); |
||
| 35 | } |
||
| 36 | |||
| 73 |
If you implement
__calland 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
__callis implemented by a parent class and only the child class knows which methods exist: