| Total Complexity | 6 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 9 | final class Domain |
||
| 10 | { |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var Api\Domain |
||
| 14 | */ |
||
| 15 | private $domainApi; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param Api\Domain $domainApi |
||
| 19 | */ |
||
| 20 | public function __construct(Api\Domain $domainApi) |
||
| 21 | { |
||
| 22 | $this->domainApi = $domainApi; |
||
| 23 | } |
||
| 24 | |||
| 25 | public function create(Hostname $hostname, IP $ip): Entity\Domain |
||
| 26 | { |
||
| 27 | return $this->domainApi->create( |
||
| 28 | $hostname->domainName(), |
||
| 29 | $ip->getShortAddress() |
||
| 30 | ); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function delete(Hostname $hostname): void |
||
| 37 | ); |
||
| 38 | } |
||
| 39 | |||
| 40 | public function exists(Hostname $hostname): bool |
||
| 51 | } |
||
| 52 | } |