| Conditions | 4 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function execute($className, $methodName, ServerRequestInterface $request) |
||
| 38 | { |
||
| 39 | if (!isset($this->container[$className])) { |
||
| 40 | throw new HandlerNotFoundException($className, $methodName); |
||
| 41 | } |
||
| 42 | $object = $this->container[$className]; |
||
| 43 | if (!method_exists($object, $methodName) && !method_exists($object, '__call')) { |
||
| 44 | throw new HandlerNotFoundException($className, $methodName); |
||
| 45 | } |
||
| 46 | return call_user_func([$object, $methodName], $request); |
||
| 47 | } |
||
| 48 | } |
||
| 49 |