| Total Complexity | 6 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 11 | final class DigraphStyle |
||
| 12 | { |
||
| 13 | private readonly string $theme; |
||
| 14 | |||
| 15 | 29 | public static function default(ThemeName $theme): DigraphStyle |
|
| 16 | { |
||
| 17 | 29 | return new DigraphStyle($theme, 'partials/_properties.html.twig', 'partials/_methods.html.twig'); |
|
| 18 | } |
||
| 19 | |||
| 20 | 3 | public static function withoutEmptyBlocks(ThemeName $theme): DigraphStyle |
|
| 21 | { |
||
| 22 | 3 | return new DigraphStyle($theme, 'partials/_empty-properties.html.twig', 'partials/_empty-methods.html.twig'); |
|
| 23 | } |
||
| 24 | |||
| 25 | 32 | private function __construct( |
|
| 26 | ThemeName $theme, |
||
| 27 | private readonly string $properties, |
||
| 28 | private readonly string $methods |
||
| 29 | ) { |
||
| 30 | 32 | $this->theme = "{$theme->name()}.html.twig"; |
|
|
|
|||
| 31 | } |
||
| 32 | |||
| 33 | 23 | public function properties(): string |
|
| 34 | { |
||
| 35 | 23 | return $this->properties; |
|
| 36 | } |
||
| 37 | |||
| 38 | 23 | public function methods(): string |
|
| 41 | } |
||
| 42 | |||
| 43 | 26 | public function theme(): string |
|
| 46 | } |
||
| 47 | } |
||
| 48 |