| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | 6 | public function resolve(string $dsn): TransportInterface |
|
| 28 | { |
||
| 29 | 6 | $dsnDto = Dsn::fromString($dsn); |
|
| 30 | 6 | foreach ($this->transports as $transport) { |
|
| 31 | 2 | if ($transport->supports($dsnDto)) { |
|
| 32 | 1 | return $transport->create($dsnDto); |
|
| 33 | } |
||
| 34 | } |
||
| 35 | |||
| 36 | 5 | return $this->transport->fromString($dsn); |
|
| 37 | } |
||
| 44 |