Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
Identifier
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 __toString
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace AqwSocketClient\Objects\Identifiers;
6
7use Override;
8use Psl\Type;
9use Stringable;
10
11abstract readonly class Identifier implements Stringable
12{
13    public function __construct(
14        public readonly int $value,
15    ) {
16        Type\positive_int()->assert($this->value);
17    }
18
19    #[Override]
20    public function __toString(): string
21    {
22        return (string) $this->value;
23    }
24}