Total Complexity | 5 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | abstract class Style |
||
9 | { |
||
10 | public function __construct( |
||
11 | public readonly string $name, |
||
12 | public readonly ?int $width = null, |
||
13 | public readonly ?int $height = null, |
||
14 | public readonly bool $padding = false |
||
15 | ) { |
||
16 | $this->validate(); |
||
17 | } |
||
18 | |||
19 | |||
20 | public function extension(): ?string |
||
21 | { |
||
22 | return null; |
||
23 | } |
||
24 | |||
25 | private function validate(): void |
||
26 | { |
||
27 | $this->validateName(); |
||
28 | } |
||
29 | |||
30 | private function validateName(): void |
||
35 | ); |
||
36 | } |
||
37 | } |
||
38 | } |
||
39 |