1 | <?php |
||
7 | class Size implements AttributeInterface |
||
8 | { |
||
9 | use DumpTrait; |
||
10 | |||
11 | /** |
||
12 | * @var int |
||
13 | */ |
||
14 | private $bit; |
||
15 | |||
16 | /** |
||
17 | * @param string|int $size |
||
18 | */ |
||
19 | 5 | public function __construct($size) |
|
20 | { |
||
21 | 5 | $this->bit = (int) $size; |
|
22 | 5 | } |
|
23 | |||
24 | /** |
||
25 | * @return int |
||
26 | */ |
||
27 | 1 | public function getBit(): int |
|
31 | |||
32 | /** |
||
33 | * @return string |
||
34 | */ |
||
35 | 1 | public function __toString(): string |
|
39 | } |
||
40 |