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