| Total Complexity | 3 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class ListDomainsAction extends AbstractRestAction |
||
| 17 | { |
||
| 18 | protected const ROUTE_PATH = '/domains'; |
||
| 19 | protected const ROUTE_ALLOWED_METHODS = [self::METHOD_GET]; |
||
| 20 | |||
| 21 | private DomainServiceInterface $domainService; |
||
| 22 | private string $defaultDomain; |
||
| 23 | |||
| 24 | 2 | public function __construct(DomainServiceInterface $domainService, string $defaultDomain) |
|
| 25 | { |
||
| 26 | 2 | $this->domainService = $domainService; |
|
| 27 | 2 | $this->defaultDomain = $defaultDomain; |
|
| 28 | 2 | } |
|
| 29 | |||
| 30 | 2 | public function handle(ServerRequestInterface $request): ResponseInterface |
|
| 39 | ], |
||
| 40 | ], |
||
| 41 | ]); |
||
| 42 | } |
||
| 43 | |||
| 44 | 2 | private function mapDomain(string $domain, bool $isDefault = false): array |
|
| 52 |