| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 25 | public function inflect($command, $handler) |
||
| 26 | { |
||
| 27 | foreach ($this->inflectors as $inflector) { |
||
| 28 | $methodName = $inflector->inflect($command, $handler); |
||
| 29 | if (is_callable([$handler, $methodName])) { |
||
| 30 | return $methodName; |
||
| 31 | } |
||
| 32 | } |
||
| 33 | throw new \RuntimeException('None of the inflectors could guess the handler method name.'); |
||
| 34 | } |
||
| 35 | } |
||
| 36 |