| Total Complexity | 6 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class TransportResolver implements TransportResolverInterface, TransportRegistryInterface |
||
| 13 | { |
||
| 14 | /** @var TransportFactoryInterface[] */ |
||
| 15 | private array $transports = []; |
||
| 16 | |||
| 17 | 8 | public function __construct( |
|
| 18 | private readonly Transport $transport, |
||
| 19 | ) { |
||
| 20 | 8 | } |
|
| 21 | |||
| 22 | 3 | public function registerTransport(TransportFactoryInterface $factory): void |
|
| 23 | { |
||
| 24 | 3 | $this->transports[] = $factory; |
|
| 25 | } |
||
| 26 | |||
| 27 | 6 | public function resolve(string $dsn): TransportInterface |
|
| 37 | } |
||
| 38 | |||
| 39 | 1 | public function getTransports(): array |
|
| 44 |