| Total Complexity | 6 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| 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 | public function __construct( |
||
| 18 | private readonly Transport $transport, |
||
| 19 | ) { |
||
| 20 | } |
||
| 21 | |||
| 22 | public function registerTransport(TransportFactoryInterface $factory): void |
||
| 23 | { |
||
| 24 | $this->transports[] = $factory; |
||
| 25 | } |
||
| 26 | |||
| 27 | public function resolve(string $dsn): TransportInterface |
||
| 37 | } |
||
| 38 | |||
| 39 | public function getTransports(): array |
||
| 44 |