| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 12 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function resolve(MessageInterface $message) |
||
| 28 | { |
||
| 29 | if ($message instanceof CommandNamedInterface) { |
||
| 30 | return $message->named(); |
||
| 31 | } |
||
| 32 | |||
| 33 | throw new \InvalidArgumentException(sprintf( |
||
| 34 | 'The object of type %s should implement the %s interface', |
||
| 35 | get_class($message), |
||
| 36 | CommandNamedInterface::class |
||
| 37 | )); |
||
| 38 | } |
||
| 39 | } |
||
| 40 |