php-kilo/src/Type/StatusMessage.php

16 lines
287 B
PHP

<?php declare(strict_types=1);
namespace Aviat\Kilo\Type;
class StatusMessage {
private function __construct(
public string $text,
public int $len,
public int $time,
) {}
public static function from(string $text): self
{
return new self($text, strlen($text), time());
}
}