| Total Complexity | 10 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | final class AuthConfig extends InjectableConfig |
||
| 22 | { |
||
| 23 | public const CONFIG = 'auth'; |
||
| 24 | |||
| 25 | protected $config = [ |
||
| 26 | 'defaultTransport' => '', |
||
| 27 | 'transports' => [] |
||
| 28 | ]; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @return string |
||
| 32 | */ |
||
| 33 | public function getDefaultTransport(): string |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return array |
||
| 40 | */ |
||
| 41 | public function getTransports(): array |
||
| 42 | { |
||
| 43 | $transports = []; |
||
| 44 | foreach ($this->config['transports'] as $name => $transport) { |
||
| 45 | if (is_object($transport) && !$transport instanceof Autowire) { |
||
| 46 | $transports[$name] = $transport; |
||
| 47 | continue; |
||
| 48 | } |
||
| 49 | |||
| 50 | $transports[$name] = $this->wire($transport); |
||
| 51 | } |
||
| 52 | |||
| 53 | return $transports; |
||
| 54 | } |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param mixed $item |
||
| 58 | * @return Autowire |
||
| 59 | * |
||
| 60 | * @throws ConfigException |
||
| 61 | */ |
||
| 62 | private function wire($item): Autowire |
||
| 77 | } |
||
| 78 | } |
||
| 79 |