| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | final class ThemeState |
||
| 13 | { |
||
| 14 | 130 | public function __construct( |
|
| 17 | 130 | } |
|
| 18 | |||
| 19 | /** |
||
| 20 | * Set the specified view theme. |
||
| 21 | * |
||
| 22 | * @param Theme|null $theme $theme The theme instance or `null` for reset theme. |
||
| 23 | */ |
||
| 24 | 1 | public function setTheme(?Theme $theme): self |
|
| 25 | { |
||
| 26 | 1 | $this->theme = $theme; |
|
| 27 | |||
| 28 | 1 | return $this; |
|
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Gets the theme instance, or `null` if no theme has been set. |
||
| 33 | * |
||
| 34 | * @return Theme|null The theme instance, or `null` if no theme has been set. |
||
| 35 | */ |
||
| 36 | 65 | public function getTheme(): ?Theme |
|
| 39 | } |
||
| 40 | } |
||
| 41 |