The doc comment float|int|numeric-string at position 4 could not be parsed: Unknown type name 'numeric-string' at position 4 in float|int|numeric-string.
Loading history...
25
*/
26
public function __construct(
27
private readonly float|int|string $number,
28
private readonly string $unit,
29
private readonly Units $units
30
) {
31
}
32
33
public function __toString(): string
34
{
35
return $this->as(Units::DEFAULT_LENGTH);
36
}
37
38
public function per(Unit|string $unit): NumberPerUnit
39
{
40
return new NumberPerUnit($this->number, $this->unit, $unit, $this->units);