| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 4.1755 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | 2 | public function __call($name, array $args) |
|
| 22 | { |
||
| 23 | 2 | if (!isset(self::$method_aliases)) { |
|
| 24 | throw new \LogicException(static::class.'::$method_aliases is not set.'); |
||
| 25 | } |
||
| 26 | |||
| 27 | 2 | if (isset(self::$method_aliases[$name])) { |
|
| 28 | 1 | $method = self::$method_aliases[$name]; |
|
| 29 | 1 | } elseif (in_array($name, self::$method_aliases)) { |
|
| 30 | $method = $name; |
||
| 31 | } else { |
||
| 32 | 1 | throw new \BadMethodCallException(static::class."::{$name}() is not exists."); |
|
| 33 | } |
||
| 34 | |||
| 35 | 1 | return call_user_func([$this, $method]); |
|
| 36 | } |
||
| 38 |