| Total Complexity | 4 |
| Total Lines | 26 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class SingleConnectionProvider implements ConnectionProvider |
||
| 11 | { |
||
| 12 | /** @var Connection */ |
||
| 13 | private $connection; |
||
| 14 | |||
| 15 | /** @var string */ |
||
| 16 | private $defaultConnectionName; |
||
| 17 | |||
| 18 | public function __construct(Connection $connection, string $defaultConnectionName = 'default') |
||
| 19 | { |
||
| 20 | $this->connection = $connection; |
||
| 21 | $this->defaultConnectionName = $defaultConnectionName; |
||
| 22 | } |
||
| 23 | |||
| 24 | public function getDefaultConnection() : Connection |
||
| 25 | { |
||
| 26 | return $this->connection; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function getConnection(string $name) : Connection |
||
| 36 | } |
||
| 37 | } |
||
| 38 |