Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
9 / 9 |
|
100.00% |
9 / 9 |
CRAP | |
100.00% |
1 / 1 |
| HostRecord | |
100.00% |
9 / 9 |
|
100.00% |
9 / 9 |
11 | |
100.00% |
1 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getType | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getUrl | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getCreatedAt | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getUpdatedAt | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getLabel | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getDbPrefix | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
3 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace App\Domain\Host\Entity; |
| 6 | |
| 7 | class HostRecord |
| 8 | { |
| 9 | public function __construct( |
| 10 | private string $id, |
| 11 | private string $name, |
| 12 | private string $type, |
| 13 | private string $url, |
| 14 | private ?string $label, |
| 15 | private int $createdAt, |
| 16 | private int $updatedAt, |
| 17 | private ?string $dbPrefix = 'c01' |
| 18 | ) {} |
| 19 | |
| 20 | public function getId(): string |
| 21 | { |
| 22 | return $this->id; |
| 23 | } |
| 24 | |
| 25 | public function getName(): string |
| 26 | { |
| 27 | return $this->name; |
| 28 | } |
| 29 | |
| 30 | public function getType(): string |
| 31 | { |
| 32 | return $this->type; |
| 33 | } |
| 34 | |
| 35 | public function getUrl(): string |
| 36 | { |
| 37 | return $this->url; |
| 38 | } |
| 39 | |
| 40 | public function getCreatedAt(): int |
| 41 | { |
| 42 | return $this->createdAt; |
| 43 | } |
| 44 | |
| 45 | public function getUpdatedAt(): int |
| 46 | { |
| 47 | return $this->updatedAt; |
| 48 | } |
| 49 | |
| 50 | public function getLabel(): ?string |
| 51 | { |
| 52 | return $this->label; |
| 53 | } |
| 54 | |
| 55 | public function getDbPrefix(): string |
| 56 | { |
| 57 | return $this->dbPrefix !== null && trim($this->dbPrefix) !== '' ? trim($this->dbPrefix) : 'c01'; |
| 58 | } |
| 59 | } |