Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
43 | public function instantiate(string $handler) : QueryHandler |
||
44 | { |
||
45 | if (false === $this->container->has($handler)) { |
||
46 | throw new InvalidArgumentException( |
||
47 | sprintf('Handler %s could not be found. Did you register it?', $handler) |
||
48 | ); |
||
49 | } |
||
50 | |||
51 | return $this->container->get($handler); |
||
52 | } |
||
53 | } |
||
54 |