| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 44 | public function getConnection($name = null) |
||
| 45 | { |
||
| 46 | if (null === $name) { |
||
| 47 | $name = $this->defaultConnection; |
||
| 48 | } |
||
| 49 | |||
| 50 | if (!isset($this->connections[$name])) { |
||
| 51 | throw new \InvalidArgumentException(sprintf('Sphinxy Connection named "%s" does not exist.', $name)); |
||
| 52 | } |
||
| 53 | |||
| 54 | return $this->connections[$name]; |
||
| 55 | } |
||
| 56 | |||
| 77 |