Total Complexity | 6 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
13 | final class DigraphStyle |
||
14 | { |
||
15 | /** @var string */ |
||
16 | protected $theme; |
||
17 | |||
18 | protected string $attributes; |
||
19 | |||
20 | protected string $methods; |
||
21 | |||
22 | public static function default(ThemeName $theme): DigraphStyle |
||
23 | { |
||
24 | 114 | return new DigraphStyle($theme, 'partials/_attributes.html.twig', 'partials/_methods.html.twig'); |
|
25 | } |
||
26 | 114 | ||
27 | 114 | public static function withoutEmptyBlocks(ThemeName $theme): DigraphStyle |
|
28 | 114 | { |
|
29 | return new DigraphStyle($theme, 'partials/_empty-attributes.html.twig', 'partials/_empty-methods.html.twig'); |
||
30 | 90 | } |
|
31 | |||
32 | 90 | private function __construct(ThemeName $theme, string $attributesTemplate, string $methodsTemplate) |
|
33 | { |
||
34 | $this->theme = "{$theme->name()}.html.twig"; |
||
35 | 90 | $this->attributes = $attributesTemplate; |
|
36 | $this->methods = $methodsTemplate; |
||
37 | 90 | } |
|
38 | |||
39 | public function attributes(): string |
||
40 | 96 | { |
|
41 | return $this->attributes; |
||
42 | 96 | } |
|
43 | |||
44 | public function methods(): string |
||
47 | } |
||
48 | |||
49 | public function theme(): string |
||
52 | } |
||
53 | } |
||
54 |