Code Coverage
 
Classes and Traits
Functions and Methods
Lines
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 2
StatusMessage
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 2
6
0.00% covered (danger)
0.00%
0 / 2
 __construct
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 from
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
1<?php declare(strict_types=1);
2
3namespace Aviat\Kilo\Type;
4
5class StatusMessage {
6    private function __construct(
7        public string $text,
8        public int $len,
9        public int $time,
10    ) {}
11
12    public static function from(string $text): self
13    {
14        return new self($text, strlen($text), time());
15    }
16}