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