| Total Complexity | 2 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class Flash |
||
| 11 | { |
||
| 12 | public string $type; |
||
| 13 | public string $message; |
||
| 14 | public string $contentType; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Flash constructor. |
||
| 18 | */ |
||
| 19 | 4 | public function __construct(string $type, string $message, string $contentType) |
|
| 20 | { |
||
| 21 | 4 | $this->type = $type; |
|
| 22 | 4 | $this->message = $message; |
|
| 23 | 4 | $this->contentType = $contentType; |
|
| 24 | 4 | } |
|
| 25 | |||
| 26 | /** |
||
| 27 | * Cast to associative array. |
||
| 28 | * |
||
| 29 | * @return array{type:string,message:string,contentType:string} |
||
| 30 | */ |
||
| 31 | 1 | public function toAssoc(): array |
|
| 37 | ]; |
||
| 38 | } |
||
| 40 |