| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | class HandlerProviderWithContainer implements HandlerProvider |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * @param array<class-string, string> $messageToHandler |
||
| 23 | * Where _key_ is a message class and _value_ the service identifier of its handler. |
||
| 24 | */ |
||
| 25 | public function __construct( |
||
| 26 | private ContainerInterface $container, |
||
| 27 | private array $messageToHandler |
||
| 28 | ) { |
||
| 29 | $this->container = $container; |
||
| 30 | $this->messageToHandler = $messageToHandler; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function getHandlerForMessage(object $message): callable |
||
| 43 | } |
||
| 44 | } |
||
| 46 |