| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 37 | public function getConnection(?string $name = null) : Connection |
||
| 38 | { |
||
| 39 | $name = $name ?? $this->defaultConnectionName; |
||
| 40 | |||
| 41 | if (! $this->container->has($name)) { |
||
| 42 | throw new InvalidArgumentException(sprintf('Connection with name "%s" does not exist.', $name)); |
||
| 43 | } |
||
| 44 | |||
| 45 | return $this->container->get($name); |
||
| 46 | } |
||
| 70 |