| Total Complexity | 6 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 84.21% |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 7 | class Fallback |
||
| 8 | { |
||
| 9 | protected $country; |
||
| 10 | |||
| 11 | protected $language; |
||
| 12 | |||
| 13 | 1 | public function __construct(string $country, string $language) |
|
| 14 | { |
||
| 15 | 1 | $country = trim($country); |
|
| 16 | |||
| 17 | 1 | if (!is_dir(__DIR__ . "/Providers/{$country}")) { |
|
| 18 | throw HolidaysPhpException::unsupportedCountry(); |
||
| 19 | } |
||
| 20 | |||
| 21 | 1 | $this->country = $country; |
|
| 22 | |||
| 23 | 1 | $this->language = trim($language); |
|
| 24 | 1 | } |
|
| 25 | |||
| 26 | 1 | public function holidays(int $year = null): array |
|
| 50 | } |
||
| 51 | } |
||
| 52 |