| Total Complexity | 7 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class Language |
||
| 13 | { |
||
| 14 | 57 | public function __construct( |
|
| 15 | protected readonly ClientConfig $config, |
||
| 16 | ) |
||
| 17 | { |
||
| 18 | 57 | } |
|
| 19 | |||
| 20 | /** |
||
| 21 | * @param string $method |
||
| 22 | * @return array<string, string> |
||
| 23 | */ |
||
| 24 | 35 | public function getToQuery(string $method): array |
|
| 31 | } |
||
| 32 | |||
| 33 | 35 | protected function canAddLanguage(string $method): bool |
|
| 34 | { |
||
| 35 | 35 | return ('GET' == strtoupper($method)) && $this->config->getLanguage(); |
|
| 36 | } |
||
| 37 | |||
| 38 | 4 | public function getLanguage(): ?string |
|
| 41 | } |
||
| 42 | } |
||
| 43 |