| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 37 | 15 | public function getConnection($name = null) |
|
| 38 | { |
||
| 39 | 15 | if (null === $name) { |
|
| 40 | 5 | $name = $this->defaultConnection; |
|
| 41 | 4 | } |
|
| 42 | |||
| 43 | 15 | if (!isset($this->connections[$name])) { |
|
| 44 | 5 | throw new \InvalidArgumentException(sprintf('AMQP Connection named "%s" does not exist.', $name)); |
|
| 45 | } |
||
| 46 | |||
| 47 | 10 | return $this->connections[$name]; |
|
| 48 | } |
||
| 49 | |||
| 61 |