| Conditions | 2 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | public function __call($method, array $args) |
||
| 49 | { |
||
| 50 | if (substr($method, 0, 3) !== 'get') { |
||
| 51 | throw new \BadMethodCallException(sprintf('Invalid method call %s::%s', get_class($this), $method)); |
||
| 52 | } |
||
| 53 | |||
| 54 | // https://github.com/doctrine/inflector/blob/master/lib/Doctrine/Common/Inflector/Inflector.php |
||
| 55 | $alias = strtolower(preg_replace('~(?<=\\w)([A-Z])~', '_$1', substr($method, 3))); |
||
| 56 | |||
| 57 | return $this->get($alias); |
||
| 58 | } |
||
| 60 |