| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Coverage | 77.78% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 7 | final class LocaleState |
||
| 8 | { |
||
| 9 | private string $language; |
||
| 10 | |||
| 11 | 122 | public function __construct(string $language = 'en') |
|
| 12 | { |
||
| 13 | 122 | $this->language = $language; |
|
| 14 | } |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Set the specified language code. |
||
| 18 | * |
||
| 19 | * @param string $language The language code. |
||
| 20 | * |
||
| 21 | * @return static |
||
| 22 | */ |
||
| 23 | 2 | public function setLanguage(string $language): self |
|
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Gets the language code. |
||
| 31 | * |
||
| 32 | * @return string The language code. |
||
| 33 | */ |
||
| 34 | 61 | public function getLanguage(): string |
|
| 35 | { |
||
| 36 | 61 | return $this->language; |
|
| 37 | } |
||
| 38 | |||
| 39 | public function __toString(): string |
||
| 42 | } |
||
| 43 | } |
||
| 44 |