| Total Complexity | 3 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Coverage | 66.67% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 5 | final class EmailForwarding implements DtoInterface |
||
| 6 | { |
||
| 7 | public string $type; |
||
| 8 | |||
| 9 | 1 | public function __construct(string $type = '') |
|
| 10 | { |
||
| 11 | 1 | $this->type = $type; |
|
| 12 | } |
||
| 13 | |||
| 14 | 1 | public static function fromArray(array $data): self |
|
| 15 | { |
||
| 16 | 1 | return new self( |
|
| 17 | 1 | $data['type'] ?? '' |
|
| 18 | 1 | ); |
|
| 19 | } |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @return array<string, string> |
||
| 23 | */ |
||
| 24 | public function jsonSerialize(): array |
||
| 28 | ]; |
||
| 29 | } |
||
| 30 | } |
||
| 31 |