From 8091e6dcd6f900c94fd5a2dc5a26d859a4ea3b8f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 16 Jan 2024 21:31:46 +0900 Subject: [PATCH 01/16] build:pin version of PHP CS Fixer to 3.46 as latest (3.47) release produces undesired changes Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index ca2d3ebea..ce7721da3 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ }, "require-dev": { "ext-intl": "*", - "friendsofphp/php-cs-fixer": "^2.19 || ^3.40", + "friendsofphp/php-cs-fixer": "^2.19 || 3.46", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.4", "phpstan/phpstan": "^1.10", From b25bca7020619e7de1e2936e835fe8cd781d623d Mon Sep 17 00:00:00 2001 From: Atte Pulkkinen <97888225+attepulkkinen@users.noreply.github.com> Date: Tue, 16 Jan 2024 15:01:19 +0200 Subject: [PATCH 02/16] Update methods visibility in multiple Providers (#332) * Update methods visibility in multiple Providers Methods in several providers including Switzerland, South Korea, and Luxembourg among others have been updated from private to protected. These changes allow for better extensibility and customization of the Yasumi library. The methods affected are those calculating specific holidays in the different regions. --- CHANGELOG.md | 4 ++ src/Yasumi/Provider/Argentina.php | 22 +++++------ src/Yasumi/Provider/Australia.php | 10 ++--- .../Australia/AustralianCapitalTerritory.php | 12 +++--- .../Provider/Australia/NewSouthWales.php | 8 ++-- .../Provider/Australia/NorthernTerritory.php | 8 ++-- src/Yasumi/Provider/Australia/Queensland.php | 4 +- .../Australia/Queensland/Brisbane.php | 2 +- .../Provider/Australia/SouthAustralia.php | 10 ++--- src/Yasumi/Provider/Australia/Tasmania.php | 6 +-- .../Australia/Tasmania/CentralNorth.php | 2 +- .../Australia/Tasmania/FlindersIsland.php | 2 +- .../Australia/Tasmania/KingIsland.php | 2 +- .../Provider/Australia/Tasmania/Northeast.php | 2 +- .../Provider/Australia/Tasmania/Northwest.php | 2 +- .../Tasmania/Northwest/CircularHead.php | 2 +- .../Provider/Australia/Tasmania/South.php | 2 +- .../Australia/Tasmania/South/Southeast.php | 2 +- src/Yasumi/Provider/Australia/Victoria.php | 12 +++--- .../Provider/Australia/WesternAustralia.php | 6 +-- src/Yasumi/Provider/Austria.php | 2 +- src/Yasumi/Provider/Austria/Carinthia.php | 2 +- src/Yasumi/Provider/Austria/Salzburg.php | 2 +- src/Yasumi/Provider/Austria/UpperAustria.php | 2 +- src/Yasumi/Provider/Brazil.php | 12 +++--- src/Yasumi/Provider/Canada.php | 10 ++--- src/Yasumi/Provider/Canada/Alberta.php | 2 +- src/Yasumi/Provider/Canada/Manitoba.php | 2 +- .../Canada/NewfoundlandAndLabrador.php | 4 +- src/Yasumi/Provider/Canada/NovaScotia.php | 2 +- .../Provider/Canada/PrinceEdwardIsland.php | 4 +- src/Yasumi/Provider/Canada/Quebec.php | 4 +- src/Yasumi/Provider/Canada/Saskatchewan.php | 2 +- src/Yasumi/Provider/Canada/Yukon.php | 4 +- src/Yasumi/Provider/Croatia.php | 10 ++--- src/Yasumi/Provider/CzechRepublic.php | 12 +++--- src/Yasumi/Provider/Denmark.php | 4 +- src/Yasumi/Provider/Estonia.php | 6 +-- src/Yasumi/Provider/Finland.php | 6 +-- src/Yasumi/Provider/France.php | 4 +- src/Yasumi/Provider/Georgia.php | 22 +++++------ src/Yasumi/Provider/Germany.php | 2 +- src/Yasumi/Provider/Germany/Berlin.php | 2 +- src/Yasumi/Provider/Germany/Brandenburg.php | 2 +- src/Yasumi/Provider/Germany/Bremen.php | 2 +- src/Yasumi/Provider/Germany/Hamburg.php | 2 +- src/Yasumi/Provider/Germany/LowerSaxony.php | 2 +- .../Germany/MecklenburgWesternPomerania.php | 2 +- src/Yasumi/Provider/Germany/Saxony.php | 4 +- src/Yasumi/Provider/Germany/SaxonyAnhalt.php | 2 +- .../Provider/Germany/SchleswigHolstein.php | 2 +- src/Yasumi/Provider/Germany/Thuringia.php | 4 +- src/Yasumi/Provider/Greece.php | 12 +++--- src/Yasumi/Provider/Ireland.php | 16 ++++---- src/Yasumi/Provider/Italy.php | 4 +- src/Yasumi/Provider/Japan.php | 38 +++++++++---------- src/Yasumi/Provider/Latvia.php | 6 +-- src/Yasumi/Provider/Lithuania.php | 8 ++-- src/Yasumi/Provider/Luxembourg.php | 4 +- src/Yasumi/Provider/Mexico.php | 18 ++++----- src/Yasumi/Provider/Netherlands.php | 14 +++---- src/Yasumi/Provider/NewZealand.php | 12 +++--- src/Yasumi/Provider/Norway.php | 2 +- src/Yasumi/Provider/Poland.php | 4 +- src/Yasumi/Provider/Portugal.php | 12 +++--- src/Yasumi/Provider/Romania.php | 14 +++---- src/Yasumi/Provider/Russia.php | 16 ++++---- src/Yasumi/Provider/Slovakia.php | 12 +++--- src/Yasumi/Provider/SouthAfrica.php | 20 +++++----- src/Yasumi/Provider/SouthKorea.php | 14 +++---- src/Yasumi/Provider/Spain.php | 4 +- src/Yasumi/Provider/Spain/Andalusia.php | 2 +- src/Yasumi/Provider/Spain/Asturias.php | 2 +- src/Yasumi/Provider/Spain/BalearicIslands.php | 2 +- src/Yasumi/Provider/Spain/BasqueCountry.php | 2 +- src/Yasumi/Provider/Spain/CanaryIslands.php | 2 +- src/Yasumi/Provider/Spain/Cantabria.php | 2 +- src/Yasumi/Provider/Spain/CastileAndLeon.php | 2 +- .../Provider/Spain/CastillaLaMancha.php | 2 +- src/Yasumi/Provider/Spain/Catalonia.php | 2 +- src/Yasumi/Provider/Spain/Ceuta.php | 2 +- .../Provider/Spain/CommunityOfMadrid.php | 2 +- src/Yasumi/Provider/Spain/Extremadura.php | 2 +- src/Yasumi/Provider/Spain/Galicia.php | 4 +- src/Yasumi/Provider/Spain/LaRioja.php | 2 +- src/Yasumi/Provider/Spain/RegionOfMurcia.php | 2 +- .../Provider/Spain/ValencianCommunity.php | 2 +- src/Yasumi/Provider/Sweden.php | 10 ++--- src/Yasumi/Provider/Switzerland.php | 2 +- src/Yasumi/Provider/Switzerland/Fribourg.php | 2 +- src/Yasumi/Provider/Switzerland/Geneva.php | 4 +- src/Yasumi/Provider/Switzerland/Glarus.php | 2 +- src/Yasumi/Provider/Switzerland/Jura.php | 2 +- src/Yasumi/Provider/Switzerland/Neuchatel.php | 6 +-- src/Yasumi/Provider/Switzerland/Obwalden.php | 2 +- src/Yasumi/Provider/Switzerland/Ticino.php | 2 +- src/Yasumi/Provider/Turkey.php | 12 +++--- src/Yasumi/Provider/USA.php | 20 +++++----- src/Yasumi/Provider/Ukraine.php | 14 +++---- src/Yasumi/Provider/UnitedKingdom.php | 6 +-- .../UnitedKingdom/NorthernIreland.php | 4 +- .../Provider/UnitedKingdom/Scotland.php | 6 +-- 102 files changed, 313 insertions(+), 309 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ef0d6d12..ea7c792d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ changes. ### Changed +- Holiday calculation methods in providers are now protected instead of private + to allow use in [custom providers](https://www.yasumi.dev/docs/cookbook/custom_provider/). + [\#331](https://github.com/azuyalabs/yasumi/issues/331) + ### Fixed ### Removed diff --git a/src/Yasumi/Provider/Argentina.php b/src/Yasumi/Provider/Argentina.php index 22a6252ad..8c2af555c 100644 --- a/src/Yasumi/Provider/Argentina.php +++ b/src/Yasumi/Provider/Argentina.php @@ -88,7 +88,7 @@ public function getSources(): array * * @see https://en.wikipedia.org/wiki/Brazilian_Carnival */ - private function addCarnvalHolidays(): void + protected function addCarnvalHolidays(): void { if ($this->year >= 1700) { $easter = $this->calculateEaster($this->year, $this->timezone); @@ -138,7 +138,7 @@ private function addCarnvalHolidays(): void * * @link https://en.wikipedia.org/wiki/Day_of_Remembrance_for_Truth_and_Justice */ - private function addRemembranceDay(): void + protected function addRemembranceDay(): void { if ($this->year >= 2006) { $this->addHoliday(new Holiday( @@ -164,7 +164,7 @@ private function addRemembranceDay(): void * * @link https://en.wikipedia.org/wiki/Malvinas_Day */ - private function addMalvinasDay(): void + protected function addMalvinasDay(): void { if ($this->year >= 1982) { $this->addHoliday(new Holiday( @@ -192,7 +192,7 @@ private function addMalvinasDay(): void * * @link https://en.wikipedia.org/wiki/First_National_Government */ - private function addMayRevolution(): void + protected function addMayRevolution(): void { if ($this->year >= 1810) { $this->addHoliday(new Holiday( @@ -213,7 +213,7 @@ private function addMayRevolution(): void * Anniversary of the death of Martín Miguel de Güemes, general of the * Argentine War of Independence. */ - private function addGeneralMartinMigueldeGuemesDay(): void + protected function addGeneralMartinMigueldeGuemesDay(): void { if ($this->year >= 1821) { $this->addHoliday(new Holiday( @@ -236,7 +236,7 @@ private function addGeneralMartinMigueldeGuemesDay(): void * * @link https://en.wikipedia.org/wiki/Flag_Day_(Argentina) */ - private function addFlagDay(): void + protected function addFlagDay(): void { if ($this->year >= 1938) { $this->addHoliday(new Holiday( @@ -258,7 +258,7 @@ private function addFlagDay(): void * * @link https://en.wikipedia.org/wiki/Argentine_Declaration_of_Independence */ - private function addIndependenceDay(): void + protected function addIndependenceDay(): void { if ($this->year >= self::PROCLAMATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday( @@ -279,7 +279,7 @@ private function addIndependenceDay(): void * Anniversary of the death of José de San Martín, liberator of * Argentina, Chile and Peru. */ - private function addGeneralJoseSanMartinDay(): void + protected function addGeneralJoseSanMartinDay(): void { if ($this->year >= 1850) { $this->addHoliday(new Holiday( @@ -302,7 +302,7 @@ private function addGeneralJoseSanMartinDay(): void * * @link https://en.wikipedia.org/wiki/Columbus_Day */ - private function addRaceDay(): void + protected function addRaceDay(): void { if ($this->year >= 1492) { $this->addHoliday(new Holiday( @@ -325,7 +325,7 @@ private function addRaceDay(): void * * @link https://en.wikipedia.org/wiki/National_Sovereignty_Day */ - private function addNationalSovereigntyDay(): void + protected function addNationalSovereigntyDay(): void { if ($this->year >= 2010) { $this->addHoliday(new Holiday( @@ -348,7 +348,7 @@ private function addNationalSovereigntyDay(): void * * @link https://en.wikipedia.org/wiki/Immaculate_Conception */ - private function addImmaculateConceptionDay(): void + protected function addImmaculateConceptionDay(): void { if ($this->year >= 1900) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index 16e559123..f599c3e7b 100644 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -77,7 +77,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNewYearHolidays(): void + protected function calculateNewYearHolidays(): void { $newYearsDay = new \DateTime("{$this->year}-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( @@ -129,7 +129,7 @@ private function calculateNewYearHolidays(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAustraliaDay(): void + protected function calculateAustraliaDay(): void { $date = new \DateTime("{$this->year}-01-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -172,7 +172,7 @@ private function calculateAustraliaDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAnzacDay(): void + protected function calculateAnzacDay(): void { if ($this->year < 1921) { return; @@ -217,7 +217,7 @@ private function calculateAnzacDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDayOfMourning(): void + protected function calculateNationalDayOfMourning(): void { if (2022 !== $this->year) { return; @@ -244,7 +244,7 @@ private function calculateNationalDayOfMourning(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateChristmasDay(): void + protected function calculateChristmasDay(): void { $christmasDay = new \DateTime("{$this->year}-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $boxingDay = new \DateTime("{$this->year}-12-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); diff --git a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php index 819cb723e..4e2957726 100644 --- a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php +++ b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php @@ -69,7 +69,7 @@ public function initialize(): void * * @throws \Exception */ - private function easterSunday( + protected function easterSunday( int $year, string $timezone, string $locale, @@ -101,7 +101,7 @@ private function easterSunday( * * @throws \Exception */ - private function easterSaturday( + protected function easterSaturday( int $year, string $timezone, string $locale, @@ -137,7 +137,7 @@ private function easterSaturday( * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { $this->addHoliday(new Holiday( 'queensBirthday', @@ -153,7 +153,7 @@ private function calculateQueensBirthday(): void * * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { $date = new \DateTime("first monday of october {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -165,7 +165,7 @@ private function calculateLabourDay(): void * * @throws \Exception */ - private function calculateCanberraDay(): void + protected function calculateCanberraDay(): void { $datePattern = $this->year < 2007 ? "third monday of march {$this->year}" : "second monday of march {$this->year}"; @@ -184,7 +184,7 @@ private function calculateCanberraDay(): void * * @throws \Exception */ - private function calculateReconciliationDay(): void + protected function calculateReconciliationDay(): void { if ($this->year < 2018) { return; diff --git a/src/Yasumi/Provider/Australia/NewSouthWales.php b/src/Yasumi/Provider/Australia/NewSouthWales.php index af4c71a6d..54366a841 100644 --- a/src/Yasumi/Provider/Australia/NewSouthWales.php +++ b/src/Yasumi/Provider/Australia/NewSouthWales.php @@ -68,7 +68,7 @@ public function initialize(): void * * @throws \Exception */ - private function easterSaturday( + protected function easterSaturday( int $year, string $timezone, string $locale, @@ -104,7 +104,7 @@ private function easterSaturday( * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { $this->addHoliday(new Holiday( 'queensBirthday', @@ -120,7 +120,7 @@ private function calculateQueensBirthday(): void * * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { $date = new \DateTime("first monday of october {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -133,7 +133,7 @@ private function calculateLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateBankHoliday(): void + protected function calculateBankHoliday(): void { $this->addHoliday(new Holiday( 'bankHoliday', diff --git a/src/Yasumi/Provider/Australia/NorthernTerritory.php b/src/Yasumi/Provider/Australia/NorthernTerritory.php index be4ca50eb..55c69d125 100644 --- a/src/Yasumi/Provider/Australia/NorthernTerritory.php +++ b/src/Yasumi/Provider/Australia/NorthernTerritory.php @@ -67,7 +67,7 @@ public function initialize(): void * * @throws \Exception */ - private function easterSaturday( + protected function easterSaturday( int $year, string $timezone, string $locale, @@ -103,7 +103,7 @@ private function easterSaturday( * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { $this->addHoliday(new Holiday( 'queensBirthday', @@ -119,7 +119,7 @@ private function calculateQueensBirthday(): void * * @throws \Exception */ - private function calculateMayDay(): void + protected function calculateMayDay(): void { $date = new \DateTime("first monday of may {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -134,7 +134,7 @@ private function calculateMayDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculatePicnicDay(): void + protected function calculatePicnicDay(): void { $this->addHoliday(new Holiday( 'picnicDay', diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index 8299eb353..0c6e38dc7 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -63,7 +63,7 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { $birthDay = 'first monday of october '.$this->year; @@ -85,7 +85,7 @@ private function calculateQueensBirthday(): void * * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { $date = new \DateTime("first monday of may {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); if (2013 === $this->year || 2014 === $this->year || 2015 === $this->year) { diff --git a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php index 538402938..b63d8f2dd 100644 --- a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php +++ b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php @@ -65,7 +65,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculatePeoplesDay(): void + protected function calculatePeoplesDay(): void { $date = new \DateTime('first friday of august '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($date->format('d') < 5) { diff --git a/src/Yasumi/Provider/Australia/SouthAustralia.php b/src/Yasumi/Provider/Australia/SouthAustralia.php index 75048026b..a08713fc0 100644 --- a/src/Yasumi/Provider/Australia/SouthAustralia.php +++ b/src/Yasumi/Provider/Australia/SouthAustralia.php @@ -75,7 +75,7 @@ public function initialize(): void * * @throws \Exception */ - private function easterSaturday( + protected function easterSaturday( int $year, string $timezone, string $locale, @@ -111,7 +111,7 @@ private function easterSaturday( * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { $this->addHoliday(new Holiday( 'queensBirthday', @@ -127,7 +127,7 @@ private function calculateQueensBirthday(): void * * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { $date = new \DateTime("first monday of october {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -142,7 +142,7 @@ private function calculateLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateAdelaideCupDay(): void + protected function calculateAdelaideCupDay(): void { if ($this->year >= 1973) { $cupDay = 'second monday of march '.$this->year; @@ -166,7 +166,7 @@ private function calculateAdelaideCupDay(): void * * @throws \Exception */ - private function calculateProclamationDay(): void + protected function calculateProclamationDay(): void { $christmasDay = new \DateTime("{$this->year}-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index 5ccb1900e..7d97aa80f 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -54,7 +54,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateEightHoursDay(): void + protected function calculateEightHoursDay(): void { $date = new \DateTime("second monday of march {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -76,7 +76,7 @@ private function calculateEightHoursDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { $this->addHoliday(new Holiday( 'queensBirthday', @@ -95,7 +95,7 @@ private function calculateQueensBirthday(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateRecreationDay(): void + protected function calculateRecreationDay(): void { $this->addHoliday(new Holiday( 'recreationDay', diff --git a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php index aaa45dcf4..3701c94b9 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php +++ b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php @@ -51,7 +51,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateDevonportShow(): void + protected function calculateDevonportShow(): void { $date = new \DateTime($this->year.'-12-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->modify('previous friday'); diff --git a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php index b4ee4ff8c..7f50e4579 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php @@ -51,7 +51,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateFlindersIslandShow(): void + protected function calculateFlindersIslandShow(): void { $date = new \DateTime('third saturday of october '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new \DateInterval('P1D')); diff --git a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php index b0c454540..78e4abc43 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php @@ -51,7 +51,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateKingIslandShow(): void + protected function calculateKingIslandShow(): void { $this->addHoliday(new Holiday( 'kingIslandShow', diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php index eceb3b804..b2aca1fd9 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php @@ -51,7 +51,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateLauncestonShow(): void + protected function calculateLauncestonShow(): void { $date = new \DateTime('second saturday of october '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new \DateInterval('P2D')); diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php index 80f3a372c..be6fe7582 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php @@ -51,7 +51,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateBurnieShow(): void + protected function calculateBurnieShow(): void { $date = new \DateTime('first saturday of october '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new \DateInterval('P1D')); diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php index 4c407c65b..160e966a0 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php @@ -51,7 +51,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateAGFEST(): void + protected function calculateAGFEST(): void { $date = new \DateTime('first thursday of may '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->add(new \DateInterval('P1D')); diff --git a/src/Yasumi/Provider/Australia/Tasmania/South.php b/src/Yasumi/Provider/Australia/Tasmania/South.php index c963147bd..512815daa 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South.php @@ -51,7 +51,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateHobartShow(): void + protected function calculateHobartShow(): void { $date = new \DateTime('fourth saturday of october '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new \DateInterval('P2D')); diff --git a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php index 76d224620..b489e4c53 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php @@ -54,7 +54,7 @@ public function initialize(): void * * @throws \Exception */ - private function calculateHobartRegatta(): void + protected function calculateHobartRegatta(): void { $this->addHoliday(new Holiday( 'hobartRegatta', diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index a6d6954e7..e0784de43 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -69,7 +69,7 @@ public function initialize(): void * * @throws \Exception */ - private function easterSunday( + protected function easterSunday( int $year, string $timezone, string $locale, @@ -101,7 +101,7 @@ private function easterSunday( * * @throws \Exception */ - private function easterSaturday( + protected function easterSaturday( int $year, string $timezone, string $locale, @@ -127,7 +127,7 @@ private function easterSaturday( * * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { $date = new \DateTime("second monday of march {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -149,7 +149,7 @@ private function calculateLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { $this->addHoliday(new Holiday( 'queensBirthday', @@ -165,7 +165,7 @@ private function calculateQueensBirthday(): void * * @throws \Exception */ - private function calculateMelbourneCupDay(): void + protected function calculateMelbourneCupDay(): void { $date = new \DateTime('first Tuesday of November'." {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -177,7 +177,7 @@ private function calculateMelbourneCupDay(): void * * @throws \Exception */ - private function calculateAFLGrandFinalDay(): void + protected function calculateAFLGrandFinalDay(): void { switch ($this->year) { case 2015: diff --git a/src/Yasumi/Provider/Australia/WesternAustralia.php b/src/Yasumi/Provider/Australia/WesternAustralia.php index 39f820f19..6727b2609 100644 --- a/src/Yasumi/Provider/Australia/WesternAustralia.php +++ b/src/Yasumi/Provider/Australia/WesternAustralia.php @@ -64,7 +64,7 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { $birthDay = 'last monday of september '.$this->year; if (2011 === $this->year) { @@ -89,7 +89,7 @@ private function calculateQueensBirthday(): void * * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { $date = new \DateTime("first monday of march {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -104,7 +104,7 @@ private function calculateLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateWesternAustraliaDay(): void + protected function calculateWesternAustraliaDay(): void { $this->addHoliday(new Holiday( 'westernAustraliaDay', diff --git a/src/Yasumi/Provider/Austria.php b/src/Yasumi/Provider/Austria.php index db259971f..1e3c5516b 100644 --- a/src/Yasumi/Provider/Austria.php +++ b/src/Yasumi/Provider/Austria.php @@ -116,7 +116,7 @@ protected function calculateStLeopoldsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDay(): void + protected function calculateNationalDay(): void { if ($this->year < 1955) { return; diff --git a/src/Yasumi/Provider/Austria/Carinthia.php b/src/Yasumi/Provider/Austria/Carinthia.php index ea5df7f89..b77b22d25 100644 --- a/src/Yasumi/Provider/Austria/Carinthia.php +++ b/src/Yasumi/Provider/Austria/Carinthia.php @@ -62,7 +62,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculatePlebisciteDay(): void + protected function calculatePlebisciteDay(): void { if ($this->year < 1920) { return; diff --git a/src/Yasumi/Provider/Austria/Salzburg.php b/src/Yasumi/Provider/Austria/Salzburg.php index 98f227606..89d422beb 100644 --- a/src/Yasumi/Provider/Austria/Salzburg.php +++ b/src/Yasumi/Provider/Austria/Salzburg.php @@ -63,7 +63,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStRupertsDay(): void + protected function calculateStRupertsDay(): void { if ($this->year < 710) { return; diff --git a/src/Yasumi/Provider/Austria/UpperAustria.php b/src/Yasumi/Provider/Austria/UpperAustria.php index fbb044643..7773c16d8 100644 --- a/src/Yasumi/Provider/Austria/UpperAustria.php +++ b/src/Yasumi/Provider/Austria/UpperAustria.php @@ -64,7 +64,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStFloriansDay(): void + protected function calculateStFloriansDay(): void { if ($this->year < 304) { return; diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index ea778e2c0..ebd7662cb 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -79,7 +79,7 @@ public function getSources(): array * * @link https://en.wikipedia.org/wiki/Proclamation_of_the_Republic_(Brazil) */ - private function calculateProclamationOfRepublicDay(): void + protected function calculateProclamationOfRepublicDay(): void { if ($this->year >= 1889) { $this->addHoliday(new Holiday( @@ -97,7 +97,7 @@ private function calculateProclamationOfRepublicDay(): void * * @link http://www.johninbrazil.org/all-souls-day-o-dia-dos-finados/ */ - private function calculateAllSoulsDay(): void + protected function calculateAllSoulsDay(): void { if ($this->year >= 1300) { $this->addHoliday(new Holiday( @@ -120,7 +120,7 @@ private function calculateAllSoulsDay(): void * * @link https://en.wikipedia.org/wiki/Our_Lady_of_Aparecida */ - private function calculateOurLadyOfAparecidaDay(): void + protected function calculateOurLadyOfAparecidaDay(): void { if ($this->year >= 1980) { $this->addHoliday(new Holiday( @@ -140,7 +140,7 @@ private function calculateOurLadyOfAparecidaDay(): void * * @link https://en.wikipedia.org/wiki/Independence_of_Brazil */ - private function calculateIndependenceDay(): void + protected function calculateIndependenceDay(): void { if ($this->year >= 1822) { $this->addHoliday(new Holiday( @@ -161,7 +161,7 @@ private function calculateIndependenceDay(): void * * @link https://en.wikipedia.org/wiki/Tiradentes */ - private function calculateTiradentesDay(): void + protected function calculateTiradentesDay(): void { if ($this->year >= 1792) { $this->addHoliday(new Holiday( @@ -181,7 +181,7 @@ private function calculateTiradentesDay(): void * * @link https://en.wikipedia.org/wiki/Brazilian_Carnival */ - private function calculateCarnival(): void + protected function calculateCarnival(): void { if ($this->year >= 1700) { $easter = $this->calculateEaster($this->year, $this->timezone); diff --git a/src/Yasumi/Provider/Canada.php b/src/Yasumi/Provider/Canada.php index e001f71f6..e376329fc 100644 --- a/src/Yasumi/Provider/Canada.php +++ b/src/Yasumi/Provider/Canada.php @@ -171,7 +171,7 @@ protected function calculateCivicHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCanadaDay(): void + protected function calculateCanadaDay(): void { if ($this->year < 1983) { return; @@ -197,7 +197,7 @@ private function calculateCanadaDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateThanksgivingDay(): void + protected function calculateThanksgivingDay(): void { if ($this->year < 1879) { return; @@ -220,7 +220,7 @@ private function calculateThanksgivingDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateRemembranceDay(): void + protected function calculateRemembranceDay(): void { if ($this->year < 1919) { return; @@ -243,7 +243,7 @@ private function calculateRemembranceDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { if ($this->year < 1894) { return; @@ -266,7 +266,7 @@ private function calculateLabourDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDayForTruthAndReconciliation(): void + protected function calculateNationalDayForTruthAndReconciliation(): void { if ($this->year < 2021) { return; diff --git a/src/Yasumi/Provider/Canada/Alberta.php b/src/Yasumi/Provider/Canada/Alberta.php index 1e44ef419..ef982cfa1 100644 --- a/src/Yasumi/Provider/Canada/Alberta.php +++ b/src/Yasumi/Provider/Canada/Alberta.php @@ -62,7 +62,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateHeritageDay(): void + protected function calculateHeritageDay(): void { if ($this->year < 1879) { return; diff --git a/src/Yasumi/Provider/Canada/Manitoba.php b/src/Yasumi/Provider/Canada/Manitoba.php index fe676a8ea..6cd9ee414 100644 --- a/src/Yasumi/Provider/Canada/Manitoba.php +++ b/src/Yasumi/Provider/Canada/Manitoba.php @@ -85,7 +85,7 @@ protected function calculateCivicHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateLouisRielDay(): void + protected function calculateLouisRielDay(): void { if ($this->year < 2008) { return; diff --git a/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php b/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php index 074456631..7df2a70b4 100644 --- a/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php +++ b/src/Yasumi/Provider/Canada/NewfoundlandAndLabrador.php @@ -69,7 +69,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStPatricksDay(): void + protected function calculateStPatricksDay(): void { if ($this->year < 1971) { return; @@ -113,7 +113,7 @@ private function calculateStPatricksDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateOrangemensDay(): void + protected function calculateOrangemensDay(): void { if ($this->year < 1926) { return; diff --git a/src/Yasumi/Provider/Canada/NovaScotia.php b/src/Yasumi/Provider/Canada/NovaScotia.php index dfa23b35a..b29307c28 100644 --- a/src/Yasumi/Provider/Canada/NovaScotia.php +++ b/src/Yasumi/Provider/Canada/NovaScotia.php @@ -85,7 +85,7 @@ protected function calculateCivicHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateHeritageDay(): void + protected function calculateHeritageDay(): void { if ($this->year < 2015) { return; diff --git a/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php b/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php index ba4e24383..e40d7f420 100644 --- a/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php +++ b/src/Yasumi/Provider/Canada/PrinceEdwardIsland.php @@ -62,7 +62,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateIslanderDay(): void + protected function calculateIslanderDay(): void { if ($this->year < 2009) { return; @@ -85,7 +85,7 @@ private function calculateIslanderDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateGoldCupParadeDay(): void + protected function calculateGoldCupParadeDay(): void { if ($this->year < 1962) { return; diff --git a/src/Yasumi/Provider/Canada/Quebec.php b/src/Yasumi/Provider/Canada/Quebec.php index fed6d481e..8d867ff22 100644 --- a/src/Yasumi/Provider/Canada/Quebec.php +++ b/src/Yasumi/Provider/Canada/Quebec.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function saintJeanBaptisteDay( + protected function saintJeanBaptisteDay( int $year, string $timezone, string $locale, @@ -97,7 +97,7 @@ private function saintJeanBaptisteDay( * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalPatriotsDay(): void + protected function calculateNationalPatriotsDay(): void { if ($this->year < 2003) { return; diff --git a/src/Yasumi/Provider/Canada/Saskatchewan.php b/src/Yasumi/Provider/Canada/Saskatchewan.php index f9c9c19da..85c8ad4f0 100644 --- a/src/Yasumi/Provider/Canada/Saskatchewan.php +++ b/src/Yasumi/Provider/Canada/Saskatchewan.php @@ -62,7 +62,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSaskatchewanDay(): void + protected function calculateSaskatchewanDay(): void { if ($this->year < 1879) { return; diff --git a/src/Yasumi/Provider/Canada/Yukon.php b/src/Yasumi/Provider/Canada/Yukon.php index 1e25d04f0..6a8d9437e 100644 --- a/src/Yasumi/Provider/Canada/Yukon.php +++ b/src/Yasumi/Provider/Canada/Yukon.php @@ -63,7 +63,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDiscoveryDay(): void + protected function calculateDiscoveryDay(): void { if ($this->year < 1897) { return; @@ -86,7 +86,7 @@ private function calculateDiscoveryDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateHeritageDay(): void + protected function calculateHeritageDay(): void { if ($this->year < 2009) { return; diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index 2f4cc8ab7..f8e0d0460 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -82,7 +82,7 @@ public function getSources(): array * * @throws \Exception */ - private function calculateStatehoodDay(): void + protected function calculateStatehoodDay(): void { if ($this->year >= 1991) { $statehoodDayDate = new \DateTime($this->year >= 2020 ? "{$this->year}-5-30" : "{$this->year}-6-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -99,7 +99,7 @@ private function calculateStatehoodDay(): void * * @throws \Exception */ - private function calculateHomelandThanksgivingDay(): void + protected function calculateHomelandThanksgivingDay(): void { $names = []; if ($this->year >= 1995 && $this->year < 2020) { @@ -127,7 +127,7 @@ private function calculateHomelandThanksgivingDay(): void * * @throws \Exception */ - private function calculateIndependenceDay(): void + protected function calculateIndependenceDay(): void { if ($this->year < 1991) { return; @@ -149,7 +149,7 @@ private function calculateIndependenceDay(): void * * @throws \Exception */ - private function calculateRemembranceDayForHomelandWarVictims(): void + protected function calculateRemembranceDayForHomelandWarVictims(): void { if ($this->year >= 2020) { $this->addHoliday(new Holiday('remembranceDay', [ @@ -162,7 +162,7 @@ private function calculateRemembranceDayForHomelandWarVictims(): void /* * Day of Antifascist Struggle */ - private function calculateAntiFascistsStruggleDay(): void + protected function calculateAntiFascistsStruggleDay(): void { if ($this->year >= 1941) { $this->addHoliday(new Holiday('antifascistStruggleDay', [ diff --git a/src/Yasumi/Provider/CzechRepublic.php b/src/Yasumi/Provider/CzechRepublic.php index 8486bebc8..066c76a4a 100644 --- a/src/Yasumi/Provider/CzechRepublic.php +++ b/src/Yasumi/Provider/CzechRepublic.php @@ -80,7 +80,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateRenewalOfCzechIndependenceDay(): void + protected function calculateRenewalOfCzechIndependenceDay(): void { $this->addHoliday(new Holiday( 'czechRenewalOfIndependentStateDay', @@ -113,7 +113,7 @@ private function calculateRenewalOfCzechIndependenceDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSaintsCyrilAndMethodiusDay(): void + protected function calculateSaintsCyrilAndMethodiusDay(): void { $this->addHoliday(new Holiday( 'saintsCyrilAndMethodiusDay', @@ -140,7 +140,7 @@ private function calculateSaintsCyrilAndMethodiusDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateJanHusDay(): void + protected function calculateJanHusDay(): void { $this->addHoliday(new Holiday( 'janHusDay', @@ -167,7 +167,7 @@ private function calculateJanHusDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCzechStatehoodDay(): void + protected function calculateCzechStatehoodDay(): void { $this->addHoliday(new Holiday( 'czechStateHoodDay', @@ -189,7 +189,7 @@ private function calculateCzechStatehoodDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateIndependentCzechoslovakStateDay(): void + protected function calculateIndependentCzechoslovakStateDay(): void { $this->addHoliday(new Holiday('independentCzechoslovakStateDay', [ 'cs' => 'Den vzniku samostatného československého státu', @@ -206,7 +206,7 @@ private function calculateIndependentCzechoslovakStateDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStruggleForFreedomAndDemocracyDay(): void + protected function calculateStruggleForFreedomAndDemocracyDay(): void { $this->addHoliday(new Holiday( 'struggleForFreedomAndDemocracyDay', diff --git a/src/Yasumi/Provider/Denmark.php b/src/Yasumi/Provider/Denmark.php index c43e5d0a5..407ed95e8 100644 --- a/src/Yasumi/Provider/Denmark.php +++ b/src/Yasumi/Provider/Denmark.php @@ -87,7 +87,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateGreatPrayerDay(): void + protected function calculateGreatPrayerDay(): void { $easter = $this->calculateEaster($this->year, $this->timezone)->format('Y-m-d'); @@ -122,7 +122,7 @@ private function calculateGreatPrayerDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateConstitutionDay(): void + protected function calculateConstitutionDay(): void { if ($this->year >= 1849) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Estonia.php b/src/Yasumi/Provider/Estonia.php index c986adf2a..75459f3b6 100644 --- a/src/Yasumi/Provider/Estonia.php +++ b/src/Yasumi/Provider/Estonia.php @@ -76,7 +76,7 @@ public function getSources(): array * @throws \InvalidArgumentException * @throws \Exception */ - private function addIndependenceDay(): void + protected function addIndependenceDay(): void { if ($this->year >= self::DECLARATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday('independenceDay', [ @@ -90,7 +90,7 @@ private function addIndependenceDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addVictoryDay(): void + protected function addVictoryDay(): void { if ($this->year >= self::VICTORY_DAY_START_YEAR) { $this->addHoliday(new Holiday('victoryDay', [ @@ -104,7 +104,7 @@ private function addVictoryDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addRestorationOfIndependenceDay(): void + protected function addRestorationOfIndependenceDay(): void { if ($this->year >= self::RESTORATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday('restorationOfIndependenceDay', [ diff --git a/src/Yasumi/Provider/Finland.php b/src/Yasumi/Provider/Finland.php index 5e205be56..ed76e5860 100644 --- a/src/Yasumi/Provider/Finland.php +++ b/src/Yasumi/Provider/Finland.php @@ -90,7 +90,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStJohnsDay(): void + protected function calculateStJohnsDay(): void { $stJohnsDay = $this->year < 1955 ? "{$this->year}-6-24" : "{$this->year}-6-20 this saturday"; @@ -123,7 +123,7 @@ private function calculateStJohnsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAllSaintsDay(): void + protected function calculateAllSaintsDay(): void { $this->addHoliday(new Holiday( 'allSaintsDay', @@ -150,7 +150,7 @@ private function calculateAllSaintsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateIndependenceDay(): void + protected function calculateIndependenceDay(): void { if ($this->year >= 1917) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php index 1a548a024..4957a7246 100644 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -93,7 +93,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateBastilleDay(): void + protected function calculateBastilleDay(): void { if ($this->year >= 1790) { $this->addHoliday(new Holiday('bastilleDay', [ @@ -115,7 +115,7 @@ private function calculateBastilleDay(): void * * @throws \Exception */ - private function calculatePentecostMonday(): void + protected function calculatePentecostMonday(): void { $type = Holiday::TYPE_OFFICIAL; diff --git a/src/Yasumi/Provider/Georgia.php b/src/Yasumi/Provider/Georgia.php index 129983392..2473fe625 100644 --- a/src/Yasumi/Provider/Georgia.php +++ b/src/Yasumi/Provider/Georgia.php @@ -87,7 +87,7 @@ protected function calculateEaster(int $year, string $timezone): \DateTimeInterf * @throws \InvalidArgumentException * @throws \Exception */ - private function addOrthodoxChristmasDay(): void + protected function addOrthodoxChristmasDay(): void { $date = new \DateTime("{$this->year}-01-07", new \DateTimeZone($this->timezone)); @@ -101,7 +101,7 @@ private function addOrthodoxChristmasDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addIndependenceDay(): void + protected function addIndependenceDay(): void { if ($this->year >= self::PROCLAMATION_OF_INDEPENDENCE_YEAR) { $date = new \DateTime("{$this->year}-05-26", new \DateTimeZone($this->timezone)); @@ -117,7 +117,7 @@ private function addIndependenceDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addUnityDay(): void + protected function addUnityDay(): void { if ($this->year >= self::APRIL_NINE_TRAGEDY_YEAR) { $date = new \DateTime("{$this->year}-04-09", new \DateTimeZone($this->timezone)); @@ -133,7 +133,7 @@ private function addUnityDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addMothersDay(): void + protected function addMothersDay(): void { $date = new \DateTime("{$this->year}-03-03", new \DateTimeZone($this->timezone)); @@ -147,7 +147,7 @@ private function addMothersDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addVictoryDay(): void + protected function addVictoryDay(): void { $date = new \DateTime("{$this->year}-05-09", new \DateTimeZone($this->timezone)); @@ -161,7 +161,7 @@ private function addVictoryDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addStAndrewsDay(): void + protected function addStAndrewsDay(): void { $date = new \DateTime("{$this->year}-05-12", new \DateTimeZone($this->timezone)); @@ -175,7 +175,7 @@ private function addStAndrewsDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addOrthodoxEpiphanyDay(): void + protected function addOrthodoxEpiphanyDay(): void { $date = new \DateTime("{$this->year}-01-19", new \DateTimeZone($this->timezone)); @@ -189,7 +189,7 @@ private function addOrthodoxEpiphanyDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addStMarysDay(): void + protected function addStMarysDay(): void { $date = new \DateTime("{$this->year}-08-28", new \DateTimeZone($this->timezone)); @@ -203,7 +203,7 @@ private function addStMarysDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addMtskhetobaDay(): void + protected function addMtskhetobaDay(): void { $date = new \DateTime("{$this->year}-10-14", new \DateTimeZone($this->timezone)); @@ -217,7 +217,7 @@ private function addMtskhetobaDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addStGeorgesDay(): void + protected function addStGeorgesDay(): void { $date = new \DateTime("{$this->year}-11-23", new \DateTimeZone($this->timezone)); @@ -231,7 +231,7 @@ private function addStGeorgesDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addSecondNewYearDay(): void + protected function addSecondNewYearDay(): void { $date = new \DateTime("{$this->year}-01-02", new \DateTimeZone($this->timezone)); diff --git a/src/Yasumi/Provider/Germany.php b/src/Yasumi/Provider/Germany.php index 654a4c2c2..272220569 100644 --- a/src/Yasumi/Provider/Germany.php +++ b/src/Yasumi/Provider/Germany.php @@ -90,7 +90,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateGermanUnityDay(): void + protected function calculateGermanUnityDay(): void { if ($this->year >= 1990) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Germany/Berlin.php b/src/Yasumi/Provider/Germany/Berlin.php index 092839582..0e398c858 100644 --- a/src/Yasumi/Provider/Germany/Berlin.php +++ b/src/Yasumi/Provider/Germany/Berlin.php @@ -74,7 +74,7 @@ public function initialize(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function dayOfLiberation( + protected function dayOfLiberation( string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL diff --git a/src/Yasumi/Provider/Germany/Brandenburg.php b/src/Yasumi/Provider/Germany/Brandenburg.php index ea4a63f1d..3e29945af 100644 --- a/src/Yasumi/Provider/Germany/Brandenburg.php +++ b/src/Yasumi/Provider/Germany/Brandenburg.php @@ -61,7 +61,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateReformationDay(): void + protected function calculateReformationDay(): void { if ($this->year < 1517) { return; diff --git a/src/Yasumi/Provider/Germany/Bremen.php b/src/Yasumi/Provider/Germany/Bremen.php index 074fa2c1d..3cff05a37 100644 --- a/src/Yasumi/Provider/Germany/Bremen.php +++ b/src/Yasumi/Provider/Germany/Bremen.php @@ -57,7 +57,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateReformationDay(): void + protected function calculateReformationDay(): void { if ($this->year < 2018) { return; diff --git a/src/Yasumi/Provider/Germany/Hamburg.php b/src/Yasumi/Provider/Germany/Hamburg.php index 019896fbf..538fc8d3a 100644 --- a/src/Yasumi/Provider/Germany/Hamburg.php +++ b/src/Yasumi/Provider/Germany/Hamburg.php @@ -58,7 +58,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDayOfReformation(): void + protected function calculateDayOfReformation(): void { if ($this->year < 2018) { return; diff --git a/src/Yasumi/Provider/Germany/LowerSaxony.php b/src/Yasumi/Provider/Germany/LowerSaxony.php index 5618cbc0a..8cf4bd770 100644 --- a/src/Yasumi/Provider/Germany/LowerSaxony.php +++ b/src/Yasumi/Provider/Germany/LowerSaxony.php @@ -60,7 +60,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateReformationDay(): void + protected function calculateReformationDay(): void { if ($this->year < 2018) { return; diff --git a/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php b/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php index 549c54542..34876641a 100644 --- a/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php +++ b/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php @@ -70,7 +70,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateReformationDay(): void + protected function calculateReformationDay(): void { if ($this->year < 1517) { return; diff --git a/src/Yasumi/Provider/Germany/Saxony.php b/src/Yasumi/Provider/Germany/Saxony.php index b98973c98..0c54143bb 100644 --- a/src/Yasumi/Provider/Germany/Saxony.php +++ b/src/Yasumi/Provider/Germany/Saxony.php @@ -60,7 +60,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateReformationDay(): void + protected function calculateReformationDay(): void { if ($this->year < 1517) { return; @@ -85,7 +85,7 @@ private function calculateReformationDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateRepentanceAndPrayerDay(): void + protected function calculateRepentanceAndPrayerDay(): void { if ($this->year >= 1995) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Germany/SaxonyAnhalt.php b/src/Yasumi/Provider/Germany/SaxonyAnhalt.php index 849038769..f33f1d61d 100644 --- a/src/Yasumi/Provider/Germany/SaxonyAnhalt.php +++ b/src/Yasumi/Provider/Germany/SaxonyAnhalt.php @@ -58,7 +58,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateReformationDay(): void + protected function calculateReformationDay(): void { if ($this->year < 1517) { return; diff --git a/src/Yasumi/Provider/Germany/SchleswigHolstein.php b/src/Yasumi/Provider/Germany/SchleswigHolstein.php index 253272611..f16a3526b 100644 --- a/src/Yasumi/Provider/Germany/SchleswigHolstein.php +++ b/src/Yasumi/Provider/Germany/SchleswigHolstein.php @@ -57,7 +57,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateReformationDay(): void + protected function calculateReformationDay(): void { if ($this->year < 2018) { return; diff --git a/src/Yasumi/Provider/Germany/Thuringia.php b/src/Yasumi/Provider/Germany/Thuringia.php index fa7adec4d..1555d0e3e 100644 --- a/src/Yasumi/Provider/Germany/Thuringia.php +++ b/src/Yasumi/Provider/Germany/Thuringia.php @@ -63,7 +63,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateReformationDay(): void + protected function calculateReformationDay(): void { if ($this->year < 1517) { return; @@ -77,7 +77,7 @@ private function calculateReformationDay(): void * * @throws \Exception */ - private function calculateWorldChildrensDay(): void + protected function calculateWorldChildrensDay(): void { if ($this->year < 2019) { return; diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index 1193eed7d..dd8aa353c 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -87,7 +87,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateThreeHolyHierarchs(): void + protected function calculateThreeHolyHierarchs(): void { $this->addHoliday(new Holiday( 'threeHolyHierarchs', @@ -111,7 +111,7 @@ private function calculateThreeHolyHierarchs(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCleanMonday(): void + protected function calculateCleanMonday(): void { $holiday = 'cleanMonday'; $date = $this->calculateEaster($this->year, $this->timezone)->sub(new \DateInterval('P48D')); @@ -132,7 +132,7 @@ private function calculateCleanMonday(): void * * @throws \Exception */ - private function calculateEaster(int $year, string $timezone): \DateTimeInterface + protected function calculateEaster(int $year, string $timezone): \DateTimeInterface { return $this->calculateOrthodoxEaster($year, $timezone); } @@ -148,7 +148,7 @@ private function calculateEaster(int $year, string $timezone): \DateTimeInterfac * @throws UnknownLocaleException * @throws \Exception */ - private function calculateIndependenceDay(): void + protected function calculateIndependenceDay(): void { if ($this->year >= 1821) { $this->addHoliday(new Holiday( @@ -171,7 +171,7 @@ private function calculateIndependenceDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateOhiDay(): void + protected function calculateOhiDay(): void { if ($this->year >= 1940) { $this->addHoliday(new Holiday( @@ -194,7 +194,7 @@ private function calculateOhiDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculatePolytechnio(): void + protected function calculatePolytechnio(): void { if ($this->year >= 1973) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index 998b8d401..6dd73c33f 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -99,7 +99,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNewYearsDay(): void + protected function calculateNewYearsDay(): void { if ($this->year < 1974) { return; @@ -134,7 +134,7 @@ private function calculateNewYearsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculatePentecostMonday(): void + protected function calculatePentecostMonday(): void { if ($this->year > 1973) { return; @@ -155,7 +155,7 @@ private function calculatePentecostMonday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateChristmasDay(): void + protected function calculateChristmasDay(): void { $holiday = new Holiday( 'christmasDay', @@ -193,7 +193,7 @@ private function calculateChristmasDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStStephensDay(): void + protected function calculateStStephensDay(): void { $holiday = new Holiday( 'stStephensDay', @@ -233,7 +233,7 @@ private function calculateStStephensDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStPatricksDay(): void + protected function calculateStPatricksDay(): void { if ($this->year < 1903) { return; @@ -276,7 +276,7 @@ private function calculateStPatricksDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateMayDay(): void + protected function calculateMayDay(): void { if ($this->year < 1994) { return; @@ -302,7 +302,7 @@ private function calculateMayDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateJuneHoliday(): void + protected function calculateJuneHoliday(): void { if ($this->year < 1974) { return; @@ -327,7 +327,7 @@ private function calculateJuneHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateOctoberHoliday(): void + protected function calculateOctoberHoliday(): void { if ($this->year < 1977) { return; diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index cab081509..8266fd9ab 100644 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -85,7 +85,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateLiberationDay(): void + protected function calculateLiberationDay(): void { if ($this->year >= 1949) { $this->addHoliday(new Holiday( @@ -111,7 +111,7 @@ private function calculateLiberationDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateRepublicDay(): void + protected function calculateRepublicDay(): void { if ($this->year >= 1946) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 3230f28f3..5070e9f53 100644 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -118,7 +118,7 @@ public function getSources(): array * * @throws \Exception */ - private function calculateNationalFoundationDay(): void + protected function calculateNationalFoundationDay(): void { if ($this->year >= 1966) { $this->addHoliday(new Holiday( @@ -138,7 +138,7 @@ private function calculateNationalFoundationDay(): void * * @throws \Exception */ - private function calculateShowaDay(): void + protected function calculateShowaDay(): void { if ($this->year >= 2007) { $this->addHoliday(new Holiday( @@ -158,7 +158,7 @@ private function calculateShowaDay(): void * * @throws \Exception */ - private function calculateConstitutionMemorialDay(): void + protected function calculateConstitutionMemorialDay(): void { if ($this->year >= 1948) { $this->addHoliday(new Holiday( @@ -178,7 +178,7 @@ private function calculateConstitutionMemorialDay(): void * * @throws \Exception */ - private function calculateChildrensDay(): void + protected function calculateChildrensDay(): void { if ($this->year >= 1948) { $this->addHoliday(new Holiday( @@ -198,7 +198,7 @@ private function calculateChildrensDay(): void * * @throws \Exception */ - private function calculateCultureDay(): void + protected function calculateCultureDay(): void { if ($this->year >= 1948) { $this->addHoliday(new Holiday( @@ -215,7 +215,7 @@ private function calculateCultureDay(): void * * @throws \Exception */ - private function calculateLaborThanksgivingDay(): void + protected function calculateLaborThanksgivingDay(): void { if ($this->year >= 1948) { $this->addHoliday(new Holiday( @@ -235,7 +235,7 @@ private function calculateLaborThanksgivingDay(): void * * @throws \Exception */ - private function calculateEmperorsBirthday(): void + protected function calculateEmperorsBirthday(): void { $emperorsBirthday = null; if ($this->year >= 2020) { @@ -269,7 +269,7 @@ private function calculateEmperorsBirthday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateVernalEquinoxDay(): void + protected function calculateVernalEquinoxDay(): void { $day = null; if ($this->year >= 1948 && $this->year <= 1979) { @@ -304,7 +304,7 @@ private function calculateVernalEquinoxDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateComingOfAgeDay(): void + protected function calculateComingOfAgeDay(): void { if ($this->year >= 1948) { $date = $this->year >= 2000 ? @@ -329,7 +329,7 @@ private function calculateComingOfAgeDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateGreeneryDay(): void + protected function calculateGreeneryDay(): void { $date = null; if ($this->year >= 2007) { @@ -358,7 +358,7 @@ private function calculateGreeneryDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateMarineDay(): void + protected function calculateMarineDay(): void { if (1996 > $this->year) { return; @@ -397,7 +397,7 @@ private function calculateMarineDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateMountainDay(): void + protected function calculateMountainDay(): void { $date = null; if (2021 === $this->year) { @@ -430,7 +430,7 @@ private function calculateMountainDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateRespectForTheAgeDay(): void + protected function calculateRespectForTheAgeDay(): void { $date = null; if ($this->year >= 2003) { @@ -459,7 +459,7 @@ private function calculateRespectForTheAgeDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSportsDay(): void + protected function calculateSportsDay(): void { $date = null; if (2021 === $this->year) { @@ -502,7 +502,7 @@ private function calculateSportsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAutumnalEquinoxDay(): void + protected function calculateAutumnalEquinoxDay(): void { $day = null; if ($this->year >= 1948 && $this->year <= 1979) { @@ -537,7 +537,7 @@ private function calculateAutumnalEquinoxDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSubstituteHolidays(): void + protected function calculateSubstituteHolidays(): void { // Get initial list of holiday dates $dates = $this->getHolidayDates(); @@ -584,7 +584,7 @@ private function calculateSubstituteHolidays(): void * * @throws \Exception */ - private function calculateCoronationDay(): void + protected function calculateCoronationDay(): void { if (2019 === $this->year) { $this->addHoliday(new Holiday( @@ -602,7 +602,7 @@ private function calculateCoronationDay(): void * * @throws \Exception */ - private function calculateEnthronementProclamationCeremony(): void + protected function calculateEnthronementProclamationCeremony(): void { if (2019 === $this->year) { $this->addHoliday(new Holiday( @@ -623,7 +623,7 @@ private function calculateEnthronementProclamationCeremony(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateBridgeHolidays(): void + protected function calculateBridgeHolidays(): void { // Get initial list of holidays and iterator $datesIterator = $this->getIterator(); diff --git a/src/Yasumi/Provider/Latvia.php b/src/Yasumi/Provider/Latvia.php index 4b3b6da3e..9afe8d51e 100644 --- a/src/Yasumi/Provider/Latvia.php +++ b/src/Yasumi/Provider/Latvia.php @@ -78,7 +78,7 @@ public function getSources(): array * @throws \InvalidArgumentException * @throws \Exception */ - private function addRestorationOfIndependenceDay(): void + protected function addRestorationOfIndependenceDay(): void { if ($this->year >= self::RESTORATION_OF_INDEPENDENCE_YEAR) { $date = new \DateTime("{$this->year}-05-04", new \DateTimeZone($this->timezone)); @@ -98,7 +98,7 @@ private function addRestorationOfIndependenceDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addMidsummerEveDay(): void + protected function addMidsummerEveDay(): void { $this->addHoliday(new Holiday('midsummerEveDay', [ 'en' => 'Midsummer Eve', @@ -113,7 +113,7 @@ private function addMidsummerEveDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addProclamationDay(): void + protected function addProclamationDay(): void { if ($this->year >= self::PROCLAMATION_OF_INDEPENDENCE_YEAR) { $date = new \DateTime("{$this->year}-11-18", new \DateTimeZone($this->timezone)); diff --git a/src/Yasumi/Provider/Lithuania.php b/src/Yasumi/Provider/Lithuania.php index 3827b8320..a840578f9 100644 --- a/src/Yasumi/Provider/Lithuania.php +++ b/src/Yasumi/Provider/Lithuania.php @@ -94,7 +94,7 @@ public function getSources(): array * @throws \InvalidArgumentException * @throws \Exception */ - private function addRestorationOfTheStateDay(): void + protected function addRestorationOfTheStateDay(): void { if ($this->year >= self::RESTORATION_OF_THE_STATE_YEAR) { $this->addHoliday(new Holiday('restorationOfTheStateOfLithuaniaDay', [ @@ -110,7 +110,7 @@ private function addRestorationOfTheStateDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addRestorationOfIndependenceDay(): void + protected function addRestorationOfIndependenceDay(): void { if ($this->year >= self::RESTORATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday('restorationOfIndependenceOfLithuaniaDay', [ @@ -127,7 +127,7 @@ private function addRestorationOfIndependenceDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addStatehoodDay(): void + protected function addStatehoodDay(): void { if ($this->year >= self::STATEHOOD_YEAR) { $this->addHoliday(new Holiday('statehoodDay', [ @@ -143,7 +143,7 @@ private function addStatehoodDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addAllSoulsDay(): void + protected function addAllSoulsDay(): void { if ($this->year >= self::ALL_SOULS_DAY) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Luxembourg.php b/src/Yasumi/Provider/Luxembourg.php index 9700b5b9e..b7214149e 100644 --- a/src/Yasumi/Provider/Luxembourg.php +++ b/src/Yasumi/Provider/Luxembourg.php @@ -81,7 +81,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateEuropeDay(): void + protected function calculateEuropeDay(): void { if ($this->year >= 2019) { $this->addHoliday(new Holiday('europeDay', [ @@ -106,7 +106,7 @@ private function calculateEuropeDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDay(): void + protected function calculateNationalDay(): void { $this->addHoliday(new Holiday('nationalDay', [ 'en_US' => 'National day', diff --git a/src/Yasumi/Provider/Mexico.php b/src/Yasumi/Provider/Mexico.php index 3beb222f2..d4bbffaff 100644 --- a/src/Yasumi/Provider/Mexico.php +++ b/src/Yasumi/Provider/Mexico.php @@ -92,7 +92,7 @@ public function getSources(): array * * @link https://en.wikipedia.org/wiki/Mexican_War_of_Independence */ - private function addIndependenceDay(): void + protected function addIndependenceDay(): void { if ($this->year >= 1810) { $this->addHoliday(new Holiday( @@ -112,7 +112,7 @@ private function addIndependenceDay(): void * * Anniversary of the Constitution of 1917, originally February 5, observed on the first Monday of February. */ - private function calculateConstitutionDay(): void + protected function calculateConstitutionDay(): void { if ($this->year >= 1917) { $this->addHoliday(new Holiday( @@ -131,7 +131,7 @@ private function calculateConstitutionDay(): void * * Anniversary of the birth of Benito Juárez on March 21, 1806, observed on the third Monday of March. */ - private function calculateBenitoJuarezBirthday(): void + protected function calculateBenitoJuarezBirthday(): void { if ($this->year >= 1806 && $this->year < 2010) { $this->addHoliday(new Holiday( @@ -161,7 +161,7 @@ private function calculateBenitoJuarezBirthday(): void * * Anniversary of the start of the Mexican Revolution on November 20, 1910, observed on the third Monday of November. */ - private function calculateRevolutionDay(): void + protected function calculateRevolutionDay(): void { if ($this->year >= 1910) { $this->addHoliday(new Holiday( @@ -180,7 +180,7 @@ private function calculateRevolutionDay(): void * * Anniversary of the Discovery of America on October 12, 1492, observed on the second Monday of October. */ - private function calculateDiscoveryOfAmerica(): void + protected function calculateDiscoveryOfAmerica(): void { if ($this->year >= 1492) { $this->addHoliday(new Holiday( @@ -200,7 +200,7 @@ private function calculateDiscoveryOfAmerica(): void * Christmas Eve is the day before Christmas Day, which is annually on December 24, according to the Gregorian * calendar. */ - private function calculateChristmasEve(): void + protected function calculateChristmasEve(): void { $this->addHoliday(new Holiday( 'christmasEve', @@ -217,7 +217,7 @@ private function calculateChristmasEve(): void * * New Year's Eve is the last day of the year, December 31, in the Gregorian calendar. */ - private function calculateNewYearsEve(): void + protected function calculateNewYearsEve(): void { $this->addHoliday(new Holiday( 'newYearsEve', @@ -235,7 +235,7 @@ private function calculateNewYearsEve(): void * Day of the Deaths is a Mexican holiday celebrated throughout Mexico, in particular the Central and South regions, * and by people of Mexican heritage elsewhere. */ - private function calculateDayOfTheDead(): void + protected function calculateDayOfTheDead(): void { if ($this->year >= 1800) { $this->addHoliday(new Holiday( @@ -255,7 +255,7 @@ private function calculateDayOfTheDead(): void * The Virgin of Guadalupe (Día de la Virgen de Guadalupe) is a celebration of the Virgin Mary, * who is the patron saint of Mexico. It is observed on December 12th. */ - private function calculateVirginOfGuadalupe(): void + protected function calculateVirginOfGuadalupe(): void { if ($this->year >= 1531) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 94003b53d..754e3e015 100644 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -101,7 +101,7 @@ public function getSources(): array * * @throws \Exception */ - private function calculateCarnival(): void + protected function calculateCarnival(): void { $easter = $this->calculateEaster($this->year, $this->timezone); @@ -140,7 +140,7 @@ private function calculateCarnival(): void * * @throws \Exception */ - private function calculateStNicholasDay(): void + protected function calculateStNicholasDay(): void { /* * St. Nicholas' Day @@ -166,7 +166,7 @@ private function calculateStNicholasDay(): void * * @throws \Exception */ - private function calculateHalloween(): void + protected function calculateHalloween(): void { $this->addHoliday(new Holiday( 'halloween', @@ -185,7 +185,7 @@ private function calculateHalloween(): void * * @throws \Exception */ - private function calculatePrincesDay(): void + protected function calculatePrincesDay(): void { $this->addHoliday(new Holiday( 'princesDay', @@ -205,7 +205,7 @@ private function calculatePrincesDay(): void * * @throws \Exception */ - private function calculateQueensday(): void + protected function calculateQueensday(): void { if ($this->year >= 1891 && $this->year <= 2013) { $date = new \DateTime("{$this->year}-4-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -235,7 +235,7 @@ private function calculateQueensday(): void * * @throws \Exception */ - private function calculateKingsday(): void + protected function calculateKingsday(): void { if ($this->year >= 2014) { $date = new \DateTime("{$this->year}-4-27", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -260,7 +260,7 @@ private function calculateKingsday(): void * * @throws \Exception */ - private function calculateCommemorationLiberationDay(): void + protected function calculateCommemorationLiberationDay(): void { if ($this->year >= 1947) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index 8f3261997..22fb45a6d 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -78,7 +78,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNewYearHolidays(): void + protected function calculateNewYearHolidays(): void { $newYearsDay = new \DateTime("{$this->year}-01-01", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $dayAfterNewYearsDay = new \DateTime("{$this->year}-01-02", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -117,7 +117,7 @@ private function calculateNewYearHolidays(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateWaitangiDay(): void + protected function calculateWaitangiDay(): void { if ($this->year < 1974) { return; @@ -146,7 +146,7 @@ private function calculateWaitangiDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAnzacDay(): void + protected function calculateAnzacDay(): void { if ($this->year < 1921) { return; @@ -178,7 +178,7 @@ private function calculateAnzacDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateQueensBirthday(): void + protected function calculateQueensBirthday(): void { if ($this->year < 1952) { return; @@ -210,7 +210,7 @@ private function calculateQueensBirthday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { if ($this->year < 1900) { return; @@ -238,7 +238,7 @@ private function calculateLabourDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateChristmasHolidays(): void + protected function calculateChristmasHolidays(): void { $christmasDay = new \DateTime("{$this->year}-12-25", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $boxingDay = new \DateTime("{$this->year}-12-26", DateTimeZoneFactory::getDateTimeZone($this->timezone)); diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index db911d959..894d5dc74 100644 --- a/src/Yasumi/Provider/Norway.php +++ b/src/Yasumi/Provider/Norway.php @@ -87,7 +87,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateConstitutionDay(): void + protected function calculateConstitutionDay(): void { if ($this->year >= 1836) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Poland.php b/src/Yasumi/Provider/Poland.php index 9c972386d..4c6e71d08 100644 --- a/src/Yasumi/Provider/Poland.php +++ b/src/Yasumi/Provider/Poland.php @@ -85,7 +85,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateIndependenceDay(): void + protected function calculateIndependenceDay(): void { if ($this->year < 1918) { return; @@ -111,7 +111,7 @@ private function calculateIndependenceDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateConstitutionDay(): void + protected function calculateConstitutionDay(): void { if ($this->year < 1791) { return; diff --git a/src/Yasumi/Provider/Portugal.php b/src/Yasumi/Provider/Portugal.php index 8f60e25d2..5199fc308 100644 --- a/src/Yasumi/Provider/Portugal.php +++ b/src/Yasumi/Provider/Portugal.php @@ -86,7 +86,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCarnationRevolutionDay(): void + protected function calculateCarnationRevolutionDay(): void { if ($this->year >= 1974) { $this->addHoliday(new Holiday( @@ -107,7 +107,7 @@ private function calculateCarnationRevolutionDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCorpusChristi(): void + protected function calculateCorpusChristi(): void { if ($this->year <= 2012 || $this->year >= 2016) { $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale)); @@ -131,7 +131,7 @@ private function calculateCorpusChristi(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculatePortugalDay(): void + protected function calculatePortugalDay(): void { if ($this->year <= 1932 || $this->year >= 1974) { $this->addHoliday(new Holiday( @@ -164,7 +164,7 @@ private function calculatePortugalDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculatePortugueseRepublicDay(): void + protected function calculatePortugueseRepublicDay(): void { if (($this->year >= 1910 && $this->year <= 2012) || $this->year >= 2016) { $this->addHoliday(new Holiday( @@ -184,7 +184,7 @@ private function calculatePortugueseRepublicDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAllSaintsDay(): void + protected function calculateAllSaintsDay(): void { if ($this->year <= 2012 || $this->year >= 2016) { $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); @@ -217,7 +217,7 @@ private function calculateAllSaintsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateRestorationOfIndependenceDay(): void + protected function calculateRestorationOfIndependenceDay(): void { // The Wikipedia article mentions that this has been a holiday since the second of half of the XIX century. if (($this->year >= 1850 && $this->year <= 2012) || $this->year >= 2016) { diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index ff0e00e27..b258d844d 100644 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -108,7 +108,7 @@ protected function calculateEaster(int $year, string $timezone): \DateTimeInterf * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDayAfterNewYearsDay(): void + protected function calculateDayAfterNewYearsDay(): void { $this->addHoliday(new Holiday( 'dayAfterNewYearsDay', @@ -131,7 +131,7 @@ private function calculateDayAfterNewYearsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateUnitedPrincipalitiesDay(): void + protected function calculateUnitedPrincipalitiesDay(): void { // The law is official since 21.12.2014. if ($this->year > 2014) { @@ -153,7 +153,7 @@ private function calculateUnitedPrincipalitiesDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStAndrewDay(): void + protected function calculateStAndrewDay(): void { if ($this->year >= 2012) { $this->addHoliday(new Holiday( @@ -180,7 +180,7 @@ private function calculateStAndrewDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDay(): void + protected function calculateNationalDay(): void { $nationalDay = null; @@ -216,7 +216,7 @@ private function calculateNationalDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStJohnsDay(): void + protected function calculateStJohnsDay(): void { if ($this->year >= 2024) { $this->addHoliday(new Holiday( @@ -239,7 +239,7 @@ private function calculateStJohnsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateConstantinBrancusiDay(): void + protected function calculateConstantinBrancusiDay(): void { if ($this->year >= 2016) { $this->addHoliday(new Holiday( @@ -267,7 +267,7 @@ private function calculateConstantinBrancusiDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateChildrensDay(): void + protected function calculateChildrensDay(): void { if ($this->year >= 1950 && $this->year <= 2016) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Russia.php b/src/Yasumi/Provider/Russia.php index 5c976d07a..8f9b94f13 100644 --- a/src/Yasumi/Provider/Russia.php +++ b/src/Yasumi/Provider/Russia.php @@ -72,7 +72,7 @@ public function getSources(): array * @throws \InvalidArgumentException * @throws \Exception */ - private function addNewYearsHolidays(): void + protected function addNewYearsHolidays(): void { $holidayDays = [2, 3, 4, 5, 6, 8]; @@ -88,7 +88,7 @@ private function addNewYearsHolidays(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addOrthodoxChristmasDay(): void + protected function addOrthodoxChristmasDay(): void { $this->addHoliday(new Holiday('orthodoxChristmasDay', [ 'en' => 'Orthodox Christmas Day', @@ -100,7 +100,7 @@ private function addOrthodoxChristmasDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addDefenceOfTheFatherlandDay(): void + protected function addDefenceOfTheFatherlandDay(): void { if ($this->year < self::DEFENCE_OF_THE_FATHERLAND_START_YEAR) { return; @@ -116,7 +116,7 @@ private function addDefenceOfTheFatherlandDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addInternationalWomensDay(): void + protected function addInternationalWomensDay(): void { $this->addHoliday($this->internationalWomensDay($this->year, $this->timezone, $this->locale)); } @@ -125,7 +125,7 @@ private function addInternationalWomensDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addSpringAndLabourDay(): void + protected function addSpringAndLabourDay(): void { $this->addHoliday(new Holiday('springAndLabourDay', [ 'en' => 'Spring and Labour Day', @@ -137,7 +137,7 @@ private function addSpringAndLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addVictoryDay(): void + protected function addVictoryDay(): void { $this->addHoliday(new Holiday('victoryDay', [ 'en' => 'Victory Day', @@ -149,7 +149,7 @@ private function addVictoryDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addRussiaDay(): void + protected function addRussiaDay(): void { if ($this->year < self::RUSSIA_DAY_START_YEAR) { return; @@ -165,7 +165,7 @@ private function addRussiaDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function addUnityDay(): void + protected function addUnityDay(): void { if ($this->year < self::UNITY_DAY_START_YEAR) { return; diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index 12f625531..62406f4d5 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -121,7 +121,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSlovakIndependenceDay(): void + protected function calculateSlovakIndependenceDay(): void { $this->addHoliday(new Holiday( 'slovakIndependenceDay', @@ -145,7 +145,7 @@ private function calculateSlovakIndependenceDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSaintsCyrilAndMethodiusDay(): void + protected function calculateSaintsCyrilAndMethodiusDay(): void { $this->addHoliday(new Holiday( 'saintsCyrilAndMethodiusDay', @@ -169,7 +169,7 @@ private function calculateSaintsCyrilAndMethodiusDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSlovakNationalUprisingDay(): void + protected function calculateSlovakNationalUprisingDay(): void { $this->addHoliday(new Holiday( 'slovakNationalUprisingDay', @@ -192,7 +192,7 @@ private function calculateSlovakNationalUprisingDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSlovakConstitutionDay(): void + protected function calculateSlovakConstitutionDay(): void { $this->addHoliday(new Holiday( 'slovakConstitutionDay', @@ -219,7 +219,7 @@ private function calculateSlovakConstitutionDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateOurLadyOfSorrowsDay(): void + protected function calculateOurLadyOfSorrowsDay(): void { $this->addHoliday(new Holiday('ourLadyOfSorrowsDay', [ 'sk' => 'Sviatok Sedembolestnej Panny Márie', @@ -236,7 +236,7 @@ private function calculateOurLadyOfSorrowsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStruggleForFreedomAndDemocracyDay(): void + protected function calculateStruggleForFreedomAndDemocracyDay(): void { $this->addHoliday(new Holiday( 'struggleForFreedomAndDemocracyDay', diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index 792af587f..42e14b406 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -101,7 +101,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateHumanRightsDay(): void + protected function calculateHumanRightsDay(): void { $this->addHoliday(new Holiday( 'humanRightsDay', @@ -122,7 +122,7 @@ private function calculateHumanRightsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateFamilyDay(): void + protected function calculateFamilyDay(): void { $this->addHoliday(new Holiday( 'familyDay', @@ -144,7 +144,7 @@ private function calculateFamilyDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateFreedomDay(): void + protected function calculateFreedomDay(): void { $this->addHoliday(new Holiday( 'freedomDay', @@ -170,7 +170,7 @@ private function calculateFreedomDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateYouthDay(): void + protected function calculateYouthDay(): void { $this->addHoliday(new Holiday( 'youthDay', @@ -192,7 +192,7 @@ private function calculateYouthDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculate2016MunicipalElectionsDay(): void + protected function calculate2016MunicipalElectionsDay(): void { if (2016 !== $this->year) { return; @@ -220,7 +220,7 @@ private function calculate2016MunicipalElectionsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalWomensDay(): void + protected function calculateNationalWomensDay(): void { $this->addHoliday(new Holiday( 'nationalWomensDay', @@ -244,7 +244,7 @@ private function calculateNationalWomensDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateHeritageDay(): void + protected function calculateHeritageDay(): void { $this->addHoliday(new Holiday( 'heritageDay', @@ -270,7 +270,7 @@ private function calculateHeritageDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDayOfReconciliation(): void + protected function calculateDayOfReconciliation(): void { $this->addHoliday(new Holiday( 'reconciliationDay', @@ -295,7 +295,7 @@ private function calculateDayOfReconciliation(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSubstituteDayOfGoodwill(): void + protected function calculateSubstituteDayOfGoodwill(): void { if (2016 !== $this->year) { return; @@ -319,7 +319,7 @@ private function calculateSubstituteDayOfGoodwill(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSubstituteHolidays(): void + protected function calculateSubstituteHolidays(): void { // Loop through all defined holidays foreach ($this->getHolidays() as $holiday) { diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 34f5b8280..4315758fc 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -725,7 +725,7 @@ protected function getTranslations(string $key, int $year): array * * @return array list of holidays */ - private function calculateBefore2013(int $year): array + protected function calculateBefore2013(int $year): array { $officialHolidays = []; @@ -797,7 +797,7 @@ private function calculateBefore2013(int $year): array * * @return array list of holidays */ - private function calculateCurrent(): array + protected function calculateCurrent(): array { return [ 'newYearsDay', @@ -832,7 +832,7 @@ private function calculateCurrent(): array * * @throws \Exception */ - private function calculateOldSubstituteHolidays(int $year): void + protected function calculateOldSubstituteHolidays(int $year): void { // Add substitute holidays by fixed entries. switch ($year) { @@ -891,7 +891,7 @@ private function calculateOldSubstituteHolidays(int $year): void * * @throws \Exception */ - private function calculateSubstituteHolidays(int $year): void + protected function calculateSubstituteHolidays(int $year): void { if ($year < 2023) { $this->calculateOldSubstituteHolidays($year); @@ -949,7 +949,7 @@ private function calculateSubstituteHolidays(int $year): void * * @return array> */ - private function calculateAcceptedSubstituteHolidays(int $year): array + protected function calculateAcceptedSubstituteHolidays(int $year): array { // List of holidays allowed for substitution. // This dictionary has key => value mappings. @@ -981,7 +981,7 @@ private function calculateAcceptedSubstituteHolidays(int $year): array /** * Helper method to find a first working day after specific date. */ - private function nextWorkingDay(\DateTime $date): \DateTime + protected function nextWorkingDay(\DateTime $date): \DateTime { $interval = new \DateInterval('P1D'); $next = clone $date; @@ -999,7 +999,7 @@ private function nextWorkingDay(\DateTime $date): \DateTime * * @throws \Exception */ - private function addSubstituteHoliday(?Holiday $origin, string $date_str): void + protected function addSubstituteHoliday(?Holiday $origin, string $date_str): void { if (! $origin instanceof Holiday) { return; diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index 9fcf2d270..d5cf10c35 100644 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -84,7 +84,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDay(): void + protected function calculateNationalDay(): void { if ($this->year >= 1981) { $this->addHoliday(new Holiday( @@ -112,7 +112,7 @@ private function calculateNationalDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateConstitutionDay(): void + protected function calculateConstitutionDay(): void { if ($this->year >= 1978) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/Andalusia.php b/src/Yasumi/Provider/Spain/Andalusia.php index 94af4cb13..64f24478e 100644 --- a/src/Yasumi/Provider/Spain/Andalusia.php +++ b/src/Yasumi/Provider/Spain/Andalusia.php @@ -71,7 +71,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAndalusiaDay(): void + protected function calculateAndalusiaDay(): void { if ($this->year >= 1980) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/Asturias.php b/src/Yasumi/Provider/Spain/Asturias.php index 94072c59b..96c7e91f0 100644 --- a/src/Yasumi/Provider/Spain/Asturias.php +++ b/src/Yasumi/Provider/Spain/Asturias.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAsturiasDay(): void + protected function calculateAsturiasDay(): void { if ($this->year >= 1984) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/BalearicIslands.php b/src/Yasumi/Provider/Spain/BalearicIslands.php index 05f6809c1..2d7bf331a 100644 --- a/src/Yasumi/Provider/Spain/BalearicIslands.php +++ b/src/Yasumi/Provider/Spain/BalearicIslands.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateBalearicIslandsDay(): void + protected function calculateBalearicIslandsDay(): void { if ($this->year >= 1983) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/BasqueCountry.php b/src/Yasumi/Provider/Spain/BasqueCountry.php index a75e88412..893f64fc1 100644 --- a/src/Yasumi/Provider/Spain/BasqueCountry.php +++ b/src/Yasumi/Provider/Spain/BasqueCountry.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateBasqueCountryDay(): void + protected function calculateBasqueCountryDay(): void { if ($this->year < 2011) { return; diff --git a/src/Yasumi/Provider/Spain/CanaryIslands.php b/src/Yasumi/Provider/Spain/CanaryIslands.php index aa800299a..807872a8c 100644 --- a/src/Yasumi/Provider/Spain/CanaryIslands.php +++ b/src/Yasumi/Provider/Spain/CanaryIslands.php @@ -72,7 +72,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCanaryIslandsDay(): void + protected function calculateCanaryIslandsDay(): void { if ($this->year >= 1984) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/Cantabria.php b/src/Yasumi/Provider/Spain/Cantabria.php index 0baa7dc34..e0cc05fa3 100644 --- a/src/Yasumi/Provider/Spain/Cantabria.php +++ b/src/Yasumi/Provider/Spain/Cantabria.php @@ -76,7 +76,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCantabriaDay(): void + protected function calculateCantabriaDay(): void { if ($this->year >= 1967) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/CastileAndLeon.php b/src/Yasumi/Provider/Spain/CastileAndLeon.php index 75326dacb..c959cf481 100644 --- a/src/Yasumi/Provider/Spain/CastileAndLeon.php +++ b/src/Yasumi/Provider/Spain/CastileAndLeon.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCastileAndLeonDay(): void + protected function calculateCastileAndLeonDay(): void { if ($this->year >= 1976) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/CastillaLaMancha.php b/src/Yasumi/Provider/Spain/CastillaLaMancha.php index cc80a91ee..cef46a150 100644 --- a/src/Yasumi/Provider/Spain/CastillaLaMancha.php +++ b/src/Yasumi/Provider/Spain/CastillaLaMancha.php @@ -76,7 +76,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCastillaLaManchaDay(): void + protected function calculateCastillaLaManchaDay(): void { if ($this->year >= 1984) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/Catalonia.php b/src/Yasumi/Provider/Spain/Catalonia.php index 285a3b431..ce27fab50 100644 --- a/src/Yasumi/Provider/Spain/Catalonia.php +++ b/src/Yasumi/Provider/Spain/Catalonia.php @@ -76,7 +76,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDayOfCatalonia(): void + protected function calculateNationalDayOfCatalonia(): void { if ($this->year >= 1886) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/Ceuta.php b/src/Yasumi/Provider/Spain/Ceuta.php index 227c1be29..b657b5ab1 100644 --- a/src/Yasumi/Provider/Spain/Ceuta.php +++ b/src/Yasumi/Provider/Spain/Ceuta.php @@ -70,7 +70,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDayOfCeuta(): void + protected function calculateDayOfCeuta(): void { if ($this->year >= 1416) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php index 94bdf57fa..0f465007b 100644 --- a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php +++ b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php @@ -77,7 +77,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDosdeMayoUprisingDay(): void + protected function calculateDosdeMayoUprisingDay(): void { $this->addHoliday(new Holiday( 'dosdeMayoUprisingDay', diff --git a/src/Yasumi/Provider/Spain/Extremadura.php b/src/Yasumi/Provider/Spain/Extremadura.php index d877ee629..5be59e97d 100644 --- a/src/Yasumi/Provider/Spain/Extremadura.php +++ b/src/Yasumi/Provider/Spain/Extremadura.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDayOfExtremadura(): void + protected function calculateDayOfExtremadura(): void { if ($this->year >= 1985) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/Galicia.php b/src/Yasumi/Provider/Spain/Galicia.php index 4b4d9d3c8..fd885ecd6 100644 --- a/src/Yasumi/Provider/Spain/Galicia.php +++ b/src/Yasumi/Provider/Spain/Galicia.php @@ -74,7 +74,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateGalicianLiteratureDay(): void + protected function calculateGalicianLiteratureDay(): void { if ($this->year >= 1991) { $this->addHoliday(new Holiday('galicianLiteratureDay', [ @@ -101,7 +101,7 @@ private function calculateGalicianLiteratureDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStJamesDay(): void + protected function calculateStJamesDay(): void { if ($this->year >= 2000) { $this->addHoliday(new Holiday('stJamesDay', [ diff --git a/src/Yasumi/Provider/Spain/LaRioja.php b/src/Yasumi/Provider/Spain/LaRioja.php index 5fe8b01c9..2aaa82c66 100644 --- a/src/Yasumi/Provider/Spain/LaRioja.php +++ b/src/Yasumi/Provider/Spain/LaRioja.php @@ -70,7 +70,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateLaRiojaDay(): void + protected function calculateLaRiojaDay(): void { if ($this->year >= 1983) { $this->addHoliday(new Holiday('laRiojaDay', [ diff --git a/src/Yasumi/Provider/Spain/RegionOfMurcia.php b/src/Yasumi/Provider/Spain/RegionOfMurcia.php index 05b32d4a8..8536eade4 100644 --- a/src/Yasumi/Provider/Spain/RegionOfMurcia.php +++ b/src/Yasumi/Provider/Spain/RegionOfMurcia.php @@ -71,7 +71,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDayOfMurcia(): void + protected function calculateDayOfMurcia(): void { if ($this->year >= 1983) { $this->addHoliday(new Holiday('murciaDay', [ diff --git a/src/Yasumi/Provider/Spain/ValencianCommunity.php b/src/Yasumi/Provider/Spain/ValencianCommunity.php index 116644721..0f164de97 100644 --- a/src/Yasumi/Provider/Spain/ValencianCommunity.php +++ b/src/Yasumi/Provider/Spain/ValencianCommunity.php @@ -78,7 +78,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateValencianCommunityDay(): void + protected function calculateValencianCommunityDay(): void { if ($this->year >= 1239) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index 8d2c62f56..7271efefc 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -91,7 +91,7 @@ public function getSources(): array * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateEpiphanyEve(): void + protected function calculateEpiphanyEve(): void { $this->addHoliday(new Holiday( 'epiphanyEve', @@ -117,7 +117,7 @@ private function calculateEpiphanyEve(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateWalpurgisEve(): void + protected function calculateWalpurgisEve(): void { $this->addHoliday(new Holiday( 'walpurgisEve', @@ -146,7 +146,7 @@ private function calculateWalpurgisEve(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStJohnsHolidays(): void + protected function calculateStJohnsHolidays(): void { $date = new \DateTime("{$this->year}-6-20 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( @@ -186,7 +186,7 @@ private function calculateStJohnsHolidays(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateAllSaintsHolidays(): void + protected function calculateAllSaintsHolidays(): void { $date = new \DateTime("{$this->year}-10-31 this saturday", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday( @@ -219,7 +219,7 @@ private function calculateAllSaintsHolidays(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDay(): void + protected function calculateNationalDay(): void { if ($this->year < 1916) { return; diff --git a/src/Yasumi/Provider/Switzerland.php b/src/Yasumi/Provider/Switzerland.php index a10be9c7c..cf9e30639 100644 --- a/src/Yasumi/Provider/Switzerland.php +++ b/src/Yasumi/Provider/Switzerland.php @@ -126,7 +126,7 @@ protected function calculateBettagsMontag(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNationalDay(): void + protected function calculateNationalDay(): void { $translations = [ 'en' => 'National Day', diff --git a/src/Yasumi/Provider/Switzerland/Fribourg.php b/src/Yasumi/Provider/Switzerland/Fribourg.php index 2f2540a8f..70675aad5 100644 --- a/src/Yasumi/Provider/Switzerland/Fribourg.php +++ b/src/Yasumi/Provider/Switzerland/Fribourg.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDecember26th(): void + protected function calculateDecember26th(): void { $this->addHoliday(new Holiday( 'december26th', diff --git a/src/Yasumi/Provider/Switzerland/Geneva.php b/src/Yasumi/Provider/Switzerland/Geneva.php index aaa621319..44f97125a 100644 --- a/src/Yasumi/Provider/Switzerland/Geneva.php +++ b/src/Yasumi/Provider/Switzerland/Geneva.php @@ -72,7 +72,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateJeuneGenevois(): void + protected function calculateJeuneGenevois(): void { if (self::JEUNE_GENEVOIS_ESTABLISHMENT_YEAR > $this->year) { return; @@ -107,7 +107,7 @@ private function calculateJeuneGenevois(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateRestaurationGenevoise(): void + protected function calculateRestaurationGenevoise(): void { if ($this->year > 1813) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Switzerland/Glarus.php b/src/Yasumi/Provider/Switzerland/Glarus.php index 1f07bfde8..a364d9516 100644 --- a/src/Yasumi/Provider/Switzerland/Glarus.php +++ b/src/Yasumi/Provider/Switzerland/Glarus.php @@ -72,7 +72,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNafelserFahrt(): void + protected function calculateNafelserFahrt(): void { if ($this->year >= 1389) { $date = new \DateTime('First Thursday of '.$this->year.'-04', DateTimeZoneFactory::getDateTimeZone($this->timezone)); diff --git a/src/Yasumi/Provider/Switzerland/Jura.php b/src/Yasumi/Provider/Switzerland/Jura.php index c2bae96ef..d6de391cf 100644 --- a/src/Yasumi/Provider/Switzerland/Jura.php +++ b/src/Yasumi/Provider/Switzerland/Jura.php @@ -79,7 +79,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculatePlebisciteJurassien(): void + protected function calculatePlebisciteJurassien(): void { if ($this->year > 1974) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Switzerland/Neuchatel.php b/src/Yasumi/Provider/Switzerland/Neuchatel.php index 4b8a73472..4b77c92dd 100644 --- a/src/Yasumi/Provider/Switzerland/Neuchatel.php +++ b/src/Yasumi/Provider/Switzerland/Neuchatel.php @@ -86,7 +86,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateInstaurationRepublique(): void + protected function calculateInstaurationRepublique(): void { if ($this->year > 1848) { $this->addHoliday(new Holiday( @@ -108,7 +108,7 @@ private function calculateInstaurationRepublique(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateJanuary2nd(): void + protected function calculateJanuary2nd(): void { $this->addHoliday(new Holiday( 'january2nd', @@ -129,7 +129,7 @@ private function calculateJanuary2nd(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDecember26th(): void + protected function calculateDecember26th(): void { $this->addHoliday(new Holiday( 'december26th', diff --git a/src/Yasumi/Provider/Switzerland/Obwalden.php b/src/Yasumi/Provider/Switzerland/Obwalden.php index af8ed96c3..8ba26a4fb 100644 --- a/src/Yasumi/Provider/Switzerland/Obwalden.php +++ b/src/Yasumi/Provider/Switzerland/Obwalden.php @@ -76,7 +76,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateBruderKlausenFest(): void + protected function calculateBruderKlausenFest(): void { if ($this->year >= 1947) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Switzerland/Ticino.php b/src/Yasumi/Provider/Switzerland/Ticino.php index 22dd15f92..85380f091 100644 --- a/src/Yasumi/Provider/Switzerland/Ticino.php +++ b/src/Yasumi/Provider/Switzerland/Ticino.php @@ -82,7 +82,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStPeterPaul(): void + protected function calculateStPeterPaul(): void { $this->addHoliday(new Holiday( 'stPeterPaul', diff --git a/src/Yasumi/Provider/Turkey.php b/src/Yasumi/Provider/Turkey.php index d20194f14..8f344713e 100644 --- a/src/Yasumi/Provider/Turkey.php +++ b/src/Yasumi/Provider/Turkey.php @@ -59,7 +59,7 @@ public function getSources(): array /** * @throws \Exception */ - private function addLabourDay(): void + protected function addLabourDay(): void { $this->addHoliday(new Holiday('labourDay', [ 'tr' => 'Emek ve Dayanışma Günü', @@ -77,7 +77,7 @@ private function addLabourDay(): void * * @throws \Exception */ - private function addCommemorationOfAtaturk(): void + protected function addCommemorationOfAtaturk(): void { if (1920 > $this->year) { return; @@ -97,7 +97,7 @@ private function addCommemorationOfAtaturk(): void * * @throws \Exception */ - private function addNationalSovereigntyDay(): void + protected function addNationalSovereigntyDay(): void { if (1922 > $this->year) { return; @@ -123,7 +123,7 @@ private function addNationalSovereigntyDay(): void * * @throws \Exception */ - private function addDemocracyDay(): void + protected function addDemocracyDay(): void { if (2017 > $this->year) { return; @@ -142,7 +142,7 @@ private function addDemocracyDay(): void * * @throws \Exception */ - private function addVictoryDay(): void + protected function addVictoryDay(): void { if (1923 > $this->year) { return; @@ -172,7 +172,7 @@ private function addVictoryDay(): void * * @throws \Exception */ - private function addRepublicDay(): void + protected function addRepublicDay(): void { if (1924 > $this->year) { return; diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index d0255e145..c3edc1c22 100644 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -81,7 +81,7 @@ public function getSources(): array * * @throws \Exception */ - private function calculateMartinLutherKingday(): void + protected function calculateMartinLutherKingday(): void { if ($this->year >= 1986) { $this->addHoliday(new Holiday('martinLutherKingDay', [ @@ -105,7 +105,7 @@ private function calculateMartinLutherKingday(): void * * @throws \Exception */ - private function calculateWashingtonsBirthday(): void + protected function calculateWashingtonsBirthday(): void { if ($this->year >= 1879) { $date = new \DateTime("{$this->year}-2-22", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -130,7 +130,7 @@ private function calculateWashingtonsBirthday(): void * * @throws \Exception */ - private function calculateMemorialDay(): void + protected function calculateMemorialDay(): void { if ($this->year >= 1865) { $date = new \DateTime("{$this->year}-5-30", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -155,7 +155,7 @@ private function calculateMemorialDay(): void * * @throws \Exception */ - private function calculateJuneteenth(): void + protected function calculateJuneteenth(): void { if ($this->year >= 2021) { $date = new \DateTime("{$this->year}-6-19", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -200,7 +200,7 @@ private function calculateJuneteenth(): void * * @throws \Exception */ - private function calculateIndependenceDay(): void + protected function calculateIndependenceDay(): void { if ($this->year >= 1776) { $this->addHoliday(new Holiday('independenceDay', [ @@ -219,7 +219,7 @@ private function calculateIndependenceDay(): void * * @throws \Exception */ - private function calculateLabourDay(): void + protected function calculateLabourDay(): void { if ($this->year >= 1887) { $this->addHoliday(new Holiday( @@ -246,7 +246,7 @@ private function calculateLabourDay(): void * * @throws \Exception */ - private function calculateColumbusDay(): void + protected function calculateColumbusDay(): void { if ($this->year >= 1937) { $date = new \DateTime("{$this->year}-10-12", DateTimeZoneFactory::getDateTimeZone($this->timezone)); @@ -270,7 +270,7 @@ private function calculateColumbusDay(): void * * @throws \Exception */ - private function calculateVeteransDay(): void + protected function calculateVeteransDay(): void { if ($this->year >= 1919) { $name = $this->year < 1954 ? 'Armistice Day' : 'Veterans Day'; @@ -293,7 +293,7 @@ private function calculateVeteransDay(): void * * @throws \Exception */ - private function calculateThanksgivingDay(): void + protected function calculateThanksgivingDay(): void { if ($this->year >= 1863) { $this->addHoliday(new Holiday( @@ -317,7 +317,7 @@ private function calculateThanksgivingDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSubstituteHolidays(): void + protected function calculateSubstituteHolidays(): void { // Loop through all defined holidays foreach ($this->getHolidays() as $holiday) { diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 72caaf448..d08cb4cc3 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -127,7 +127,7 @@ protected function calculateEaster(int $year, string $timezone): \DateTimeInterf * @throws UnknownLocaleException * @throws \Exception */ - private function calculateChristmasDay(): void + protected function calculateChristmasDay(): void { $this->addHoliday(new Holiday( 'christmasDay', @@ -147,7 +147,7 @@ private function calculateChristmasDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSecondInternationalWorkersDay(): void + protected function calculateSecondInternationalWorkersDay(): void { if ($this->year >= 2018) { return; @@ -174,7 +174,7 @@ private function calculateSecondInternationalWorkersDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateVictoryDay(): void + protected function calculateVictoryDay(): void { $this->addHoliday(new Holiday( 'victoryDay', @@ -195,7 +195,7 @@ private function calculateVictoryDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateConstitutionDay(): void + protected function calculateConstitutionDay(): void { if ($this->year < 1996) { return; @@ -222,7 +222,7 @@ private function calculateConstitutionDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateIndependenceDay(): void + protected function calculateIndependenceDay(): void { if ($this->year < 1991) { return; @@ -250,7 +250,7 @@ private function calculateIndependenceDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateDefenderOfUkraineDay(): void + protected function calculateDefenderOfUkraineDay(): void { if ($this->year < 2015) { return; @@ -274,7 +274,7 @@ private function calculateDefenderOfUkraineDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateCatholicChristmasDay(): void + protected function calculateCatholicChristmasDay(): void { if ($this->year < 2017) { return; diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 223751e06..0a1851676 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -321,7 +321,7 @@ protected function calculateChristmasHolidays(?string $type = null): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNewYearsDay(): void + protected function calculateNewYearsDay(): void { // Before 1871 it was not an observed or statutory holiday if ($this->year < 1871) { @@ -358,7 +358,7 @@ private function calculateNewYearsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSummerBankHoliday(): void + protected function calculateSummerBankHoliday(): void { if ($this->year < 1871) { return; @@ -409,7 +409,7 @@ private function calculateSummerBankHoliday(): void * * @throws \Exception */ - private function calculateMotheringSunday(): void + protected function calculateMotheringSunday(): void { $date = $this->calculateEaster($this->year, $this->timezone); $date->sub(new \DateInterval('P3W')); diff --git a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php index 30310d851..87b98c7cf 100644 --- a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php +++ b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php @@ -67,7 +67,7 @@ public function initialize(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStPatricksDay(): void + protected function calculateStPatricksDay(): void { if ($this->year < 1971) { return; @@ -111,7 +111,7 @@ private function calculateStPatricksDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateBattleOfTheBoyne(): void + protected function calculateBattleOfTheBoyne(): void { if ($this->year < 1926) { return; diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index 2668258eb..258d26b93 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -80,7 +80,7 @@ public function getSources(): array * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSummerBankHoliday(): void + protected function calculateSummerBankHoliday(): void { if ($this->year < 1871) { return; @@ -109,7 +109,7 @@ private function calculateSummerBankHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNewYearsHolidays(): void + protected function calculateNewYearsHolidays(): void { // Before 1871 it was not an observed or statutory holiday if ($this->year < 1871) { @@ -169,7 +169,7 @@ private function calculateNewYearsHolidays(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateStAndrewsDay(): void + protected function calculateStAndrewsDay(): void { if ($this->year < 2007) { return; From 47acfc36b7e57a99fb4136c2bc9e8d96c5706d48 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 27 Jan 2024 00:16:55 +0900 Subject: [PATCH 03/16] build:Bump package versions to latest working versions Signed-off-by: Sacha Telgenhof --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index ce7721da3..e1519b520 100644 --- a/composer.json +++ b/composer.json @@ -40,12 +40,12 @@ }, "require-dev": { "ext-intl": "*", - "friendsofphp/php-cs-fixer": "^2.19 || 3.46", + "friendsofphp/php-cs-fixer": "^2.19 || 3.48", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.4", "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^8.5 || ^9.6", - "vimeo/psalm": "^5.16" + "vimeo/psalm": "^5.20" }, "suggest": { "ext-calendar": "For calculating the date of Easter" From 97534fb25e6582cec8ef9ed8d97d1c09f08e5379 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 31 Jan 2024 01:06:31 +0900 Subject: [PATCH 04/16] build: Use shared PHP CS Fixer config Signed-off-by: Sacha Telgenhof --- .php-cs-fixer.php | 25 ++----------------------- composer.json | 6 ++++-- 2 files changed, 6 insertions(+), 25 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 91d0df704..b84347c26 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -12,29 +12,8 @@ * * @author Sacha Telgenhof */ -$finder = PhpCsFixer\Finder::create()->in(__DIR__); -$config = new PhpCsFixer\Config(); -$config->setRiskyAllowed(true)->setRules([ - '@PER' => true, - '@Symfony' => true, - 'combine_consecutive_issets' => true, - 'combine_consecutive_unsets' => true, - 'explicit_string_variable' => true, - 'no_superfluous_elseif' => true, - 'no_superfluous_phpdoc_tags' => ['remove_inheritdoc' => true], - 'not_operator_with_successor_space' => true, - 'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true ], - 'ordered_class_elements' => true, - - // Risky - 'declare_strict_types' => true, - 'dir_constant' => true, - 'get_class_to_class_keyword' => true, - 'is_null' => true, - 'modernize_strpos' => true, - 'modernize_types_casting' => true, - 'self_accessor' => true, -])->setFinder($finder); +$config = new AzuyaLabs\PhpCsFixerConfig\Config(); +$config->getFinder()->in(__DIR__)->notPath('var'); return $config; diff --git a/composer.json b/composer.json index e1519b520..1b06f3622 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "azuyalabs/yasumi", - "description": "The easy PHP Library for calculating holidays.", + "description": "The easy PHP Library for calculating holidays", "license": "MIT", "type": "library", "keywords": [ @@ -40,6 +40,7 @@ }, "require-dev": { "ext-intl": "*", + "azuyalabs/php-cs-fixer-config": "^0.1", "friendsofphp/php-cs-fixer": "^2.19 || 3.48", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.4", @@ -72,7 +73,8 @@ "@phpstan", "@psalm" ], - "format": "./vendor/bin/php-cs-fixer fix", + "cs": "vendor/bin/php-cs-fixer fix -v --diff --dry-run", + "cs-fix": "vendor/bin/php-cs-fixer fix -v", "phan": "vendor/bin/phan -C", "phpstan": "vendor/bin/phpstan analyse", "psalm": "vendor/bin/psalm --threads=2", From 42a27798b0ee26e1db2f6e47fd5aaca4ff1037f5 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 10 Apr 2024 14:49:09 +0000 Subject: [PATCH 05/16] style: Fix code styling and formatting issues (#338) Using the latest version of the PHP CS configuration, update all source code to use the most recent code style and formatting rules. For the most part this updates the header comment and the strict type declaration. It should not have any affect on the working of the tests nor the main code. Signed-off-by: Sacha Telgenhof --- .php-cs-fixer.php | 14 ++++++-- composer.json | 3 +- examples/basic.php | 33 +++++++++++++------ examples/between_filter.php | 25 ++++++++++---- examples/custom_provider.php | 21 +++++++++--- examples/filters.php | 19 +++++++++-- phpinsights.php | 15 ++++++++- rector.php | 19 +++++++++-- src/Yasumi/Exception/Exception.php | 8 +++-- src/Yasumi/Exception/InvalidYearException.php | 8 +++-- .../Exception/MissingTranslationException.php | 8 +++-- .../Exception/ProviderNotFoundException.php | 8 +++-- .../Exception/UnknownLocaleException.php | 8 +++-- src/Yasumi/Filters/AbstractFilter.php | 8 +++-- src/Yasumi/Filters/BankHolidaysFilter.php | 8 +++-- src/Yasumi/Filters/BetweenFilter.php | 8 +++-- src/Yasumi/Filters/ObservedHolidaysFilter.php | 8 +++-- src/Yasumi/Filters/OfficialHolidaysFilter.php | 8 +++-- src/Yasumi/Filters/OnFilter.php | 8 +++-- src/Yasumi/Filters/OtherHolidaysFilter.php | 8 +++-- src/Yasumi/Filters/SeasonalHolidaysFilter.php | 8 +++-- src/Yasumi/Holiday.php | 10 +++--- src/Yasumi/Provider/AbstractProvider.php | 8 +++-- src/Yasumi/Provider/Argentina.php | 8 +++-- src/Yasumi/Provider/Australia.php | 8 +++-- .../Australia/AustralianCapitalTerritory.php | 14 ++++---- .../Provider/Australia/NewSouthWales.php | 12 ++++--- .../Provider/Australia/NorthernTerritory.php | 12 ++++--- src/Yasumi/Provider/Australia/Queensland.php | 12 ++++--- .../Australia/Queensland/Brisbane.php | 10 +++--- .../Provider/Australia/SouthAustralia.php | 14 ++++---- src/Yasumi/Provider/Australia/Tasmania.php | 12 ++++--- .../Australia/Tasmania/CentralNorth.php | 10 +++--- .../Australia/Tasmania/FlindersIsland.php | 10 +++--- .../Australia/Tasmania/KingIsland.php | 10 +++--- .../Provider/Australia/Tasmania/Northeast.php | 10 +++--- .../Provider/Australia/Tasmania/Northwest.php | 10 +++--- .../Tasmania/Northwest/CircularHead.php | 10 +++--- .../Provider/Australia/Tasmania/South.php | 10 +++--- .../Australia/Tasmania/South/Southeast.php | 10 +++--- src/Yasumi/Provider/Australia/Victoria.php | 12 ++++--- .../Provider/Australia/WesternAustralia.php | 12 ++++--- src/Yasumi/Provider/Austria.php | 12 ++++--- src/Yasumi/Provider/Austria/Burgenland.php | 8 +++-- src/Yasumi/Provider/Austria/Carinthia.php | 10 +++--- src/Yasumi/Provider/Austria/LowerAustria.php | 8 +++-- src/Yasumi/Provider/Austria/Salzburg.php | 10 +++--- src/Yasumi/Provider/Austria/Styria.php | 8 +++-- src/Yasumi/Provider/Austria/Tyrol.php | 8 +++-- src/Yasumi/Provider/Austria/UpperAustria.php | 10 +++--- src/Yasumi/Provider/Austria/Vienna.php | 8 +++-- src/Yasumi/Provider/Austria/Vorarlberg.php | 8 +++-- src/Yasumi/Provider/Belgium.php | 8 +++-- src/Yasumi/Provider/Bosnia.php | 8 +++-- src/Yasumi/Provider/Brazil.php | 8 +++-- src/Yasumi/Provider/Canada.php | 12 ++++--- src/Yasumi/Provider/Canada/Alberta.php | 8 +++-- .../Provider/Canada/BritishColumbia.php | 8 +++-- src/Yasumi/Provider/Canada/Manitoba.php | 8 +++-- src/Yasumi/Provider/Canada/NewBrunswick.php | 8 +++-- .../Canada/NewfoundlandAndLabrador.php | 12 ++++--- .../Provider/Canada/NorthwestTerritories.php | 8 +++-- src/Yasumi/Provider/Canada/NovaScotia.php | 8 +++-- src/Yasumi/Provider/Canada/Nunavut.php | 8 +++-- src/Yasumi/Provider/Canada/Ontario.php | 8 +++-- .../Provider/Canada/PrinceEdwardIsland.php | 8 +++-- src/Yasumi/Provider/Canada/Quebec.php | 8 +++-- src/Yasumi/Provider/Canada/Saskatchewan.php | 8 +++-- src/Yasumi/Provider/Canada/Yukon.php | 8 +++-- src/Yasumi/Provider/ChristianHolidays.php | 10 +++--- src/Yasumi/Provider/CommonHolidays.php | 8 +++-- src/Yasumi/Provider/Croatia.php | 8 +++-- src/Yasumi/Provider/CzechRepublic.php | 20 ++++++----- src/Yasumi/Provider/DateTimeZoneFactory.php | 8 +++-- src/Yasumi/Provider/Denmark.php | 8 +++-- src/Yasumi/Provider/Estonia.php | 8 +++-- src/Yasumi/Provider/Finland.php | 8 +++-- src/Yasumi/Provider/France.php | 8 +++-- src/Yasumi/Provider/France/BasRhin.php | 8 +++-- src/Yasumi/Provider/France/HautRhin.php | 8 +++-- src/Yasumi/Provider/France/Moselle.php | 8 +++-- src/Yasumi/Provider/Georgia.php | 8 +++-- src/Yasumi/Provider/Germany.php | 10 +++--- .../Provider/Germany/BadenWurttemberg.php | 8 +++-- src/Yasumi/Provider/Germany/Berlin.php | 9 +++-- src/Yasumi/Provider/Germany/Brandenburg.php | 9 +++-- src/Yasumi/Provider/Germany/Bremen.php | 9 +++-- src/Yasumi/Provider/Germany/Hamburg.php | 9 +++-- src/Yasumi/Provider/Germany/Hesse.php | 9 +++-- src/Yasumi/Provider/Germany/LowerSaxony.php | 9 +++-- .../Germany/MecklenburgWesternPomerania.php | 9 +++-- .../Provider/Germany/NorthRhineWestphalia.php | 9 +++-- .../Provider/Germany/RhinelandPalatinate.php | 9 +++-- src/Yasumi/Provider/Germany/Saarland.php | 9 +++-- src/Yasumi/Provider/Germany/Saxony.php | 9 +++-- src/Yasumi/Provider/Germany/SaxonyAnhalt.php | 9 +++-- .../Provider/Germany/SchleswigHolstein.php | 9 +++-- src/Yasumi/Provider/Germany/Thuringia.php | 9 +++-- src/Yasumi/Provider/Greece.php | 8 +++-- src/Yasumi/Provider/Hungary.php | 8 +++-- src/Yasumi/Provider/Ireland.php | 14 ++++---- src/Yasumi/Provider/Italy.php | 8 +++-- src/Yasumi/Provider/Japan.php | 10 +++--- src/Yasumi/Provider/Latvia.php | 8 +++-- src/Yasumi/Provider/Lithuania.php | 8 +++-- src/Yasumi/Provider/Luxembourg.php | 15 ++++++++- src/Yasumi/Provider/Mexico.php | 6 ++-- src/Yasumi/Provider/Netherlands.php | 8 +++-- src/Yasumi/Provider/NewZealand.php | 10 +++--- src/Yasumi/Provider/Norway.php | 8 +++-- src/Yasumi/Provider/Poland.php | 8 +++-- src/Yasumi/Provider/Portugal.php | 8 +++-- src/Yasumi/Provider/Romania.php | 12 ++++--- src/Yasumi/Provider/Russia.php | 10 +++--- src/Yasumi/Provider/Slovakia.php | 20 ++++++----- src/Yasumi/Provider/SouthAfrica.php | 20 ++++++----- src/Yasumi/Provider/SouthKorea.php | 10 +++--- src/Yasumi/Provider/Spain.php | 8 +++-- src/Yasumi/Provider/Spain/Andalusia.php | 9 +++-- src/Yasumi/Provider/Spain/Aragon.php | 9 +++-- src/Yasumi/Provider/Spain/Asturias.php | 9 +++-- src/Yasumi/Provider/Spain/BalearicIslands.php | 9 +++-- src/Yasumi/Provider/Spain/BasqueCountry.php | 9 +++-- src/Yasumi/Provider/Spain/CanaryIslands.php | 9 +++-- src/Yasumi/Provider/Spain/Cantabria.php | 9 +++-- src/Yasumi/Provider/Spain/CastileAndLeon.php | 8 +++-- .../Provider/Spain/CastillaLaMancha.php | 8 +++-- src/Yasumi/Provider/Spain/Catalonia.php | 9 +++-- src/Yasumi/Provider/Spain/Ceuta.php | 9 +++-- .../Provider/Spain/CommunityOfMadrid.php | 9 +++-- src/Yasumi/Provider/Spain/Extremadura.php | 9 +++-- src/Yasumi/Provider/Spain/Galicia.php | 9 +++-- src/Yasumi/Provider/Spain/LaRioja.php | 9 +++-- src/Yasumi/Provider/Spain/Melilla.php | 9 +++-- src/Yasumi/Provider/Spain/RegionOfMurcia.php | 9 +++-- .../Provider/Spain/ValencianCommunity.php | 9 +++-- src/Yasumi/Provider/Sweden.php | 8 +++-- src/Yasumi/Provider/Switzerland.php | 16 +++++---- src/Yasumi/Provider/Switzerland/Aargau.php | 9 +++-- .../Switzerland/AppenzellAusserrhoden.php | 9 +++-- .../Switzerland/AppenzellInnerrhoden.php | 9 +++-- .../Provider/Switzerland/BaselLandschaft.php | 9 +++-- .../Provider/Switzerland/BaselStadt.php | 9 +++-- src/Yasumi/Provider/Switzerland/Bern.php | 9 +++-- src/Yasumi/Provider/Switzerland/Fribourg.php | 11 ++++--- src/Yasumi/Provider/Switzerland/Geneva.php | 13 +++++--- src/Yasumi/Provider/Switzerland/Glarus.php | 11 ++++--- src/Yasumi/Provider/Switzerland/Grisons.php | 9 +++-- src/Yasumi/Provider/Switzerland/Jura.php | 11 ++++--- src/Yasumi/Provider/Switzerland/Lucerne.php | 9 +++-- src/Yasumi/Provider/Switzerland/Neuchatel.php | 15 +++++---- src/Yasumi/Provider/Switzerland/Nidwalden.php | 9 +++-- src/Yasumi/Provider/Switzerland/Obwalden.php | 13 +++++--- .../Provider/Switzerland/Schaffhausen.php | 9 +++-- src/Yasumi/Provider/Switzerland/Schwyz.php | 9 +++-- src/Yasumi/Provider/Switzerland/Solothurn.php | 9 +++-- src/Yasumi/Provider/Switzerland/StGallen.php | 9 +++-- src/Yasumi/Provider/Switzerland/Thurgau.php | 9 +++-- src/Yasumi/Provider/Switzerland/Ticino.php | 11 ++++--- src/Yasumi/Provider/Switzerland/Uri.php | 9 +++-- src/Yasumi/Provider/Switzerland/Valais.php | 9 +++-- src/Yasumi/Provider/Switzerland/Vaud.php | 9 +++-- src/Yasumi/Provider/Switzerland/Zug.php | 9 +++-- src/Yasumi/Provider/Switzerland/Zurich.php | 9 +++-- src/Yasumi/Provider/Turkey.php | 8 +++-- src/Yasumi/Provider/USA.php | 10 +++--- src/Yasumi/Provider/Ukraine.php | 8 +++-- src/Yasumi/Provider/UnitedKingdom.php | 8 +++-- src/Yasumi/Provider/UnitedKingdom/England.php | 9 +++-- .../UnitedKingdom/NorthernIreland.php | 13 +++++--- .../Provider/UnitedKingdom/Scotland.php | 11 ++++--- src/Yasumi/Provider/UnitedKingdom/Wales.php | 9 +++-- src/Yasumi/ProviderInterface.php | 8 +++-- src/Yasumi/SubstituteHoliday.php | 10 +++--- src/Yasumi/Translations.php | 14 ++++---- src/Yasumi/TranslationsInterface.php | 8 +++-- src/Yasumi/Yasumi.php | 14 ++++---- src/Yasumi/data/locales.php | 9 +++-- src/Yasumi/data/translations/allSaintsDay.php | 8 +++-- src/Yasumi/data/translations/allSaintsEve.php | 8 +++-- src/Yasumi/data/translations/allSoulsDay.php | 8 +++-- src/Yasumi/data/translations/annunciation.php | 8 +++-- src/Yasumi/data/translations/anzacDay.php | 8 +++-- src/Yasumi/data/translations/armisticeDay.php | 8 +++-- src/Yasumi/data/translations/ascensionDay.php | 8 +++-- src/Yasumi/data/translations/ashWednesday.php | 8 +++-- .../data/translations/assumptionOfMary.php | 8 +++-- src/Yasumi/data/translations/australiaDay.php | 8 +++-- src/Yasumi/data/translations/canadaDay.php | 8 +++-- .../translations/carnationRevolutionDay.php | 8 +++-- src/Yasumi/data/translations/christmasDay.php | 8 +++-- src/Yasumi/data/translations/christmasEve.php | 8 +++-- src/Yasumi/data/translations/civicHoliday.php | 8 +++-- .../data/translations/corpusChristi.php | 8 +++-- .../data/translations/dayAfterNewYearsDay.php | 8 +++-- .../data/translations/dayOfLiberation.php | 9 +++-- .../data/translations/dayOfReformation.php | 8 +++-- src/Yasumi/data/translations/discoveryDay.php | 8 +++-- src/Yasumi/data/translations/easter.php | 8 +++-- src/Yasumi/data/translations/easterMonday.php | 8 +++-- src/Yasumi/data/translations/epiphany.php | 8 +++-- src/Yasumi/data/translations/epiphanyEve.php | 8 +++-- src/Yasumi/data/translations/familyDay.php | 8 +++-- src/Yasumi/data/translations/fathersDay.php | 8 +++-- .../data/translations/goldCupParadeDay.php | 8 +++-- src/Yasumi/data/translations/goodFriday.php | 8 +++-- src/Yasumi/data/translations/heritageDay.php | 8 +++-- .../translations/immaculateConception.php | 8 +++-- .../translations/internationalWomensDay.php | 8 +++-- .../translations/internationalWorkersDay.php | 8 +++-- src/Yasumi/data/translations/islanderDay.php | 8 +++-- src/Yasumi/data/translations/labourDay.php | 8 +++-- src/Yasumi/data/translations/louisRielDay.php | 8 +++-- .../data/translations/maundyThursday.php | 8 +++-- src/Yasumi/data/translations/mothersDay.php | 8 +++-- src/Yasumi/data/translations/natalHoliday.php | 8 +++-- .../nationalIndigenousPeoplesDay.php | 8 +++-- .../data/translations/nationalPatriotsDay.php | 8 +++-- src/Yasumi/data/translations/newYearsDay.php | 8 +++-- src/Yasumi/data/translations/newYearsEve.php | 8 +++-- .../translations/novaScotiaHeritageDay.php | 8 +++-- .../data/translations/orangemensDay.php | 8 +++-- src/Yasumi/data/translations/pentecost.php | 8 +++-- .../data/translations/pentecostMonday.php | 8 +++-- .../data/translations/plebisciteDay.php | 8 +++-- src/Yasumi/data/translations/portugalDay.php | 8 +++-- .../translations/portugueseRepublicDay.php | 8 +++-- .../data/translations/queensBirthday.php | 8 +++-- .../data/translations/reformationDay.php | 8 +++-- .../data/translations/remembranceDay.php | 8 +++-- .../translations/restorationOfIndepence.php | 8 +++-- .../translations/saintJeanBaptisteDay.php | 8 +++-- .../data/translations/saskatchewanDay.php | 8 +++-- .../data/translations/secondChristmasDay.php | 8 +++-- .../data/translations/secondNewYearsDay.php | 8 +++-- src/Yasumi/data/translations/stAndrewsDay.php | 8 +++-- src/Yasumi/data/translations/stDavidsDay.php | 8 +++-- .../data/translations/stFloriansDay.php | 8 +++-- src/Yasumi/data/translations/stGeorgesDay.php | 8 +++-- src/Yasumi/data/translations/stJohnsDay.php | 8 +++-- src/Yasumi/data/translations/stJohnsEve.php | 8 +++-- src/Yasumi/data/translations/stJosephsDay.php | 8 +++-- .../data/translations/stLeopoldsDay.php | 8 +++-- src/Yasumi/data/translations/stMartinsDay.php | 8 +++-- src/Yasumi/data/translations/stRupertsDay.php | 8 +++-- .../data/translations/stStephensDay.php | 8 +++-- .../data/translations/substituteHoliday.php | 8 +++-- src/Yasumi/data/translations/summerTime.php | 8 +++-- src/Yasumi/data/translations/terryFoxDay.php | 8 +++-- .../data/translations/thanksgivingDay.php | 8 +++-- .../truthAndReconciliationDay.php | 8 +++-- .../data/translations/valentinesDay.php | 8 +++-- src/Yasumi/data/translations/victoriaDay.php | 8 +++-- .../data/translations/victoryInEuropeDay.php | 8 +++-- src/Yasumi/data/translations/waitangiDay.php | 8 +++-- src/Yasumi/data/translations/walpurgisEve.php | 8 +++-- src/Yasumi/data/translations/winterTime.php | 8 +++-- .../data/translations/worldAnimalDay.php | 8 +++-- .../data/translations/yukonHeritageDay.php | 8 +++-- tests/Argentina/ArgentinaBaseTestCase.php | 9 +++-- tests/Argentina/ArgentinaTest.php | 9 +++-- tests/Argentina/CarnavalMondayTest.php | 9 +++-- tests/Argentina/CarnavalTuesdayTest.php | 9 +++-- tests/Argentina/ChristmasDayTest.php | 9 +++-- tests/Argentina/EasterTest.php | 9 +++-- tests/Argentina/FlagDayTest.php | 9 +++-- .../Argentina/GeneralJoseSanMartinDayTest.php | 9 +++-- .../GeneralMartinMigueldeGuemesDayTest.php | 9 +++-- tests/Argentina/GoodFridayTest.php | 9 +++-- .../Argentina/ImmaculateConceptionDayTest.php | 9 +++-- tests/Argentina/IndependenceDayTest.php | 9 +++-- .../Argentina/InternationalWorkersDayTest.php | 9 +++-- tests/Argentina/MalvinasDayTest.php | 9 +++-- tests/Argentina/MayRevolutionTest.php | 9 +++-- .../Argentina/NationalSovereigntyDayTest.php | 9 +++-- tests/Argentina/NewYearsDayTest.php | 9 +++-- tests/Argentina/RaceDayTest.php | 9 +++-- tests/Argentina/RemembranceDayTest.php | 9 +++-- tests/Australia/AnzacDayTest.php | 9 +++-- tests/Australia/AustraliaBaseTestCase.php | 9 +++-- tests/Australia/AustraliaDayTest.php | 9 +++-- tests/Australia/AustraliaTest.php | 9 +++-- .../AnzacDayTest.php | 9 +++-- .../AustraliaDayTest.php | 9 +++-- ...AustralianCapitalTerritoryBaseTestCase.php | 9 +++-- .../AustralianCapitalTerritoryTest.php | 9 +++-- .../BoxingDayTest.php | 9 +++-- .../CanberraDayTest.php | 9 +++-- .../ChristmasDayTest.php | 9 +++-- .../EasterMondayTest.php | 9 +++-- .../EasterSaturdayTest.php | 9 +++-- .../EasterSundayTest.php | 9 +++-- .../GoodFridayTest.php | 9 +++-- .../LabourDayTest.php | 9 +++-- .../NationalDayOfMourningTest.php | 9 +++-- .../NewYearsDayTest.php | 9 +++-- .../QueensBirthdayTest.php | 9 +++-- .../ReconciliationDayTest.php | 9 +++-- tests/Australia/BoxingDayTest.php | 9 +++-- tests/Australia/ChristmasDayTest.php | 9 +++-- tests/Australia/EasterMondayTest.php | 9 +++-- tests/Australia/GoodFridayTest.php | 9 +++-- tests/Australia/NationalDayOfMourningTest.php | 9 +++-- .../Australia/NewSouthWales/AnzacDayTest.php | 9 +++-- .../NewSouthWales/AustraliaDayTest.php | 9 +++-- .../NewSouthWales/BankHolidayTest.php | 9 +++-- .../Australia/NewSouthWales/BoxingDayTest.php | 9 +++-- .../NewSouthWales/ChristmasDayTest.php | 9 +++-- .../NewSouthWales/EasterMondayTest.php | 9 +++-- .../NewSouthWales/EasterSaturdayTest.php | 9 +++-- .../NewSouthWales/EasterSundayTest.php | 9 +++-- .../NewSouthWales/GoodFridayTest.php | 9 +++-- .../Australia/NewSouthWales/LabourDayTest.php | 9 +++-- .../NationalDayOfMourningTest.php | 9 +++-- .../NewSouthWalesBaseTestCase.php | 9 +++-- .../NewSouthWales/NewSouthWalesTest.php | 9 +++-- .../NewSouthWales/NewYearsDayTest.php | 9 +++-- .../NewSouthWales/QueensBirthdayTest.php | 9 +++-- tests/Australia/NewYearsDayTest.php | 9 +++-- .../NorthernTerritory/AnzacDayTest.php | 9 +++-- .../NorthernTerritory/AustraliaDayTest.php | 9 +++-- .../NorthernTerritory/BoxingDayTest.php | 9 +++-- .../NorthernTerritory/ChristmasDayTest.php | 9 +++-- .../NorthernTerritory/EasterMondayTest.php | 9 +++-- .../NorthernTerritory/EasterSaturdayTest.php | 9 +++-- .../NorthernTerritory/GoodFridayTest.php | 9 +++-- .../NorthernTerritory/MayDayTest.php | 9 +++-- .../NationalDayOfMourningTest.php | 9 +++-- .../NorthernTerritory/NewYearsDayTest.php | 9 +++-- .../NorthernTerritoryBaseTestCase.php | 9 +++-- .../NorthernTerritoryTest.php | 9 +++-- .../NorthernTerritory/PicnicDayTest.php | 9 +++-- .../NorthernTerritory/QueensBirthdayTest.php | 9 +++-- tests/Australia/Queensland/AnzacDayTest.php | 9 +++-- .../Australia/Queensland/AustraliaDayTest.php | 9 +++-- tests/Australia/Queensland/BoxingDayTest.php | 9 +++-- .../Queensland/Brisbane/AnzacDayTest.php | 9 +++-- .../Queensland/Brisbane/AustraliaDayTest.php | 9 +++-- .../Queensland/Brisbane/BoxingDayTest.php | 9 +++-- .../Brisbane/BrisbaneBaseTestCase.php | 9 +++-- .../Queensland/Brisbane/BrisbaneTest.php | 9 +++-- .../Queensland/Brisbane/ChristmasDayTest.php | 9 +++-- .../Queensland/Brisbane/EasterMondayTest.php | 9 +++-- .../Queensland/Brisbane/GoodFridayTest.php | 9 +++-- .../Queensland/Brisbane/LabourDayTest.php | 9 +++-- .../Brisbane/NationalDayOfMourningTest.php | 9 +++-- .../Queensland/Brisbane/NewYearsDayTest.php | 9 +++-- .../Queensland/Brisbane/PeoplesDayTest.php | 9 +++-- .../Brisbane/QueensBirthdayTest.php | 9 +++-- .../Australia/Queensland/ChristmasDayTest.php | 9 +++-- .../Australia/Queensland/EasterMondayTest.php | 9 +++-- tests/Australia/Queensland/GoodFridayTest.php | 9 +++-- tests/Australia/Queensland/LabourDayTest.php | 9 +++-- .../Queensland/NationalDayOfMourningTest.php | 9 +++-- .../Australia/Queensland/NewYearsDayTest.php | 9 +++-- .../Queensland/QueensBirthdayTest.php | 9 +++-- .../Queensland/QueenslandBaseTestCase.php | 9 +++-- tests/Australia/Queensland/QueenslandTest.php | 9 +++-- .../SouthAustralia/AdelaideCupDayTest.php | 9 +++-- .../Australia/SouthAustralia/AnzacDayTest.php | 9 +++-- .../SouthAustralia/AustraliaDayTest.php | 9 +++-- .../SouthAustralia/ChristmasDayTest.php | 9 +++-- .../SouthAustralia/EasterMondayTest.php | 9 +++-- .../SouthAustralia/EasterSaturdayTest.php | 9 +++-- .../SouthAustralia/GoodFridayTest.php | 9 +++-- .../SouthAustralia/LabourDayTest.php | 9 +++-- .../NationalDayOfMourningTest.php | 9 +++-- .../SouthAustralia/NewYearsDayTest.php | 9 +++-- .../SouthAustralia/ProclamationDayTest.php | 9 +++-- .../SouthAustralia/QueensBirthdayTest.php | 9 +++-- .../SouthAustraliaBaseTestCase.php | 9 +++-- .../SouthAustralia/SouthAustraliaTest.php | 9 +++-- tests/Australia/Tasmania/AnzacDayTest.php | 9 +++-- tests/Australia/Tasmania/AustraliaDayTest.php | 9 +++-- tests/Australia/Tasmania/BoxingDayTest.php | 9 +++-- .../Tasmania/CentralNorth/AnzacDayTest.php | 9 +++-- .../CentralNorth/AustraliaDayTest.php | 9 +++-- .../Tasmania/CentralNorth/BoxingDayTest.php | 9 +++-- .../CentralNorth/CentralNorthBaseTestCase.php | 9 +++-- .../CentralNorth/CentralNorthTest.php | 9 +++-- .../CentralNorth/ChristmasDayTest.php | 9 +++-- .../CentralNorth/DevonportShowTest.php | 9 +++-- .../CentralNorth/EasterMondayTest.php | 9 +++-- .../CentralNorth/EightHourDayTest.php | 9 +++-- .../Tasmania/CentralNorth/GoodFridayTest.php | 9 +++-- .../NationalDayOfMourningTest.php | 9 +++-- .../Tasmania/CentralNorth/NewYearsDayTest.php | 9 +++-- .../CentralNorth/QueensBirthdayTest.php | 9 +++-- .../CentralNorth/RecreationDayTest.php | 9 +++-- tests/Australia/Tasmania/ChristmasDayTest.php | 9 +++-- tests/Australia/Tasmania/EasterMondayTest.php | 9 +++-- tests/Australia/Tasmania/EightHourDayTest.php | 9 +++-- .../Tasmania/FlindersIsland/AnzacDayTest.php | 9 +++-- .../FlindersIsland/AustraliaDayTest.php | 9 +++-- .../Tasmania/FlindersIsland/BoxingDayTest.php | 9 +++-- .../FlindersIsland/ChristmasDayTest.php | 9 +++-- .../FlindersIsland/EasterMondayTest.php | 9 +++-- .../FlindersIsland/EightHourDayTest.php | 9 +++-- .../FlindersIslandBaseTestCase.php | 9 +++-- .../FlindersIsland/FlindersIslandShowTest.php | 9 +++-- .../FlindersIsland/FlindersIslandTest.php | 9 +++-- .../FlindersIsland/GoodFridayTest.php | 9 +++-- .../NationalDayOfMourningTest.php | 9 +++-- .../FlindersIsland/NewYearsDayTest.php | 9 +++-- .../FlindersIsland/QueensBirthdayTest.php | 9 +++-- .../FlindersIsland/RecreationDayTest.php | 9 +++-- tests/Australia/Tasmania/GoodFridayTest.php | 9 +++-- .../Tasmania/KingIsland/AnzacDayTest.php | 9 +++-- .../Tasmania/KingIsland/AustraliaDayTest.php | 9 +++-- .../Tasmania/KingIsland/BoxingDayTest.php | 9 +++-- .../Tasmania/KingIsland/ChristmasDayTest.php | 9 +++-- .../Tasmania/KingIsland/EasterMondayTest.php | 9 +++-- .../Tasmania/KingIsland/EightHourDayTest.php | 9 +++-- .../Tasmania/KingIsland/GoodFridayTest.php | 9 +++-- .../KingIsland/KingIslandBaseTestCase.php | 9 +++-- .../KingIsland/KingIslandShowTest.php | 9 +++-- .../Tasmania/KingIsland/KingIslandTest.php | 9 +++-- .../KingIsland/NationalDayOfMourningTest.php | 9 +++-- .../Tasmania/KingIsland/NewYearsDayTest.php | 9 +++-- .../KingIsland/QueensBirthdayTest.php | 9 +++-- .../Tasmania/KingIsland/RecreationDayTest.php | 9 +++-- .../Tasmania/NationalDayOfMourningTest.php | 9 +++-- tests/Australia/Tasmania/NewYearsDayTest.php | 9 +++-- .../Tasmania/Northeast/AnzacDayTest.php | 9 +++-- .../Tasmania/Northeast/AustraliaDayTest.php | 9 +++-- .../Tasmania/Northeast/BoxingDayTest.php | 9 +++-- .../Tasmania/Northeast/ChristmasDayTest.php | 9 +++-- .../Tasmania/Northeast/EasterMondayTest.php | 9 +++-- .../Tasmania/Northeast/EightHourDayTest.php | 9 +++-- .../Tasmania/Northeast/GoodFridayTest.php | 9 +++-- .../Tasmania/Northeast/LauncestonShowTest.php | 9 +++-- .../Northeast/NationalDayOfMourningTest.php | 9 +++-- .../Tasmania/Northeast/NewYearsDayTest.php | 9 +++-- .../Northeast/NortheastBaseTestCase.php | 9 +++-- .../Tasmania/Northeast/NortheastTest.php | 9 +++-- .../Tasmania/Northeast/QueensBirthdayTest.php | 9 +++-- .../Tasmania/Northeast/RecreationDayTest.php | 9 +++-- .../Tasmania/Northwest/AnzacDayTest.php | 9 +++-- .../Tasmania/Northwest/AustraliaDayTest.php | 9 +++-- .../Tasmania/Northwest/BoxingDayTest.php | 9 +++-- .../Tasmania/Northwest/BurnieShowTest.php | 9 +++-- .../Tasmania/Northwest/ChristmasDayTest.php | 9 +++-- .../Northwest/CircularHead/AGFESTTest.php | 9 +++-- .../Northwest/CircularHead/AnzacDayTest.php | 9 +++-- .../CircularHead/AustraliaDayTest.php | 9 +++-- .../Northwest/CircularHead/BoxingDayTest.php | 9 +++-- .../Northwest/CircularHead/BurnieShowTest.php | 9 +++-- .../CircularHead/ChristmasDayTest.php | 9 +++-- .../CircularHead/CircularHeadBaseTestCase.php | 9 +++-- .../CircularHead/CircularHeadTest.php | 9 +++-- .../CircularHead/EasterMondayTest.php | 9 +++-- .../CircularHead/EightHourDayTest.php | 9 +++-- .../Northwest/CircularHead/GoodFridayTest.php | 9 +++-- .../NationalDayOfMourningTest.php | 9 +++-- .../CircularHead/NewYearsDayTest.php | 9 +++-- .../CircularHead/QueensBirthdayTest.php | 9 +++-- .../CircularHead/RecreationDayTest.php | 9 +++-- .../Tasmania/Northwest/EasterMondayTest.php | 9 +++-- .../Tasmania/Northwest/EightHourDayTest.php | 9 +++-- .../Tasmania/Northwest/GoodFridayTest.php | 9 +++-- .../Northwest/NationalDayOfMourningTest.php | 9 +++-- .../Tasmania/Northwest/NewYearsDayTest.php | 9 +++-- .../Northwest/NorthwestBaseTestCase.php | 9 +++-- .../Tasmania/Northwest/NorthwestTest.php | 9 +++-- .../Tasmania/Northwest/QueensBirthdayTest.php | 9 +++-- .../Tasmania/Northwest/RecreationDayTest.php | 9 +++-- .../Australia/Tasmania/QueensBirthdayTest.php | 9 +++-- .../Australia/Tasmania/RecreationDayTest.php | 9 +++-- .../Australia/Tasmania/South/AnzacDayTest.php | 9 +++-- .../Tasmania/South/AustraliaDayTest.php | 9 +++-- .../Tasmania/South/BoxingDayTest.php | 9 +++-- .../Tasmania/South/ChristmasDayTest.php | 9 +++-- .../Tasmania/South/EasterMondayTest.php | 9 +++-- .../Tasmania/South/EightHourDayTest.php | 9 +++-- .../Tasmania/South/GoodFridayTest.php | 9 +++-- .../Tasmania/South/HobartShowTest.php | 9 +++-- .../South/NationalDayOfMourningTest.php | 9 +++-- .../Tasmania/South/NewYearsDayTest.php | 9 +++-- .../Tasmania/South/QueensBirthdayTest.php | 9 +++-- .../Tasmania/South/RecreationDayTest.php | 9 +++-- .../Tasmania/South/SouthBaseTestCase.php | 9 +++-- tests/Australia/Tasmania/South/SouthTest.php | 9 +++-- .../Tasmania/South/Southeast/AnzacDayTest.php | 9 +++-- .../South/Southeast/AustraliaDayTest.php | 9 +++-- .../South/Southeast/BoxingDayTest.php | 9 +++-- .../South/Southeast/ChristmasDayTest.php | 9 +++-- .../South/Southeast/EasterMondayTest.php | 9 +++-- .../South/Southeast/EightHourDayTest.php | 9 +++-- .../South/Southeast/GoodFridayTest.php | 9 +++-- .../South/Southeast/HobartRegattaTest.php | 9 +++-- .../South/Southeast/HobartShowTest.php | 9 +++-- .../Southeast/NationalDayOfMourningTest.php | 9 +++-- .../South/Southeast/NewYearsDayTest.php | 9 +++-- .../South/Southeast/QueensBirthdayTest.php | 9 +++-- .../South/Southeast/SoutheastBaseTestCase.php | 9 +++-- .../South/Southeast/SoutheastTest.php | 9 +++-- .../Tasmania/TasmaniaBaseTestCase.php | 9 +++-- tests/Australia/Tasmania/TasmaniaTest.php | 9 +++-- .../Victoria/AFLGrandFinalFridayTest.php | 9 +++-- tests/Australia/Victoria/AnzacDayTest.php | 9 +++-- tests/Australia/Victoria/AustraliaDayTest.php | 9 +++-- tests/Australia/Victoria/BoxingDayTest.php | 9 +++-- tests/Australia/Victoria/ChristmasDayTest.php | 9 +++-- tests/Australia/Victoria/EasterMondayTest.php | 9 +++-- .../Australia/Victoria/EasterSaturdayTest.php | 9 +++-- tests/Australia/Victoria/EasterSundayTest.php | 9 +++-- tests/Australia/Victoria/GoodFridayTest.php | 9 +++-- tests/Australia/Victoria/LabourDayTest.php | 9 +++-- .../Victoria/MelbourneCupDayTest.php | 9 +++-- .../Victoria/NationalDayOfMourningTest.php | 9 +++-- tests/Australia/Victoria/NewYearsDayTest.php | 9 +++-- .../Australia/Victoria/QueensBirthdayTest.php | 9 +++-- .../Victoria/VictoriaBaseTestCase.php | 9 +++-- tests/Australia/Victoria/VictoriaTest.php | 9 +++-- .../WesternAustralia/AnzacDayTest.php | 9 +++-- .../WesternAustralia/AustraliaDayTest.php | 9 +++-- .../WesternAustralia/BoxingDayTest.php | 9 +++-- .../WesternAustralia/ChristmasDayTest.php | 9 +++-- .../WesternAustralia/EasterMondayTest.php | 9 +++-- .../WesternAustralia/GoodFridayTest.php | 9 +++-- .../WesternAustralia/LabourDayTest.php | 9 +++-- .../NationalDayOfMourningTest.php | 9 +++-- .../WesternAustralia/NewYearsDayTest.php | 9 +++-- .../WesternAustralia/QueensBirthdayTest.php | 9 +++-- .../WesternAustraliaBaseTestCase.php | 9 +++-- .../WesternAustraliaDayTest.php | 9 +++-- .../WesternAustralia/WesternAustraliaTest.php | 9 +++-- tests/Austria/AllSaintsDayTest.php | 9 +++-- tests/Austria/AscensionDayTest.php | 9 +++-- tests/Austria/AssumptionOfMaryTest.php | 9 +++-- tests/Austria/AustriaBaseTestCase.php | 9 +++-- tests/Austria/AustriaTest.php | 9 +++-- .../Burgenland/BurgenlandBaseTestCase.php | 9 +++-- tests/Austria/Burgenland/BurgenlandTest.php | 9 +++-- tests/Austria/Burgenland/stMartinsDayTest.php | 9 +++-- .../Carinthia/CarinthiaBaseTestCase.php | 9 +++-- tests/Austria/Carinthia/CarinthiaTest.php | 9 +++-- tests/Austria/Carinthia/PlebisciteDayTest.php | 9 +++-- tests/Austria/Carinthia/StJosephsDayTest.php | 9 +++-- tests/Austria/ChristmasTest.php | 9 +++-- tests/Austria/CorpusChristiTest.php | 9 +++-- tests/Austria/EasterMondayTest.php | 9 +++-- tests/Austria/EasterTest.php | 9 +++-- tests/Austria/EpiphanyTest.php | 9 +++-- tests/Austria/ImmaculateConceptionTest.php | 9 +++-- tests/Austria/InternationalWorkersDayTest.php | 9 +++-- .../LowerAustria/LowerAustriaBaseTestCase.php | 9 +++-- .../Austria/LowerAustria/LowerAustriaTest.php | 9 +++-- .../LowerAustria/StLeopoldsDayTest.php | 9 +++-- tests/Austria/NationalDayTest.php | 9 +++-- tests/Austria/NewYearsDayTest.php | 9 +++-- tests/Austria/PentecostMondayTest.php | 9 +++-- tests/Austria/PentecostTest.php | 9 +++-- .../Austria/Salzburg/SalzburgBaseTestCase.php | 9 +++-- tests/Austria/Salzburg/SalzburgTest.php | 9 +++-- tests/Austria/Salzburg/StRupertsDayTest.php | 9 +++-- tests/Austria/SecondChristmasDayTest.php | 9 +++-- tests/Austria/Styria/StJosephsDayTest.php | 9 +++-- tests/Austria/Styria/StyriaBaseTestCase.php | 9 +++-- tests/Austria/Styria/StyriaTest.php | 9 +++-- tests/Austria/Tyrol/StJosephsDayTest.php | 9 +++-- tests/Austria/Tyrol/TyrolBaseTestCase.php | 9 +++-- tests/Austria/Tyrol/TyrolTest.php | 9 +++-- .../UpperAustria/StFloriansDayTest.php | 9 +++-- .../UpperAustria/UpperAustriaBaseTestCase.php | 9 +++-- .../Austria/UpperAustria/UpperAustriaTest.php | 9 +++-- tests/Austria/Vienna/StLeopoldsDayTest.php | 9 +++-- tests/Austria/Vienna/ViennaBaseTestCase.php | 9 +++-- tests/Austria/Vienna/ViennaTest.php | 9 +++-- tests/Austria/Vorarlberg/StJosephsDayTest.php | 9 +++-- .../Vorarlberg/VorarlbergBaseTestCase.php | 9 +++-- tests/Austria/Vorarlberg/VorarlbergTest.php | 9 +++-- tests/Base/HolidayBetweenFilterTest.php | 33 ++++++++++--------- tests/Base/HolidayFiltersTest.php | 9 +++-- tests/Base/HolidayOnFilterTest.php | 9 +++-- tests/Base/HolidayTest.php | 9 +++-- tests/Base/SubstituteHolidayTest.php | 11 ++++--- tests/Base/TranslationsTest.php | 19 ++++++----- tests/Base/TypographyTest.php | 8 +++-- tests/Base/WeekendTest.php | 8 +++-- tests/Base/YasumiExternalProvider.php | 9 +++-- tests/Base/YasumiTest.php | 17 ++++++---- tests/Base/YasumiWorkdayTest.php | 9 +++-- tests/Belgium/AllSaintsDayTest.php | 9 +++-- tests/Belgium/ArmisticeDayTest.php | 9 +++-- tests/Belgium/AscensionDayTest.php | 9 +++-- tests/Belgium/AssumptionOfMaryTest.php | 9 +++-- tests/Belgium/BelgiumBaseTestCase.php | 9 +++-- tests/Belgium/BelgiumTest.php | 9 +++-- tests/Belgium/ChristmasTest.php | 9 +++-- tests/Belgium/EasterMondayTest.php | 9 +++-- tests/Belgium/EasterTest.php | 9 +++-- tests/Belgium/InternationalWorkersDayTest.php | 9 +++-- tests/Belgium/NationalDayTest.php | 9 +++-- tests/Belgium/NewYearsDayTest.php | 9 +++-- tests/Belgium/PentecostTest.php | 9 +++-- tests/Belgium/pentecostMondayTest.php | 9 +++-- tests/Bosnia/BosniaBaseTestCase.php | 9 +++-- tests/Bosnia/BosniaTest.php | 9 +++-- tests/Bosnia/ChristmasDayTest.php | 9 +++-- tests/Bosnia/DayAfterNewYearsDay.php | 9 +++-- tests/Bosnia/EasterTest.php | 9 +++-- tests/Bosnia/IndependenceDayTest.php | 9 +++-- tests/Bosnia/InternationalWorkersDayTest.php | 9 +++-- tests/Bosnia/NewYearsDayTest.php | 9 +++-- tests/Bosnia/OrthodoxChristmasDay.php | 9 +++-- tests/Bosnia/SecondLabourDay.php | 9 +++-- tests/Bosnia/StatehoodDayTest.php | 9 +++-- tests/Brazil/AllSoulsDayTest.php | 9 +++-- tests/Brazil/AshWednesdayTest.php | 9 +++-- tests/Brazil/BrazilBaseTestCase.php | 9 +++-- tests/Brazil/BrazilTest.php | 9 +++-- tests/Brazil/CarnavalMondayTest.php | 9 +++-- tests/Brazil/CarnavalTuesdayTest.php | 9 +++-- tests/Brazil/ChristmasDayTest.php | 9 +++-- tests/Brazil/CorpusChristiTest.php | 9 +++-- tests/Brazil/EasterTest.php | 9 +++-- tests/Brazil/GoodFridayTest.php | 9 +++-- tests/Brazil/IndependenceDayTest.php | 9 +++-- tests/Brazil/InternationalWorkersDayTest.php | 9 +++-- tests/Brazil/NewYearsDayTest.php | 9 +++-- tests/Brazil/OurLadyOfAparecidaDayTest.php | 9 +++-- .../Brazil/ProclamationOfRepublicDayTest.php | 9 +++-- tests/Brazil/TiradentesDayTest.php | 9 +++-- tests/Canada/Alberta/AlbertaBaseTestCase.php | 9 +++-- tests/Canada/Alberta/AlbertaTest.php | 9 +++-- .../BritishColumbiaBaseTestCase.php | 9 +++-- .../BritishColumbia/BritishColumbiaTest.php | 9 +++-- tests/Canada/CanadaBaseTestCase.php | 9 +++-- tests/Canada/CanadaDayTest.php | 9 +++-- tests/Canada/CanadaTest.php | 9 +++-- tests/Canada/ChristmasDayTest.php | 9 +++-- tests/Canada/LabourDayTest.php | 9 +++-- .../Canada/Manitoba/ManitobaBaseTestCase.php | 9 +++-- tests/Canada/Manitoba/ManitobaTest.php | 9 +++-- .../NewBrunswick/NewBrunswickBaseTestCase.php | 9 +++-- .../Canada/NewBrunswick/NewBrunswickTest.php | 9 +++-- tests/Canada/NewYearsDayTest.php | 9 +++-- .../NewfoundlandAndLabradorBaseTestCase.php | 9 +++-- .../NewfoundlandAndLabradorTest.php | 9 +++-- .../NorthwestTerritoriesBaseTestCase.php | 9 +++-- .../NorthwestTerritoriesTest.php | 9 +++-- .../NovaScotia/NovaScotiaBaseTestCase.php | 9 +++-- tests/Canada/NovaScotia/NovaScotiaTest.php | 9 +++-- tests/Canada/Nunavut/NunavutBaseTestCase.php | 9 +++-- tests/Canada/Nunavut/NunavutTest.php | 9 +++-- tests/Canada/Ontario/OntarioBaseTestCase.php | 9 +++-- tests/Canada/Ontario/OntarioTest.php | 9 +++-- .../PrinceEdwardIslandBaseTestCase.php | 9 +++-- .../PrinceEdwardIslandTest.php | 9 +++-- tests/Canada/Quebec/QuebecBaseTestCase.php | 9 +++-- tests/Canada/Quebec/QuebecTest.php | 9 +++-- tests/Canada/RemembranceDayTest.php | 9 +++-- .../Saskatchewan/SaskatchewanBaseTestCase.php | 9 +++-- .../Canada/Saskatchewan/SaskatchewanTest.php | 9 +++-- tests/Canada/ThanksgivingDayTest.php | 9 +++-- .../Canada/TruthAndReconciliationDayTest.php | 9 +++-- tests/Canada/Yukon/YukonBaseTestCase.php | 9 +++-- tests/Canada/Yukon/YukonTest.php | 9 +++-- tests/Croatia/AllSaintsDayTest.php | 9 +++-- tests/Croatia/AntifascistStruggleDayTest.php | 9 +++-- tests/Croatia/AssumptionOfMaryTest.php | 9 +++-- tests/Croatia/ChristmasDayTest.php | 9 +++-- tests/Croatia/CorpusChristiTest.php | 9 +++-- tests/Croatia/CroatiaBaseTestCase.php | 9 +++-- tests/Croatia/CroatiaTest.php | 9 +++-- tests/Croatia/EasterMondayTest.php | 9 +++-- tests/Croatia/EasterTest.php | 9 +++-- tests/Croatia/EpiphanyTest.php | 9 +++-- tests/Croatia/HomelandThanksgivingDayTest.php | 9 +++-- tests/Croatia/IndependenceDayTest.php | 9 +++-- tests/Croatia/InternationalWorkersDayTest.php | 9 +++-- tests/Croatia/NewYearsDayTest.php | 9 +++-- tests/Croatia/RemembranceDayTest.php | 9 +++-- tests/Croatia/StStephensDayTest.php | 9 +++-- tests/Croatia/StatehoodDayTest.php | 9 +++-- tests/CzechRepublic/ChristmasDayTest.php | 9 +++-- tests/CzechRepublic/ChristmasEveTest.php | 9 +++-- .../CzechRepublicBaseTestCase.php | 9 +++-- tests/CzechRepublic/CzechRepublicTest.php | 9 +++-- tests/CzechRepublic/CzechStateHoodDayTest.php | 9 +++-- tests/CzechRepublic/EasterMondayTest.php | 9 +++-- tests/CzechRepublic/GoodFridayTest.php | 9 +++-- .../IndependentCzechoslovakStateDayTest.php | 9 +++-- .../InternationalWorkersDayTest.php | 9 +++-- tests/CzechRepublic/JanHusDayTest.php | 9 +++-- tests/CzechRepublic/NewYearsDayTest.php | 9 +++-- .../RenewalOfIndependentCzechStateDayTest.php | 9 +++-- .../SaintsCyrilAndMethodiusDayTest.php | 9 +++-- .../CzechRepublic/SecondChristmasDayTest.php | 9 +++-- .../StruggleForFreedomAndDemocracyDayTest.php | 9 +++-- .../CzechRepublic/VictoryInEuropeDayTest.php | 9 +++-- tests/Denmark/AscensionDayTest.php | 9 +++-- tests/Denmark/ChristmasDayTest.php | 9 +++-- tests/Denmark/ChristmasEveTest.php | 9 +++-- tests/Denmark/ConstitutionDayTest.php | 9 +++-- tests/Denmark/DaylightSavingTime.php | 8 +++-- tests/Denmark/DenmarkBaseTestCase.php | 9 +++-- tests/Denmark/DenmarkTest.php | 9 +++-- tests/Denmark/EasterMondayTest.php | 9 +++-- tests/Denmark/EasterTest.php | 9 +++-- tests/Denmark/GoodFridayTest.php | 9 +++-- tests/Denmark/GreatPrayerDayTest.php | 9 +++-- tests/Denmark/InternationalWorkersDayTest.php | 9 +++-- tests/Denmark/MaundyThursdayTest.php | 9 +++-- tests/Denmark/NewYearsDayTest.php | 9 +++-- tests/Denmark/NewYearsEveTest.php | 9 +++-- tests/Denmark/PentecostMondayTest.php | 9 +++-- tests/Denmark/PentecostTest.php | 9 +++-- tests/Denmark/SecondChristmasDayTest.php | 9 +++-- tests/Estonia/ChristmasDayTest.php | 8 +++-- tests/Estonia/ChristmasEveDayTest.php | 8 +++-- tests/Estonia/EasterDayTest.php | 8 +++-- tests/Estonia/EstoniaBaseTestCase.php | 8 +++-- tests/Estonia/EstoniaTest.php | 8 +++-- tests/Estonia/GoodFridayDayTest.php | 8 +++-- tests/Estonia/IndependenceDayTest.php | 8 +++-- tests/Estonia/InternationalWorkersDayTest.php | 8 +++-- tests/Estonia/NewYearsDayTest.php | 8 +++-- tests/Estonia/PentecostTest.php | 8 +++-- .../RestorationOfIndependenceDayTest.php | 8 +++-- tests/Estonia/SecondChristmasDayTest.php | 8 +++-- tests/Estonia/StJohnsDayTest.php | 8 +++-- tests/Estonia/VictoryDayTest.php | 8 +++-- tests/Finland/AllSaintsDayTest.php | 9 +++-- tests/Finland/AscensionDayTest.php | 9 +++-- tests/Finland/ChristmasDayTest.php | 9 +++-- tests/Finland/EasterMondayTest.php | 9 +++-- tests/Finland/EasterTest.php | 9 +++-- tests/Finland/EpiphanyTest.php | 9 +++-- tests/Finland/FinlandBaseTestCase.php | 9 +++-- tests/Finland/FinlandTest.php | 9 +++-- tests/Finland/GoodFridayTest.php | 9 +++-- tests/Finland/IndependenceDayTest.php | 9 +++-- tests/Finland/InternationalWorkersDayTest.php | 9 +++-- tests/Finland/NewYearsDayTest.php | 9 +++-- tests/Finland/PentecostTest.php | 9 +++-- tests/Finland/SecondChristmasDayTest.php | 9 +++-- tests/Finland/stJohnsDayTest.php | 9 +++-- tests/France/AllSaintsDayTest.php | 9 +++-- tests/France/ArmisticeDayTest.php | 9 +++-- tests/France/AscensionDayTest.php | 9 +++-- tests/France/AssumptionOfMaryTest.php | 9 +++-- tests/France/BasRhin/BasRhinBaseTestCase.php | 9 +++-- tests/France/BasRhin/BasRhinTest.php | 9 +++-- tests/France/BasRhin/GoodFridayTest.php | 9 +++-- tests/France/BasRhin/stStephensDayTest.php | 9 +++-- tests/France/BastilleDayTest.php | 9 +++-- tests/France/ChristmasDayTest.php | 9 +++-- tests/France/EasterMondayTest.php | 9 +++-- tests/France/FranceBaseTestCase.php | 9 +++-- tests/France/FranceTest.php | 9 +++-- tests/France/HautRhin/GoodFridayTest.php | 9 +++-- .../France/HautRhin/HautRhinBaseTestCase.php | 9 +++-- tests/France/HautRhin/HautRhinTest.php | 9 +++-- tests/France/HautRhin/stStephensDayTest.php | 9 +++-- tests/France/InternationalWorkersDayTest.php | 9 +++-- tests/France/Moselle/GoodFridayTest.php | 9 +++-- tests/France/Moselle/MoselleBaseTestCase.php | 9 +++-- tests/France/Moselle/MoselleTest.php | 9 +++-- tests/France/Moselle/stStephensDayTest.php | 9 +++-- tests/France/NewYearsDayTest.php | 9 +++-- tests/France/PentecostMondayTest.php | 9 +++-- tests/France/VictoryInEuropeDayTest.php | 9 +++-- tests/Georgia/EasterTest.php | 15 ++++++++- tests/Georgia/GeorgiaBaseTestCase.php | 8 +++-- tests/Georgia/GeorgiaTest.php | 8 +++-- tests/Georgia/IndependenceDayTest.php | 8 +++-- tests/Georgia/InternationalWomensDayTest.php | 8 +++-- tests/Georgia/MtskhetobaDayTest.php | 8 +++-- tests/Georgia/NewYearsDayTest.php | 8 +++-- tests/Georgia/OrthodoxChristmasDayTest.php | 8 +++-- tests/Georgia/OrthodoxEpiphanyDayTest.php | 8 +++-- tests/Georgia/SecondNewYearDayTest.php | 8 +++-- tests/Georgia/StAndrewsDayTest.php | 8 +++-- tests/Georgia/StGeorgesDayTest.php | 8 +++-- tests/Georgia/StMarysDayTest.php | 8 +++-- tests/Georgia/UnityDayTest.php | 8 +++-- tests/Georgia/VictoryDayTest.php | 8 +++-- tests/Germany/AscensionDayTest.php | 9 +++-- .../BadenWurttemberg/AllSaintsDayTest.php | 9 +++-- .../BadenWurttembergBaseTestCase.php | 9 +++-- .../BadenWurttemberg/BadenWurttembergTest.php | 9 +++-- .../BadenWurttemberg/CorpusChristiTest.php | 9 +++-- .../Germany/BadenWurttemberg/EpiphanyTest.php | 9 +++-- .../BadenWurttemberg/GermanUnityDayTest.php | 9 +++-- .../ReformationDay2017Test.php | 9 +++-- tests/Germany/Bavaria/AllSaintsDayTest.php | 9 +++-- tests/Germany/Bavaria/BavariaBaseTestCase.php | 9 +++-- tests/Germany/Bavaria/BavariaTest.php | 9 +++-- tests/Germany/Bavaria/CorpusChristiTest.php | 9 +++-- tests/Germany/Bavaria/EpiphanyTest.php | 9 +++-- tests/Germany/Bavaria/GermanUnityDayTest.php | 9 +++-- .../Bavaria/ReformationDay2017Test.php | 9 +++-- tests/Germany/Berlin/BerlinBaseTestCase.php | 9 +++-- tests/Germany/Berlin/BerlinTest.php | 9 +++-- .../Berlin/DayOfLiberation2020Test.php | 11 ++++--- tests/Germany/Berlin/GermanUnityDayTest.php | 9 +++-- .../Berlin/InternationalWomensDay2019Test.php | 11 ++++--- .../Germany/Berlin/ReformationDay2017Test.php | 9 +++-- .../Brandenburg/BrandenburgBaseTestCase.php | 9 +++-- tests/Germany/Brandenburg/BrandenburgTest.php | 9 +++-- .../Brandenburg/GermanUnityDayTest.php | 9 +++-- .../Brandenburg/ReformationDayTest.php | 9 +++-- tests/Germany/Bremen/BremenBaseTestCase.php | 9 +++-- tests/Germany/Bremen/BremenTest.php | 9 +++-- tests/Germany/Bremen/GermanUnityDayTest.php | 9 +++-- .../Germany/Bremen/ReformationDay2017Test.php | 9 +++-- tests/Germany/Bremen/ReformationDayTest.php | 9 +++-- tests/Germany/ChristmasTest.php | 9 +++-- tests/Germany/EasterMondayTest.php | 9 +++-- tests/Germany/GermanUnityDayTest.php | 9 +++-- tests/Germany/GermanyBaseTestCase.php | 9 +++-- tests/Germany/GermanyTest.php | 9 +++-- tests/Germany/GoodFridayTest.php | 9 +++-- .../Germany/Hamburg/DayOfReformationTest.php | 9 +++-- tests/Germany/Hamburg/GermanUnityDay.php | 9 +++-- tests/Germany/Hamburg/HamburgBaseTestCase.php | 9 +++-- tests/Germany/Hamburg/HamburgTest.php | 9 +++-- .../Hamburg/ReformationDay2017Test.php | 9 +++-- tests/Germany/Hesse/CorpusChristiTest.php | 9 +++-- tests/Germany/Hesse/GermanUnityDayTest.php | 9 +++-- tests/Germany/Hesse/HesseBaseTestCase.php | 9 +++-- tests/Germany/Hesse/HesseTest.php | 9 +++-- .../Germany/Hesse/ReformationDay2017Test.php | 9 +++-- tests/Germany/InternationalWorkersDayTest.php | 9 +++-- .../LowerSaxony/GermanUnityDayTest.php | 9 +++-- .../LowerSaxony/LowerSaxonyBaseTestCase.php | 9 +++-- tests/Germany/LowerSaxony/LowerSaxonyTest.php | 9 +++-- .../LowerSaxony/ReformationDay2017Test.php | 9 +++-- .../LowerSaxony/ReformationDayTest.php | 9 +++-- .../GermanUnityDayTest.php | 9 +++-- .../InternationalWomensDayTest.php | 11 ++++--- ...ecklenburgWesternPomeraniaBaseTestCase.php | 9 +++-- .../MecklenburgWesternPomeraniaTest.php | 9 +++-- .../ReformationDayTest.php | 9 +++-- tests/Germany/NewYearsDayTest.php | 9 +++-- tests/Germany/NewYearsEveTest.php | 9 +++-- .../NorthRhineWestphalia/AllSaintsDayTest.php | 9 +++-- .../CorpusChristiTest.php | 9 +++-- .../GermanUnityDayTest.php | 9 +++-- .../NorthRhineWestphaliaBaseTestCase.php | 9 +++-- .../NorthRhineWestphaliaTest.php | 9 +++-- .../ReformationDay2017Test.php | 9 +++-- tests/Germany/PentecostMondayTest.php | 9 +++-- tests/Germany/PentecostTest.php | 11 ++++--- tests/Germany/ReformationDay2017Test.php | 11 ++++--- .../RhinelandPalatinate/AllSaintsDayTest.php | 9 +++-- .../RhinelandPalatinate/CorpusChristiTest.php | 9 +++-- .../GermanUnityDayTest.php | 9 +++-- .../ReformationDay2017Test.php | 9 +++-- .../RhinelandPalatinateBaseTestCase.php | 9 +++-- .../RhinelandPalatinateTest.php | 9 +++-- tests/Germany/Saarland/AllSaintsDayTest.php | 9 +++-- .../Germany/Saarland/AssumptionOfMaryTest.php | 9 +++-- tests/Germany/Saarland/CorpusChristiTest.php | 9 +++-- tests/Germany/Saarland/GermanUnityDayTest.php | 9 +++-- .../Saarland/ReformationDay2017Test.php | 9 +++-- .../Germany/Saarland/SaarlandBaseTestCase.php | 9 +++-- tests/Germany/Saarland/SaarlandTest.php | 9 +++-- tests/Germany/Saxony/GermanUnityDayTest.php | 9 +++-- tests/Germany/Saxony/ReformationDayTest.php | 9 +++-- .../Saxony/RepentanceAndPrayerDayTest.php | 9 +++-- tests/Germany/Saxony/SaxonyBaseTestCase.php | 9 +++-- tests/Germany/Saxony/SaxonyTest.php | 9 +++-- tests/Germany/SaxonyAnhalt/EpiphanyTest.php | 9 +++-- .../SaxonyAnhalt/GermanUnityDayTest.php | 9 +++-- .../SaxonyAnhalt/ReformationDayTest.php | 9 +++-- .../SaxonyAnhalt/SaxonyAnhaltBaseTestCase.php | 9 +++-- .../Germany/SaxonyAnhalt/SaxonyAnhaltTest.php | 9 +++-- .../SchleswigHolstein/GermanUnityDayTest.php | 9 +++-- .../ReformationDay2017Test.php | 9 +++-- .../SchleswigHolstein/ReformationDayTest.php | 9 +++-- .../SchleswigHolsteinBaseTestCase.php | 9 +++-- .../SchleswigHolsteinTest.php | 9 +++-- tests/Germany/SecondChristmasDayTest.php | 9 +++-- .../Germany/Thuringia/GermanUnityDayTest.php | 9 +++-- .../Germany/Thuringia/ReformationDayTest.php | 9 +++-- .../Thuringia/ThuringiaBaseTestCase.php | 9 +++-- tests/Germany/Thuringia/ThuringiaTest.php | 9 +++-- .../Thuringia/WorldChildrensDayTest.php | 9 +++-- tests/Greece/AnnunciationTest.php | 9 +++-- tests/Greece/AscensionDayTest.php | 9 +++-- tests/Greece/AssumptionOfMaryTest.php | 9 +++-- tests/Greece/ChristmasDayTest.php | 9 +++-- tests/Greece/CleanMondayTest.php | 9 +++-- tests/Greece/EasterMondayTest.php | 9 +++-- tests/Greece/EasterTest.php | 9 +++-- tests/Greece/EpiphanyTest.php | 9 +++-- tests/Greece/GreeceBaseTestCase.php | 9 +++-- tests/Greece/GreeceTest.php | 9 +++-- tests/Greece/IndependenceDayTest.php | 9 +++-- tests/Greece/InternationalWorkersDayTest.php | 9 +++-- tests/Greece/NewYearsDayTest.php | 9 +++-- tests/Greece/OhiDayTest.php | 9 +++-- tests/Greece/PentecostMondayTest.php | 9 +++-- tests/Greece/PentecostTest.php | 9 +++-- tests/Greece/PolytechnioTest.php | 9 +++-- tests/Greece/ThreeHolyHierarchsTest.php | 9 +++-- tests/Greece/goodFridayTest.php | 9 +++-- tests/HolidayTestCase.php | 9 +++-- tests/Hungary/AllSaintsDayTest.php | 9 +++-- tests/Hungary/ChristmasTest.php | 9 +++-- tests/Hungary/EasterMondayTest.php | 9 +++-- tests/Hungary/EasterTest.php | 9 +++-- tests/Hungary/HungaryBaseTestCase.php | 9 +++-- tests/Hungary/HungaryTest.php | 9 +++-- tests/Hungary/InternationalWorkersDayTest.php | 9 +++-- tests/Hungary/MemorialDay1848Test.php | 9 +++-- tests/Hungary/MemorialDay1956Test.php | 9 +++-- tests/Hungary/NewYearsDayTest.php | 9 +++-- tests/Hungary/PentecostMondayTest.php | 9 +++-- tests/Hungary/PentecostTest.php | 9 +++-- tests/Hungary/SecondChristmasDayTest.php | 9 +++-- tests/Hungary/StateFoundationDayTest.php | 9 +++-- tests/Ireland/AugustHolidayTest.php | 9 +++-- tests/Ireland/ChristmasDayTest.php | 11 ++++--- tests/Ireland/EasterMondayTest.php | 9 +++-- tests/Ireland/EasterTest.php | 9 +++-- tests/Ireland/GoodFridayTest.php | 9 +++-- tests/Ireland/IrelandBaseTestCase.php | 9 +++-- tests/Ireland/IrelandTest.php | 9 +++-- tests/Ireland/JuneHolidayTest.php | 9 +++-- tests/Ireland/MayDayTest.php | 9 +++-- tests/Ireland/NewYearsDayTest.php | 11 ++++--- tests/Ireland/OctoberHolidayTest.php | 9 +++-- tests/Ireland/PentecostTest.php | 9 +++-- tests/Ireland/StPatricksDayTest.php | 11 ++++--- tests/Ireland/StStephensDayTest.php | 11 ++++--- tests/Ireland/pentecostMondayTest.php | 9 +++-- tests/Italy/AllSaintsDayTest.php | 9 +++-- tests/Italy/AssumptionOfMaryTest.php | 9 +++-- tests/Italy/ChristmasTest.php | 9 +++-- tests/Italy/EasterMondayTest.php | 9 +++-- tests/Italy/EasterTest.php | 9 +++-- tests/Italy/EpiphanyTest.php | 9 +++-- tests/Italy/ImmaculateConceptionTest.php | 9 +++-- tests/Italy/InternationalWorkersDayTest.php | 9 +++-- tests/Italy/ItalyBaseTestCase.php | 9 +++-- tests/Italy/ItalyTest.php | 9 +++-- tests/Italy/LiberationDayTest.php | 9 +++-- tests/Italy/NewYearsDayTest.php | 9 +++-- tests/Italy/RepublicDayTest.php | 9 +++-- tests/Italy/stStephensDayTest.php | 9 +++-- tests/Japan/AutumnalEquinoxDayTest.php | 9 +++-- tests/Japan/ChildrensDayTest.php | 11 ++++--- tests/Japan/ComingOfAgeDayTest.php | 9 +++-- tests/Japan/ConstitutionMemorialDayTest.php | 11 ++++--- tests/Japan/CoronationDayTest.php | 9 +++-- tests/Japan/CultureDayTest.php | 11 ++++--- tests/Japan/EmperorsBirthdayTest.php | 11 ++++--- .../EnthronementProclamationCeremonyTest.php | 9 +++-- tests/Japan/GreeneryDayTest.php | 13 +++++--- tests/Japan/JapanBaseTestCase.php | 9 +++-- tests/Japan/JapanTest.php | 9 +++-- tests/Japan/LabourThanksgivingDayTest.php | 11 ++++--- tests/Japan/MarineDayTest.php | 11 ++++--- tests/Japan/MountainDayTest.php | 11 ++++--- tests/Japan/NationalFoundationDayTest.php | 11 ++++--- tests/Japan/NewYearsDayTest.php | 11 ++++--- tests/Japan/PublicBridgeDayTest.php | 17 ++++++---- tests/Japan/RespectForTheAgedDayTest.php | 11 ++++--- tests/Japan/ShowaDayTest.php | 11 ++++--- tests/Japan/SportsDayTest.php | 11 ++++--- tests/Japan/VernalEquinoxDayTest.php | 9 +++-- tests/Latvia/ChristmasDayTest.php | 8 +++-- tests/Latvia/ChristmasEveDayTest.php | 8 +++-- tests/Latvia/EasterDayTest.php | 8 +++-- tests/Latvia/EasterMondayDayTest.php | 8 +++-- tests/Latvia/GoodFridayDayTest.php | 8 +++-- tests/Latvia/InternationalWorkersDayTest.php | 8 +++-- tests/Latvia/LatviaBaseTestCase.php | 8 +++-- tests/Latvia/LatviaTest.php | 8 +++-- tests/Latvia/MidsummerEveDayTest.php | 8 +++-- tests/Latvia/NewYearsDayTest.php | 8 +++-- tests/Latvia/NewYearsEveDayTest.php | 8 +++-- ...oclamationOfTheRepublicOfLatviaDayTest.php | 8 +++-- .../RestorationOfIndependenceDayTest.php | 8 +++-- tests/Latvia/SecondChristmasDayTest.php | 8 +++-- tests/Latvia/StJohnsDayTest.php | 8 +++-- tests/Lithuania/AllSaintsDayTest.php | 8 +++-- tests/Lithuania/AllSoulsDayTest.php | 8 +++-- tests/Lithuania/AssumptionOfMaryDayTest.php | 8 +++-- tests/Lithuania/ChristmasDayTest.php | 8 +++-- tests/Lithuania/ChristmasEveDayTest.php | 8 +++-- tests/Lithuania/EasterDayTest.php | 8 +++-- tests/Lithuania/EasterMondayDayTest.php | 8 +++-- .../Lithuania/InternationalWorkersDayTest.php | 8 +++-- tests/Lithuania/LithuaniaBaseTestCase.php | 8 +++-- tests/Lithuania/LithuaniaTest.php | 8 +++-- tests/Lithuania/NewYearsDayTest.php | 8 +++-- ...rationOfIndependenceOfLithuaniaDayTest.php | 8 +++-- ...estorationOfTheStateOfLithuaniaDayTest.php | 8 +++-- tests/Lithuania/SecondChristmasDayTest.php | 8 +++-- tests/Lithuania/StJohnsDayTest.php | 8 +++-- tests/Lithuania/StatehoodDayTest.php | 8 +++-- tests/Luxembourg/AllSaintsDayTest.php | 9 +++-- tests/Luxembourg/AscensionDayTest.php | 9 +++-- tests/Luxembourg/AssumptionOfMaryTest.php | 9 +++-- tests/Luxembourg/ChristmasDayTest.php | 9 +++-- tests/Luxembourg/EasterMondayTest.php | 9 +++-- tests/Luxembourg/EuropeDayTest.php | 9 +++-- .../InternationalWorkersDayTest.php | 9 +++-- tests/Luxembourg/LuxembourgBaseTestCase.php | 9 +++-- tests/Luxembourg/LuxembourgTest.php | 9 +++-- tests/Luxembourg/NationalDayTest.php | 9 +++-- tests/Luxembourg/NewYearsDayTest.php | 9 +++-- tests/Luxembourg/PentecostMondayTest.php | 9 +++-- tests/Luxembourg/SecondChristmasDayTest.php | 9 +++-- tests/Mexico/AllSaintsDayTest.php | 9 +++-- tests/Mexico/AssumptionOfMaryTest.php | 9 +++-- tests/Mexico/BenitoJuarezBirthdayTest.php | 15 ++++++++- tests/Mexico/ChristmasTest.php | 9 +++-- tests/Mexico/EasterMondayTest.php | 9 +++-- tests/Mexico/EpiphanyTest.php | 9 +++-- tests/Mexico/GoodFridayTest.php | 9 +++-- tests/Mexico/ImmaculateConceptionTest.php | 9 +++-- tests/Mexico/IndependenceDayTest.php | 9 +++-- tests/Mexico/InternationalWorkersDayTest.php | 9 +++-- tests/Mexico/MexicoBaseTestCase.php | 9 +++-- tests/Mexico/NewYearsDayTest.php | 15 ++++++++- tests/Mexico/VirginOfGuadalupeTest.php | 15 ++++++++- tests/Netherlands/AscensionDayTest.php | 9 +++-- tests/Netherlands/AshWednesdayTest.php | 9 +++-- tests/Netherlands/ChristmasDayTest.php | 9 +++-- tests/Netherlands/CommemorationDayTest.php | 9 +++-- tests/Netherlands/DaylightSavingTime.php | 8 +++-- tests/Netherlands/EasterMondayTest.php | 9 +++-- tests/Netherlands/EasterTest.php | 9 +++-- tests/Netherlands/EpiphanyTest.php | 9 +++-- tests/Netherlands/FathersDayTest.php | 9 +++-- tests/Netherlands/GoodFridayTest.php | 9 +++-- tests/Netherlands/HalloweenTest.php | 9 +++-- .../InternationalWorkersDayTest.php | 9 +++-- tests/Netherlands/KingsDayTest.php | 9 +++-- tests/Netherlands/LiberationDayTest.php | 9 +++-- tests/Netherlands/MothersDayTest.php | 9 +++-- tests/Netherlands/NetherlandsBaseTestCase.php | 9 +++-- tests/Netherlands/NetherlandsTest.php | 9 +++-- tests/Netherlands/NewYearsDayTest.php | 9 +++-- tests/Netherlands/PentecostTest.php | 9 +++-- tests/Netherlands/QueensDayTest.php | 9 +++-- tests/Netherlands/ValentinesDayTest.php | 9 +++-- tests/Netherlands/WorldAnimalDayTest.php | 9 +++-- tests/Netherlands/carnivalDayTest.php | 9 +++-- tests/Netherlands/pentecostMondayTest.php | 9 +++-- tests/Netherlands/princesDayTest.php | 9 +++-- tests/Netherlands/secondCarnivalDay.php | 9 +++-- tests/Netherlands/secondChristmasdayTest.php | 9 +++-- tests/Netherlands/stMartinsDayTest.php | 9 +++-- tests/Netherlands/stNicholasDayTest.php | 9 +++-- tests/Netherlands/thirdCarnivalDay.php | 9 +++-- tests/NewZealand/AnzacDayTest.php | 9 +++-- tests/NewZealand/BoxingDayTest.php | 9 +++-- tests/NewZealand/ChristmasDayTest.php | 9 +++-- tests/NewZealand/DayAfterNewYearsDayTest.php | 9 +++-- tests/NewZealand/EasterMondayTest.php | 9 +++-- tests/NewZealand/GoodFridayTest.php | 9 +++-- tests/NewZealand/LabourDayTest.php | 11 ++++--- tests/NewZealand/NewYearsDayTest.php | 9 +++-- tests/NewZealand/NewZealandBaseTestCase.php | 9 +++-- tests/NewZealand/NewZealandTest.php | 9 +++-- tests/NewZealand/QueensBirthdayTest.php | 9 +++-- tests/NewZealand/WaitangiDayTest.php | 9 +++-- tests/Norway/AscensionDayTest.php | 9 +++-- tests/Norway/ChristmasDayTest.php | 9 +++-- tests/Norway/ConstitutionDayTest.php | 9 +++-- tests/Norway/EasterMondayTest.php | 9 +++-- tests/Norway/EasterTest.php | 9 +++-- tests/Norway/GoodFridayTest.php | 9 +++-- tests/Norway/InternationalWorkersDayTest.php | 9 +++-- tests/Norway/MaundyThursdayTest.php | 9 +++-- tests/Norway/NewYearsDayTest.php | 9 +++-- tests/Norway/NorwayBaseTestCase.php | 9 +++-- tests/Norway/NorwayTest.php | 9 +++-- tests/Norway/PentecostMondayTest.php | 9 +++-- tests/Norway/PentecostTest.php | 9 +++-- tests/Norway/SecondChristmasDayTest.php | 9 +++-- tests/Poland/AllSaintsDayTest.php | 9 +++-- tests/Poland/AssumptionOfMaryTest.php | 9 +++-- tests/Poland/ChristmasTest.php | 9 +++-- tests/Poland/ConstitutionDayTest.php | 9 +++-- tests/Poland/CorpusChristiTest.php | 9 +++-- tests/Poland/EasterMondayTest.php | 9 +++-- tests/Poland/EasterTest.php | 9 +++-- tests/Poland/EpiphanyTest.php | 9 +++-- tests/Poland/IndependenceDayTest.php | 9 +++-- tests/Poland/InternationalWorkersDayTest.php | 9 +++-- tests/Poland/NewYearsDayTest.php | 9 +++-- tests/Poland/PentecostTest.php | 9 +++-- tests/Poland/PolandBaseTestCase.php | 9 +++-- tests/Poland/PolandTest.php | 9 +++-- tests/Poland/SecondChristmasDayTest.php | 9 +++-- tests/Portugal/AllSaintsDayTest.php | 9 +++-- tests/Portugal/AssumptionOfMaryTest.php | 9 +++-- tests/Portugal/CarnationRevolutionDayTest.php | 9 +++-- tests/Portugal/ChristmasTest.php | 9 +++-- tests/Portugal/CorpusChristiTest.php | 9 +++-- tests/Portugal/EasterTest.php | 9 +++-- tests/Portugal/GoodFridayTest.php | 9 +++-- tests/Portugal/ImmaculateConceptionTest.php | 9 +++-- .../Portugal/InternationalWorkersDayTest.php | 9 +++-- tests/Portugal/NewYearsDayTest.php | 9 +++-- tests/Portugal/PortugalBaseTestCase.php | 9 +++-- tests/Portugal/PortugalDayTest.php | 9 +++-- tests/Portugal/PortugalTest.php | 9 +++-- tests/Portugal/PortugueseRepublicDayTest.php | 9 +++-- .../RestorationOfIndependenceTest.php | 9 +++-- tests/ProviderTestCase.php | 9 +++-- tests/Randomizer.php | 12 ++++--- tests/Romania/AssumptionOfMaryTest.php | 9 +++-- tests/Romania/ChildrensDayTest.php | 9 +++-- tests/Romania/ChristmasDayTest.php | 9 +++-- tests/Romania/ConstantinBrancusiDayTest.php | 9 +++-- tests/Romania/DayAfterNewYearsDayTest.php | 9 +++-- tests/Romania/EasterMondayTest.php | 9 +++-- tests/Romania/EasterTest.php | 9 +++-- tests/Romania/EpiphanyTest.php | 9 +++-- tests/Romania/InternationalWorkersDayTest.php | 9 +++-- tests/Romania/NationalDayTest.php | 9 +++-- tests/Romania/NewYearsDayTest.php | 9 +++-- tests/Romania/PentecostMondayTest.php | 9 +++-- tests/Romania/PentecostTest.php | 9 +++-- tests/Romania/RomaniaBaseTestCase.php | 9 +++-- tests/Romania/RomaniaTest.php | 8 +++-- tests/Romania/SecondChristmasDayTest.php | 9 +++-- tests/Romania/StAndrewsDayTest.php | 9 +++-- tests/Romania/StJohnsDayTest.php | 9 +++-- tests/Romania/UnitedPrincipalitiesDayTest.php | 9 +++-- .../Russia/DefenceOfTheFatherlandDayTest.php | 9 +++-- tests/Russia/InternationalWomensDayTest.php | 8 +++-- tests/Russia/NewYearHolidaysDay2Test.php | 8 +++-- tests/Russia/NewYearHolidaysDay3Test.php | 8 +++-- tests/Russia/NewYearHolidaysDay4Test.php | 9 +++-- tests/Russia/NewYearHolidaysDay5Test.php | 8 +++-- tests/Russia/NewYearHolidaysDay6Test.php | 8 +++-- tests/Russia/NewYearHolidaysDay8Test.php | 9 +++-- tests/Russia/NewYearsDayTest.php | 8 +++-- tests/Russia/OrthodoxChristmasDayTest.php | 8 +++-- tests/Russia/RussiaBaseTestCase.php | 8 +++-- tests/Russia/RussiaDayTest.php | 8 +++-- tests/Russia/RussiaTest.php | 8 +++-- tests/Russia/SpringAndLabourDayTest.php | 8 +++-- tests/Russia/UnityDayTest.php | 8 +++-- tests/Russia/VictoryDayTest.php | 8 +++-- tests/Slovakia/AllSaintsDayTest.php | 8 +++-- tests/Slovakia/ChristmasDayTest.php | 8 +++-- tests/Slovakia/ChristmasEveTest.php | 8 +++-- tests/Slovakia/EasterMondayTest.php | 8 +++-- tests/Slovakia/EpiphanyTest.php | 8 +++-- tests/Slovakia/GoodFridayTest.php | 8 +++-- .../Slovakia/InternationalWorkersDayTest.php | 8 +++-- tests/Slovakia/OurLadyOfSorrowsDayTest.php | 8 +++-- .../SaintsCyrilAndMethodiusDayTest.php | 8 +++-- tests/Slovakia/SecondChristmasDayTest.php | 8 +++-- tests/Slovakia/SlovakConstitutionDayTest.php | 8 +++-- tests/Slovakia/SlovakIndependenceDayTest.php | 8 +++-- .../SlovakNationalUprisingDayTest.php | 8 +++-- tests/Slovakia/SlovakiaBaseTestCase.php | 8 +++-- tests/Slovakia/SlovakiaTest.php | 8 +++-- .../StruggleForFreedomAndDemocracyDayTest.php | 8 +++-- tests/Slovakia/VictoryInEuropeDayTest.php | 8 +++-- tests/SouthAfrica/ChristmasDayTest.php | 11 ++++--- tests/SouthAfrica/FamilyDayTest.php | 9 +++-- tests/SouthAfrica/FreedomDayTest.php | 11 ++++--- tests/SouthAfrica/GoodFridayTest.php | 9 +++-- tests/SouthAfrica/HeritageDayTest.php | 11 ++++--- tests/SouthAfrica/HumanRightsDayTest.php | 11 ++++--- .../MunicipalElections2016DayTest.php | 11 ++++--- tests/SouthAfrica/NationalWomensDayTest.php | 11 ++++--- tests/SouthAfrica/NewYearsDayTest.php | 11 ++++--- tests/SouthAfrica/ReconciliationDayTest.php | 11 ++++--- tests/SouthAfrica/SecondChristmasDayTest.php | 11 ++++--- tests/SouthAfrica/SouthAfricaBaseTestCase.php | 8 +++-- tests/SouthAfrica/SouthAfricaTest.php | 8 +++-- .../SubstituteDayOfGoodwillTest.php | 11 ++++--- tests/SouthAfrica/WorkersDayTest.php | 11 ++++--- tests/SouthAfrica/YouthDayTest.php | 11 ++++--- tests/SouthKorea/ArborDayTest.php | 8 +++-- tests/SouthKorea/ArmedForcesDayTest.php | 8 +++-- tests/SouthKorea/BuddhasBirthdayTest.php | 8 +++-- tests/SouthKorea/ChildrensDayTest.php | 8 +++-- tests/SouthKorea/ChristmasDayTest.php | 8 +++-- tests/SouthKorea/ChuseokTest.php | 8 +++-- tests/SouthKorea/ConstitutionDayTest.php | 8 +++-- tests/SouthKorea/GaecheonjeolTest.php | 8 +++-- tests/SouthKorea/HangulDayTest.php | 8 +++-- .../IndependenceMovementDayTest.php | 8 +++-- tests/SouthKorea/LiberationDayTest.php | 8 +++-- tests/SouthKorea/MemorialDayTest.php | 8 +++-- tests/SouthKorea/NewYearsDayTest.php | 8 +++-- tests/SouthKorea/SeollalTest.php | 8 +++-- tests/SouthKorea/SouthKoreaBaseTestCase.php | 8 +++-- tests/SouthKorea/SouthKoreaTest.php | 8 +++-- tests/SouthKorea/UnitedNationsDayTest.php | 8 +++-- tests/Spain/AllSaintsDayTest.php | 9 +++-- .../Spain/Andalusia/AndalusiaBaseTestCase.php | 9 +++-- tests/Spain/Andalusia/AndalusiaDayTest.php | 9 +++-- tests/Spain/Andalusia/AndalusiaTest.php | 9 +++-- tests/Spain/Aragon/AragonBaseTestCase.php | 9 +++-- tests/Spain/Aragon/AragonTest.php | 9 +++-- tests/Spain/Aragon/StGeorgesDayTest.php | 9 +++-- tests/Spain/AssumptionOfMaryTest.php | 9 +++-- tests/Spain/Asturias/AsturiasBaseTestCase.php | 9 +++-- tests/Spain/Asturias/AsturiasDayTest.php | 9 +++-- tests/Spain/Asturias/AsturiasTest.php | 9 +++-- .../BalearicIslandsBaseTestCase.php | 9 +++-- .../BalearicIslandsDayTest.php | 9 +++-- .../BalearicIslands/BalearicIslandsTest.php | 9 +++-- .../BasqueCountryBaseTestCase.php | 9 +++-- .../BasqueCountry/BasqueCountryDayTest.php | 9 +++-- .../Spain/BasqueCountry/BasqueCountryTest.php | 9 +++-- .../CanaryIslandsBaseTestCase.php | 9 +++-- .../CanaryIslands/CanaryIslandsDayTest.php | 9 +++-- .../Spain/CanaryIslands/CanaryIslandsTest.php | 9 +++-- .../Spain/Cantabria/CantabriaBaseTestCase.php | 9 +++-- tests/Spain/Cantabria/CantabriaDayTest.php | 9 +++-- tests/Spain/Cantabria/CantabriaTest.php | 9 +++-- .../CastileAndLeonBaseTestCase.php | 9 +++-- .../CastileAndLeon/CastileAndLeonDayTest.php | 9 +++-- .../CastileAndLeon/CastileAndLeonTest.php | 9 +++-- .../CastillaLaManchaBaseTestCase.php | 9 +++-- .../CastillaLaManchaDayTest.php | 9 +++-- .../CastillaLaMancha/CastillaLaManchaTest.php | 9 +++-- .../Spain/Catalonia/CataloniaBaseTestCase.php | 9 +++-- tests/Spain/Catalonia/CataloniaTest.php | 9 +++-- .../Catalonia/nationalCataloniaDayTest.php | 9 +++-- tests/Spain/Catalonia/stJohnsDayTest.php | 9 +++-- tests/Spain/Ceuta/CeutaBaseTestCase.php | 9 +++-- tests/Spain/Ceuta/CeutaTest.php | 9 +++-- tests/Spain/Ceuta/ceutaDayTest.php | 9 +++-- tests/Spain/ChristmasTest.php | 9 +++-- .../CommunityOfMadridBaseTestCase.php | 9 +++-- .../CommunityOfMadridTest.php | 9 +++-- .../DosdeMayoUprisingDayTest.php | 9 +++-- tests/Spain/ConstitutionDayTest.php | 9 +++-- tests/Spain/EasterMondayTest.php | 9 +++-- tests/Spain/EpiphanyTest.php | 9 +++-- .../Extremadura/ExtremaduraBaseTestCase.php | 9 +++-- .../Spain/Extremadura/ExtremaduraDayTest.php | 9 +++-- tests/Spain/Extremadura/ExtremaduraTest.php | 9 +++-- tests/Spain/Galicia/GaliciaBaseTestCase.php | 9 +++-- tests/Spain/Galicia/GaliciaTest.php | 9 +++-- .../Galicia/GalicianLiteratureDayTest.php | 9 +++-- tests/Spain/Galicia/stJamesDayTest.php | 9 +++-- tests/Spain/GoodFridayTest.php | 9 +++-- tests/Spain/ImmaculateConceptionTest.php | 9 +++-- tests/Spain/InternationalWorkersDayTest.php | 9 +++-- tests/Spain/LaRioja/LaRiojaBaseTestCase.php | 9 +++-- tests/Spain/LaRioja/LaRiojaDayTest.php | 9 +++-- tests/Spain/LaRioja/LaRiojaTest.php | 9 +++-- tests/Spain/MaundyThursdayTest.php | 9 +++-- tests/Spain/Melilla/MelillaBaseTestCase.php | 9 +++-- tests/Spain/Melilla/MelillaTest.php | 9 +++-- tests/Spain/NationalDayTest.php | 9 +++-- tests/Spain/Navarre/NavarreBaseTestCase.php | 9 +++-- tests/Spain/Navarre/NavarreTest.php | 9 +++-- tests/Spain/NewYearsDayTest.php | 9 +++-- .../RegionOfMurciaBaseTestCase.php | 9 +++-- .../RegionOfMurcia/RegionOfMurciaDayTest.php | 9 +++-- .../RegionOfMurcia/RegionOfMurciaTest.php | 9 +++-- tests/Spain/SpainBaseTestCase.php | 9 +++-- tests/Spain/SpainTest.php | 9 +++-- .../ValencianCommunityBaseTestCase.php | 9 +++-- .../ValencianCommunityDayTest.php | 9 +++-- .../ValencianCommunityTest.php | 9 +++-- tests/Spain/ValentinesDayTest.php | 9 +++-- tests/Spain/stJosephsDayTest.php | 9 +++-- tests/Sweden/AllSaintsDayTest.php | 9 +++-- tests/Sweden/AllSaintsEveTest.php | 9 +++-- tests/Sweden/AscensionDayTest.php | 9 +++-- tests/Sweden/ChristmasDayTest.php | 9 +++-- tests/Sweden/ChristmasEveTest.php | 9 +++-- tests/Sweden/EasterMondayTest.php | 9 +++-- tests/Sweden/EasterTest.php | 9 +++-- tests/Sweden/EpiphanyEveTest.php | 9 +++-- tests/Sweden/EpiphanyTest.php | 9 +++-- tests/Sweden/GoodFridayTest.php | 9 +++-- tests/Sweden/InternationalWorkersDayTest.php | 9 +++-- tests/Sweden/NationalDayTest.php | 9 +++-- tests/Sweden/NewYearsDayTest.php | 9 +++-- tests/Sweden/NewYearsEveTest.php | 9 +++-- tests/Sweden/PentecostTest.php | 9 +++-- tests/Sweden/SecondChristmasDayTest.php | 9 +++-- tests/Sweden/StJohnsDayTest.php | 9 +++-- tests/Sweden/StJohnsEveTest.php | 9 +++-- tests/Sweden/SwedenBaseTestCase.php | 9 +++-- tests/Sweden/SwedenTest.php | 9 +++-- tests/Sweden/WalpurgisEveTest.php | 9 +++-- .../Switzerland/Aargau/AargauBaseTestCase.php | 9 +++-- tests/Switzerland/Aargau/AargauTest.php | 9 +++-- tests/Switzerland/Aargau/AscensionDayTest.php | 9 +++-- tests/Switzerland/Aargau/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Aargau/GoodFridayTest.php | 9 +++-- tests/Switzerland/Aargau/NewYearsDayTest.php | 9 +++-- .../AppenzellAusserrhodenBaseTestCase.php | 9 +++-- .../AppenzellAusserrhodenTest.php | 9 +++-- .../AscensionDayTest.php | 9 +++-- .../ChristmasDayTest.php | 9 +++-- .../EasterMondayTest.php | 9 +++-- .../AppenzellAusserrhoden/GoodFridayTest.php | 9 +++-- .../AppenzellAusserrhoden/NewYearsDayTest.php | 9 +++-- .../PentecostMondayTest.php | 9 +++-- .../StStephensDayTest.php | 9 +++-- .../AppenzellInnerrhoden/AllSaintsDayTest.php | 9 +++-- .../AppenzellInnerrhodenBaseTestCase.php | 9 +++-- .../AppenzellInnerrhodenTest.php | 9 +++-- .../AppenzellInnerrhoden/AscensionDayTest.php | 9 +++-- .../AssumptionOfMaryTest.php | 9 +++-- .../AppenzellInnerrhoden/ChristmasDayTest.php | 9 +++-- .../CorpusChristiTest.php | 9 +++-- .../AppenzellInnerrhoden/EasterMondayTest.php | 9 +++-- .../AppenzellInnerrhoden/GoodFridayTest.php | 9 +++-- .../ImmaculateConceptionTest.php | 9 +++-- .../AppenzellInnerrhoden/NewYearsDayTest.php | 9 +++-- .../PentecostMondayTest.php | 9 +++-- .../StStephensDayTest.php | 9 +++-- .../BaselLandschaft/AscensionDayTest.php | 9 +++-- .../BaselLandschaftBaseTestCase.php | 9 +++-- .../BaselLandschaft/BaselLandschaftTest.php | 9 +++-- .../BaselLandschaft/ChristmasDayTest.php | 9 +++-- .../BaselLandschaft/EasterMondayTest.php | 9 +++-- .../BaselLandschaft/GoodFridayTest.php | 9 +++-- .../BaselLandschaft/NewYearsDayTest.php | 9 +++-- .../BaselLandschaft/PentecostMondayTest.php | 9 +++-- .../BaselLandschaft/StStephensDayTest.php | 9 +++-- .../BaselLandschaft/WorkersDayTest.php | 9 +++-- .../BaselStadt/AscensionDayTest.php | 9 +++-- .../BaselStadt/BaselStadtBaseTestCase.php | 9 +++-- .../Switzerland/BaselStadt/BaselStadtTest.php | 9 +++-- .../BaselStadt/ChristmasDayTest.php | 9 +++-- .../BaselStadt/EasterMondayTest.php | 9 +++-- .../Switzerland/BaselStadt/GoodFridayTest.php | 9 +++-- .../BaselStadt/NewYearsDayTest.php | 9 +++-- .../BaselStadt/PentecostMondayTest.php | 9 +++-- .../BaselStadt/StStephensDayTest.php | 9 +++-- .../Switzerland/BaselStadt/WorkersDayTest.php | 9 +++-- tests/Switzerland/Bern/AscensionDayTest.php | 9 +++-- tests/Switzerland/Bern/BerchtoldsTagTest.php | 11 ++++--- tests/Switzerland/Bern/BernBaseTestCase.php | 9 +++-- tests/Switzerland/Bern/BernTest.php | 9 +++-- tests/Switzerland/Bern/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Bern/EasterMondayTest.php | 9 +++-- tests/Switzerland/Bern/GoodFridayTest.php | 9 +++-- tests/Switzerland/Bern/NewYearsDayTest.php | 9 +++-- .../Switzerland/Bern/PentecostMondayTest.php | 9 +++-- tests/Switzerland/Bern/StStephensDayTest.php | 9 +++-- .../Switzerland/Fribourg/AllSaintsDayTest.php | 9 +++-- .../Switzerland/Fribourg/AscensionDayTest.php | 9 +++-- .../Fribourg/AssumptionOfMaryTest.php | 9 +++-- .../Fribourg/BerchtoldsTagTest.php | 11 ++++--- .../Switzerland/Fribourg/ChristmasDayTest.php | 9 +++-- .../Fribourg/CorpusChristiTest.php | 9 +++-- .../Switzerland/Fribourg/December26thTest.php | 9 +++-- .../Switzerland/Fribourg/EasterMondayTest.php | 9 +++-- .../Fribourg/FribourgBaseTestCase.php | 9 +++-- tests/Switzerland/Fribourg/FribourgTest.php | 9 +++-- tests/Switzerland/Fribourg/GoodFridayTest.php | 9 +++-- .../Fribourg/ImmaculateConceptionTest.php | 9 +++-- .../Switzerland/Fribourg/NewYearsDayTest.php | 9 +++-- .../Fribourg/PentecostMondayTest.php | 9 +++-- tests/Switzerland/Geneva/AscensionDayTest.php | 9 +++-- tests/Switzerland/Geneva/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Geneva/EasterMondayTest.php | 9 +++-- .../Switzerland/Geneva/GenevaBaseTestCase.php | 9 +++-- tests/Switzerland/Geneva/GenevaTest.php | 9 +++-- tests/Switzerland/Geneva/GoodFridayTest.php | 9 +++-- .../Switzerland/Geneva/JeuneGenevoisTest.php | 13 +++++--- tests/Switzerland/Geneva/NewYearsDayTest.php | 9 +++-- .../Geneva/PentecostMondayTest.php | 9 +++-- .../Geneva/RestaurationGenevoiseTest.php | 11 ++++--- tests/Switzerland/Glarus/AllSaintsDayTest.php | 9 +++-- tests/Switzerland/Glarus/AscensionDayTest.php | 9 +++-- .../Switzerland/Glarus/BerchtoldsTagTest.php | 11 ++++--- tests/Switzerland/Glarus/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Glarus/EasterMondayTest.php | 9 +++-- .../Switzerland/Glarus/GlarusBaseTestCase.php | 9 +++-- tests/Switzerland/Glarus/GlarusTest.php | 9 +++-- tests/Switzerland/Glarus/GoodFridayTest.php | 9 +++-- .../Switzerland/Glarus/NafelserFahrtTest.php | 11 ++++--- tests/Switzerland/Glarus/NewYearsDayTest.php | 9 +++-- .../Glarus/PentecostMondayTest.php | 9 +++-- .../Switzerland/Glarus/StStephensDayTest.php | 9 +++-- .../Switzerland/Grisons/AscensionDayTest.php | 9 +++-- .../Switzerland/Grisons/ChristmasDayTest.php | 9 +++-- .../Switzerland/Grisons/EasterMondayTest.php | 9 +++-- tests/Switzerland/Grisons/GoodFridayTest.php | 9 +++-- .../Grisons/GrisonsBaseTestCase.php | 9 +++-- tests/Switzerland/Grisons/GrisonsTest.php | 9 +++-- tests/Switzerland/Grisons/NewYearsDayTest.php | 9 +++-- .../Grisons/PentecostMondayTest.php | 9 +++-- .../Switzerland/Grisons/StStephensDayTest.php | 9 +++-- tests/Switzerland/Jura/AllSaintsDayTest.php | 9 +++-- tests/Switzerland/Jura/AscensionDayTest.php | 9 +++-- .../Switzerland/Jura/AssumptionOfMaryTest.php | 9 +++-- tests/Switzerland/Jura/BerchtoldsTagTest.php | 11 ++++--- tests/Switzerland/Jura/BettagsMontagTest.php | 11 ++++--- tests/Switzerland/Jura/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Jura/CorpusChristiTest.php | 9 +++-- tests/Switzerland/Jura/EasterMondayTest.php | 9 +++-- tests/Switzerland/Jura/EasterTest.php | 9 +++-- tests/Switzerland/Jura/GoodFridayTest.php | 9 +++-- tests/Switzerland/Jura/JuraBaseTestCase.php | 9 +++-- tests/Switzerland/Jura/JuraTest.php | 9 +++-- tests/Switzerland/Jura/NewYearsDayTest.php | 9 +++-- .../Switzerland/Jura/PentecostMondayTest.php | 9 +++-- tests/Switzerland/Jura/PentecostTest.php | 9 +++-- .../Jura/PlebisciteJurassienTest.php | 9 +++-- tests/Switzerland/Jura/WorkersDayTest.php | 9 +++-- .../Switzerland/Lucerne/AllSaintsDayTest.php | 9 +++-- .../Switzerland/Lucerne/AscensionDayTest.php | 9 +++-- .../Lucerne/AssumptionOfMaryTest.php | 9 +++-- .../Switzerland/Lucerne/BerchtoldsTagTest.php | 11 ++++--- .../Switzerland/Lucerne/ChristmasDayTest.php | 9 +++-- .../Switzerland/Lucerne/CorpusChristiTest.php | 9 +++-- .../Switzerland/Lucerne/EasterMondayTest.php | 9 +++-- tests/Switzerland/Lucerne/GoodFridayTest.php | 9 +++-- .../Lucerne/ImmaculateConceptionTest.php | 9 +++-- .../Lucerne/LucerneBaseTestCase.php | 9 +++-- tests/Switzerland/Lucerne/LucerneTest.php | 9 +++-- tests/Switzerland/Lucerne/NewYearsDayTest.php | 9 +++-- .../Lucerne/PentecostMondayTest.php | 9 +++-- .../Switzerland/Lucerne/StStephensDayTest.php | 9 +++-- .../Neuchatel/AscensionDayTest.php | 9 +++-- .../Neuchatel/BettagsMontagTest.php | 11 ++++--- .../Neuchatel/ChristmasDayTest.php | 9 +++-- .../Neuchatel/December26thTest.php | 11 ++++--- .../Neuchatel/EasterMondayTest.php | 9 +++-- .../Switzerland/Neuchatel/GoodFridayTest.php | 9 +++-- .../Neuchatel/InstaurationRepubliqueTest.php | 9 +++-- .../Switzerland/Neuchatel/January2ndTest.php | 11 ++++--- .../Neuchatel/NeuchatelBaseTestCase.php | 9 +++-- tests/Switzerland/Neuchatel/NeuchatelTest.php | 9 +++-- .../Switzerland/Neuchatel/NewYearsDayTest.php | 9 +++-- .../Neuchatel/PentecostMondayTest.php | 9 +++-- .../Switzerland/Neuchatel/WorkersDayTest.php | 9 +++-- .../Nidwalden/AllSaintsDayTest.php | 9 +++-- .../Nidwalden/AscensionDayTest.php | 9 +++-- .../Nidwalden/AssumptionOfMaryTest.php | 9 +++-- .../Nidwalden/ChristmasDayTest.php | 9 +++-- .../Nidwalden/CorpusChristiTest.php | 9 +++-- .../Nidwalden/EasterMondayTest.php | 9 +++-- .../Switzerland/Nidwalden/GoodFridayTest.php | 9 +++-- .../Nidwalden/ImmaculateConceptionTest.php | 9 +++-- .../Switzerland/Nidwalden/NewYearsDayTest.php | 9 +++-- .../Nidwalden/NidwaldenBaseTestCase.php | 9 +++-- tests/Switzerland/Nidwalden/NidwaldenTest.php | 9 +++-- .../Nidwalden/PentecostMondayTest.php | 9 +++-- .../Switzerland/Nidwalden/StJosephDayTest.php | 9 +++-- .../Nidwalden/StStephensDayTest.php | 9 +++-- .../Switzerland/Obwalden/AllSaintsDayTest.php | 9 +++-- .../Switzerland/Obwalden/AscensionDayTest.php | 9 +++-- .../Obwalden/AssumptionOfMaryTest.php | 9 +++-- .../Obwalden/BerchtoldsTagTest.php | 11 ++++--- .../Obwalden/BruderKlausenFestTest.php | 13 +++++--- .../Switzerland/Obwalden/ChristmasDayTest.php | 9 +++-- .../Obwalden/CorpusChristiTest.php | 9 +++-- .../Switzerland/Obwalden/EasterMondayTest.php | 9 +++-- tests/Switzerland/Obwalden/GoodFridayTest.php | 9 +++-- .../Obwalden/ImmaculateConceptionTest.php | 9 +++-- .../Switzerland/Obwalden/NewYearsDayTest.php | 9 +++-- .../Obwalden/ObwaldenBaseTestCase.php | 9 +++-- tests/Switzerland/Obwalden/ObwaldenTest.php | 9 +++-- .../Obwalden/PentecostMondayTest.php | 9 +++-- .../Obwalden/StStephensDayTest.php | 9 +++-- .../Schaffhausen/AscensionDayTest.php | 9 +++-- .../Schaffhausen/BerchtoldsTagTest.php | 11 ++++--- .../Schaffhausen/ChristmasDayTest.php | 9 +++-- .../Schaffhausen/EasterMondayTest.php | 9 +++-- .../Schaffhausen/GoodFridayTest.php | 9 +++-- .../Schaffhausen/NewYearsDayTest.php | 9 +++-- .../Schaffhausen/PentecostMondayTest.php | 9 +++-- .../Schaffhausen/SchaffhausenBaseTestCase.php | 9 +++-- .../Schaffhausen/SchaffhausenTest.php | 9 +++-- .../Schaffhausen/StStephensDayTest.php | 9 +++-- .../Schaffhausen/WorkersDayTest.php | 9 +++-- tests/Switzerland/Schwyz/AllSaintsDayTest.php | 9 +++-- tests/Switzerland/Schwyz/AscensionDayTest.php | 9 +++-- .../Schwyz/AssumptionOfMaryTest.php | 9 +++-- tests/Switzerland/Schwyz/ChristmasDayTest.php | 9 +++-- .../Switzerland/Schwyz/CorpusChristiTest.php | 9 +++-- tests/Switzerland/Schwyz/EasterMondayTest.php | 9 +++-- tests/Switzerland/Schwyz/EpiphanyTest.php | 9 +++-- tests/Switzerland/Schwyz/GoodFridayTest.php | 9 +++-- .../Schwyz/ImmaculateConceptionTest.php | 9 +++-- tests/Switzerland/Schwyz/NewYearsDayTest.php | 9 +++-- .../Schwyz/PentecostMondayTest.php | 9 +++-- .../Switzerland/Schwyz/SchwyzBaseTestCase.php | 9 +++-- tests/Switzerland/Schwyz/SchwyzTest.php | 9 +++-- tests/Switzerland/Schwyz/StJosephDayTest.php | 9 +++-- .../Switzerland/Schwyz/StStephensDayTest.php | 9 +++-- .../Solothurn/AscensionDayTest.php | 9 +++-- .../Solothurn/BerchtoldsTagTest.php | 11 ++++--- .../Solothurn/ChristmasDayTest.php | 9 +++-- .../Switzerland/Solothurn/GoodFridayTest.php | 9 +++-- .../Switzerland/Solothurn/NewYearsDayTest.php | 9 +++-- .../Solothurn/SolothurnBaseTestCase.php | 9 +++-- tests/Switzerland/Solothurn/SolothurnTest.php | 9 +++-- .../Switzerland/StGallen/AllSaintsDayTest.php | 9 +++-- .../Switzerland/StGallen/AscensionDayTest.php | 9 +++-- .../Switzerland/StGallen/ChristmasDayTest.php | 9 +++-- .../Switzerland/StGallen/EasterMondayTest.php | 9 +++-- tests/Switzerland/StGallen/GoodFridayTest.php | 9 +++-- .../Switzerland/StGallen/NewYearsDayTest.php | 9 +++-- .../StGallen/PentecostMondayTest.php | 9 +++-- .../StGallen/StGallenBaseTestCase.php | 9 +++-- tests/Switzerland/StGallen/StGallenTest.php | 9 +++-- .../StGallen/StStephensDayTest.php | 9 +++-- tests/Switzerland/SwissNationalDayTest.php | 9 +++-- tests/Switzerland/SwitzerlandBaseTestCase.php | 9 +++-- tests/Switzerland/SwitzerlandTest.php | 9 +++-- .../Switzerland/Thurgau/AscensionDayTest.php | 9 +++-- .../Switzerland/Thurgau/BerchtoldsTagTest.php | 11 ++++--- .../Switzerland/Thurgau/ChristmasDayTest.php | 9 +++-- .../Switzerland/Thurgau/EasterMondayTest.php | 9 +++-- tests/Switzerland/Thurgau/GoodFridayTest.php | 9 +++-- tests/Switzerland/Thurgau/NewYearsDayTest.php | 9 +++-- .../Thurgau/PentecostMondayTest.php | 9 +++-- .../Switzerland/Thurgau/StStephensDayTest.php | 9 +++-- .../Thurgau/ThurgauBaseTestCase.php | 9 +++-- tests/Switzerland/Thurgau/ThurgauTest.php | 9 +++-- tests/Switzerland/Thurgau/WorkersDayTest.php | 9 +++-- tests/Switzerland/Ticino/AllSaintsDayTest.php | 9 +++-- tests/Switzerland/Ticino/AscensionDayTest.php | 9 +++-- .../Ticino/AssumptionOfMaryTest.php | 9 +++-- tests/Switzerland/Ticino/ChristmasDayTest.php | 9 +++-- .../Switzerland/Ticino/CorpusChristiTest.php | 9 +++-- tests/Switzerland/Ticino/EasterMondayTest.php | 9 +++-- tests/Switzerland/Ticino/EpiphanyTest.php | 9 +++-- .../Ticino/ImmaculateConceptionTest.php | 9 +++-- tests/Switzerland/Ticino/NewYearsDayTest.php | 9 +++-- .../Ticino/PentecostMondayTest.php | 9 +++-- tests/Switzerland/Ticino/StJosephDayTest.php | 9 +++-- tests/Switzerland/Ticino/StPeterPaulTest.php | 9 +++-- .../Switzerland/Ticino/StStephensDayTest.php | 9 +++-- .../Switzerland/Ticino/TicinoBaseTestCase.php | 9 +++-- tests/Switzerland/Ticino/TicinoTest.php | 9 +++-- tests/Switzerland/Ticino/WorkersDayTest.php | 9 +++-- tests/Switzerland/Uri/AllSaintsDayTest.php | 9 +++-- tests/Switzerland/Uri/AscensionDayTest.php | 9 +++-- .../Switzerland/Uri/AssumptionOfMaryTest.php | 9 +++-- tests/Switzerland/Uri/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Uri/CorpusChristiTest.php | 9 +++-- tests/Switzerland/Uri/EasterMondayTest.php | 9 +++-- tests/Switzerland/Uri/EpiphanyTest.php | 9 +++-- tests/Switzerland/Uri/GoodFridayTest.php | 9 +++-- .../Uri/ImmaculateConceptionTest.php | 9 +++-- tests/Switzerland/Uri/NewYearsDayTest.php | 9 +++-- tests/Switzerland/Uri/PentecostMondayTest.php | 9 +++-- tests/Switzerland/Uri/StJosephDayTest.php | 9 +++-- tests/Switzerland/Uri/StStephensDayTest.php | 9 +++-- tests/Switzerland/Uri/UriBaseTestCase.php | 9 +++-- tests/Switzerland/Uri/UriTest.php | 9 +++-- tests/Switzerland/Valais/AllSaintsDayTest.php | 9 +++-- tests/Switzerland/Valais/AscensionDayTest.php | 9 +++-- .../Valais/AssumptionOfMaryTest.php | 9 +++-- tests/Switzerland/Valais/ChristmasDayTest.php | 9 +++-- .../Switzerland/Valais/CorpusChristiTest.php | 9 +++-- .../Valais/ImmaculateConceptionTest.php | 9 +++-- tests/Switzerland/Valais/NewYearsDayTest.php | 9 +++-- tests/Switzerland/Valais/StJosephDayTest.php | 9 +++-- .../Switzerland/Valais/ValaisBaseTestCase.php | 9 +++-- tests/Switzerland/Valais/ValaisTest.php | 9 +++-- tests/Switzerland/Vaud/AscensionDayTest.php | 9 +++-- tests/Switzerland/Vaud/BerchtoldsTagTest.php | 11 ++++--- tests/Switzerland/Vaud/BettagsMontagTest.php | 11 ++++--- tests/Switzerland/Vaud/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Vaud/EasterMondayTest.php | 9 +++-- tests/Switzerland/Vaud/GoodFridayTest.php | 9 +++-- tests/Switzerland/Vaud/NewYearsDayTest.php | 9 +++-- .../Switzerland/Vaud/PentecostMondayTest.php | 9 +++-- tests/Switzerland/Vaud/VaudBaseTestCase.php | 9 +++-- tests/Switzerland/Vaud/VaudTest.php | 9 +++-- tests/Switzerland/Zug/AllSaintsDayTest.php | 9 +++-- tests/Switzerland/Zug/AscensionDayTest.php | 9 +++-- .../Switzerland/Zug/AssumptionOfMaryTest.php | 9 +++-- tests/Switzerland/Zug/BerchtoldsTagTest.php | 11 ++++--- tests/Switzerland/Zug/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Zug/CorpusChristiTest.php | 9 +++-- tests/Switzerland/Zug/EasterMondayTest.php | 9 +++-- tests/Switzerland/Zug/GoodFridayTest.php | 9 +++-- .../Zug/ImmaculateConceptionTest.php | 9 +++-- tests/Switzerland/Zug/NewYearsDayTest.php | 9 +++-- tests/Switzerland/Zug/PentecostMondayTest.php | 9 +++-- tests/Switzerland/Zug/StStephensDayTest.php | 9 +++-- tests/Switzerland/Zug/ZugBaseTestCase.php | 9 +++-- tests/Switzerland/Zug/ZugTest.php | 9 +++-- tests/Switzerland/Zurich/AscensionDayTest.php | 9 +++-- tests/Switzerland/Zurich/ChristmasDayTest.php | 9 +++-- tests/Switzerland/Zurich/EasterMondayTest.php | 9 +++-- tests/Switzerland/Zurich/GoodFridayTest.php | 9 +++-- tests/Switzerland/Zurich/NewYearsDayTest.php | 9 +++-- .../Zurich/PentecostMondayTest.php | 9 +++-- .../Switzerland/Zurich/StStephensDayTest.php | 9 +++-- tests/Switzerland/Zurich/WorkersDayTest.php | 9 +++-- .../Switzerland/Zurich/ZurichBaseTestCase.php | 9 +++-- tests/Switzerland/Zurich/ZurichTest.php | 9 +++-- tests/Turkey/CommemorationOfAtaturkTest.php | 9 +++-- tests/Turkey/DemocracyDayTest.php | 9 +++-- tests/Turkey/LabourDayTest.php | 9 +++-- tests/Turkey/NationalSovereigntyDayTest.php | 9 +++-- tests/Turkey/NewYearsDayTest.php | 9 +++-- tests/Turkey/RepublicDayTest.php | 9 +++-- tests/Turkey/TurkeyBaseTestCase.php | 9 +++-- tests/Turkey/TurkeyTest.php | 8 +++-- tests/Turkey/VictoryDayTest.php | 9 +++-- tests/USA/ChristmasDayTest.php | 9 +++-- tests/USA/ColumbusDayTest.php | 9 +++-- tests/USA/IndependenceDayTest.php | 9 +++-- tests/USA/JuneteenthTest.php | 9 +++-- tests/USA/LabourDayTest.php | 9 +++-- tests/USA/MartinLutherKingDayTest.php | 9 +++-- tests/USA/MemorialDayTest.php | 9 +++-- tests/USA/NewYearsDayTest.php | 9 +++-- tests/USA/ThanksgivingDayTest.php | 9 +++-- tests/USA/USABaseTestCase.php | 9 +++-- tests/USA/USATest.php | 9 +++-- tests/USA/VeteransDayTest.php | 9 +++-- tests/USA/WashingtonsBirthdayTest.php | 9 +++-- tests/Ukraine/CatholicChristmasDayTest.php | 8 +++-- tests/Ukraine/ChristmasDayTest.php | 9 +++-- tests/Ukraine/ConstitutionDayTest.php | 9 +++-- tests/Ukraine/DefenderOfUkraineDayTest.php | 9 +++-- tests/Ukraine/EasterTest.php | 9 +++-- tests/Ukraine/IndependenceDayTest.php | 9 +++-- tests/Ukraine/InternationalWomensDayTest.php | 9 +++-- tests/Ukraine/InternationalWorkersDayTest.php | 9 +++-- tests/Ukraine/NewYearsDayTest.php | 9 +++-- tests/Ukraine/PentecostTest.php | 9 +++-- .../SecondInternationalWorkersDayTest.php | 8 +++-- tests/Ukraine/SubstitutedHolidayTest.php | 10 +++--- tests/Ukraine/UkraineBaseTestCase.php | 9 +++-- tests/Ukraine/UkraineTest.php | 8 +++-- tests/Ukraine/VictoryDayTest.php | 9 +++-- tests/UnitedKingdom/BoxingDayTest.php | 13 +++++--- tests/UnitedKingdom/ChristmasDayTest.php | 13 +++++--- tests/UnitedKingdom/EasterMondayTest.php | 9 +++-- tests/UnitedKingdom/England/BoxingDayTest.php | 13 +++++--- .../England/ChristmasDayTest.php | 13 +++++--- .../England/EasterMondayTest.php | 9 +++-- .../England/EnglandBaseTestCase.php | 9 +++-- tests/UnitedKingdom/England/EnglandTest.php | 9 +++-- .../UnitedKingdom/England/GoodFridayTest.php | 9 +++-- .../England/MayDayBankHolidayTest.php | 9 +++-- .../UnitedKingdom/England/NewYearsDayTest.php | 9 +++-- .../England/SpringBankHolidayTest.php | 9 +++-- .../England/SummerBankHolidayTest.php | 9 +++-- tests/UnitedKingdom/GoodFridayTest.php | 9 +++-- .../KingCharlesCoronationBankHolidayTest.php | 9 +++-- tests/UnitedKingdom/MayDayBankHolidayTest.php | 9 +++-- tests/UnitedKingdom/MotheringSundayTest.php | 8 +++-- tests/UnitedKingdom/NewYearsDayTest.php | 9 +++-- .../NorthernIreland/BattleOfTheBoyneTest.php | 11 ++++--- .../NorthernIreland/BoxingDayTest.php | 13 +++++--- .../NorthernIreland/ChristmasDayTest.php | 13 +++++--- .../NorthernIreland/EasterMondayTest.php | 9 +++-- .../NorthernIreland/GoodFridayTest.php | 9 +++-- .../NorthernIreland/MayDayBankHolidayTest.php | 9 +++-- .../NorthernIreland/NewYearsDayTest.php | 9 +++-- .../NorthernIrelandBaseTestCase.php | 9 +++-- .../NorthernIreland/NorthernIrelandTest.php | 9 +++-- .../NorthernIreland/SpringBankHolidayTest.php | 9 +++-- .../NorthernIreland/StPatricksDayTest.php | 11 ++++--- .../NorthernIreland/SummerBankHolidayTest.php | 9 +++-- .../PlatinumJubileeBankHolidayTest.php | 9 +++-- .../QueenElizabethFuneralBankHolidayTest.php | 9 +++-- .../UnitedKingdom/Scotland/BoxingDayTest.php | 13 +++++--- .../Scotland/ChristmasDayTest.php | 13 +++++--- .../UnitedKingdom/Scotland/GoodFridayTest.php | 9 +++-- .../Scotland/MayDayBankHolidayTest.php | 9 +++-- .../Scotland/NewYearsDayTest.php | 11 ++++--- .../Scotland/ScotlandBaseTestCase.php | 9 +++-- tests/UnitedKingdom/Scotland/ScotlandTest.php | 9 +++-- .../Scotland/SecondNewYearsDayTest.php | 11 ++++--- .../Scotland/SpringBankHolidayTest.php | 9 +++-- .../Scotland/StAndrewsDayTest.php | 11 ++++--- .../Scotland/SummerBankHolidayTest.php | 9 +++-- tests/UnitedKingdom/SpringBankHolidayTest.php | 9 +++-- tests/UnitedKingdom/SummerBankHolidayTest.php | 9 +++-- .../UnitedKingdomBaseTestCase.php | 9 +++-- tests/UnitedKingdom/UnitedKingdomTest.php | 11 ++++--- tests/UnitedKingdom/Wales/BoxingDayTest.php | 13 +++++--- .../UnitedKingdom/Wales/ChristmasDayTest.php | 13 +++++--- .../UnitedKingdom/Wales/EasterMondayTest.php | 9 +++-- tests/UnitedKingdom/Wales/GoodFridayTest.php | 9 +++-- .../Wales/MayDayBankHolidayTest.php | 9 +++-- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 9 +++-- .../Wales/SpringBankHolidayTest.php | 9 +++-- .../Wales/SummerBankHolidayTest.php | 9 +++-- .../UnitedKingdom/Wales/WalesBaseTestCase.php | 9 +++-- tests/UnitedKingdom/Wales/WalesTest.php | 9 +++-- tests/YasumiBase.php | 12 ++++--- 1692 files changed, 10157 insertions(+), 5281 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index b84347c26..206439d0d 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -1,9 +1,11 @@ */ -$config = new AzuyaLabs\PhpCsFixerConfig\Config(); +$config = new AzuyaLabs\PhpCsFixerConfig\Config('2015', null, 'Yasumi'); $config->getFinder()->in(__DIR__)->notPath('var'); +$defaults = $config->getRules(); + +$config->setRules(array_merge($defaults, [ + 'php_unit_method_casing' => ['case' => 'camel_case'], +])); + return $config; diff --git a/composer.json b/composer.json index 1b06f3622..8db19a93d 100644 --- a/composer.json +++ b/composer.json @@ -40,8 +40,7 @@ }, "require-dev": { "ext-intl": "*", - "azuyalabs/php-cs-fixer-config": "^0.1", - "friendsofphp/php-cs-fixer": "^2.19 || 3.48", + "azuyalabs/php-cs-fixer-config": "^0.3", "mikey179/vfsstream": "^1.6", "phan/phan": "^5.4", "phpstan/phpstan": "^1.10", diff --git a/examples/basic.php b/examples/basic.php index 4407f7351..9cf5b8f98 100644 --- a/examples/basic.php +++ b/examples/basic.php @@ -2,7 +2,20 @@ // This file demonstrates the general use of Yasumi and its basic methods. -declare(strict_types=1); +declare(strict_types = 1); + +/** + * This file is part of the 'Yasumi' package. + * + * The easy PHP Library for calculating holidays. + * + * Copyright (c) 2015 - 2024 AzuyaLabs + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Sacha Telgenhof + */ require 'vendor/autoload.php'; @@ -10,20 +23,20 @@ $holidays = Yasumi\Yasumi::create('USA', (int) date('Y')); // Show the number of defined holidays -echo 'Number of defined holidays: '.$holidays->count().PHP_EOL; +echo 'Number of defined holidays: ' . $holidays->count() . PHP_EOL; echo PHP_EOL; // Display a list all of the holiday names (short names) -echo 'List of all the holiday names: '.PHP_EOL; +echo 'List of all the holiday names: ' . PHP_EOL; foreach ($holidays->getHolidayNames() as $name) { - echo $name.PHP_EOL; + echo $name . PHP_EOL; } echo PHP_EOL; // Display a list all of the holiday dates -echo 'List of all the holiday dates:'.PHP_EOL; +echo 'List of all the holiday dates:' . PHP_EOL; foreach ($holidays->getHolidayDates() as $date) { - echo $date.PHP_EOL; + echo $date . PHP_EOL; } echo PHP_EOL; @@ -31,17 +44,17 @@ $independenceDay = $holidays->getHoliday('independenceDay'); // Show the localized name -echo 'Name of the holiday : '.$independenceDay->getName().PHP_EOL; +echo 'Name of the holiday : ' . $independenceDay->getName() . PHP_EOL; // Show the date -echo 'Date of the holiday : '.$independenceDay.PHP_EOL; +echo 'Date of the holiday : ' . $independenceDay . PHP_EOL; // Show the type of holiday -echo 'Type of holiday : '.$independenceDay->getType().PHP_EOL; +echo 'Type of holiday : ' . $independenceDay->getType() . PHP_EOL; echo PHP_EOL; // Dump the holiday as a JSON object -echo 'Holiday as a JSON object:'.PHP_EOL; +echo 'Holiday as a JSON object:' . PHP_EOL; echo json_encode($independenceDay, JSON_PRETTY_PRINT); echo PHP_EOL; diff --git a/examples/between_filter.php b/examples/between_filter.php index 4b1358c9a..4b8b46f7c 100644 --- a/examples/between_filter.php +++ b/examples/between_filter.php @@ -3,7 +3,20 @@ // This file demonstrates the use of the `between` filter, selecting only a number of holidays // that fall in the given date range. -declare(strict_types=1); +declare(strict_types = 1); + +/** + * This file is part of the 'Yasumi' package. + * + * The easy PHP Library for calculating holidays. + * + * Copyright (c) 2015 - 2024 AzuyaLabs + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Sacha Telgenhof + */ require 'vendor/autoload.php'; @@ -12,16 +25,16 @@ // Use the factory to create a new holiday provider instance $holidays = Yasumi\Yasumi::create('Italy', $year); $holidaysInDecember = $holidays->between( - new DateTime('12/01/'.$year), - new DateTime('12/31/'.$year) + new DateTime('12/01/' . $year), + new DateTime('12/31/' . $year) ); // Show all holidays in Italy for December -echo 'List of all the holidays in December: '.PHP_EOL; +echo 'List of all the holidays in December: ' . PHP_EOL; foreach ($holidaysInDecember as $holiday) { - echo $holiday.' - '.$holiday->getName().PHP_EOL; + echo $holiday . ' - ' . $holiday->getName() . PHP_EOL; } echo PHP_EOL; // Show the number of filtered holidays -echo 'Number of filtered holidays: '.$holidaysInDecember->count().PHP_EOL; +echo 'Number of filtered holidays: ' . $holidaysInDecember->count() . PHP_EOL; diff --git a/examples/custom_provider.php b/examples/custom_provider.php index 773f93cc3..57f514d63 100644 --- a/examples/custom_provider.php +++ b/examples/custom_provider.php @@ -4,7 +4,20 @@ // those scenarios where you would need only a subset of holidays of an existing provider. Or, if you you like to // extend an existing provider with additional, non-standard holidays. -declare(strict_types=1); +declare(strict_types = 1); + +/** + * This file is part of the 'Yasumi' package. + * + * The easy PHP Library for calculating holidays. + * + * Copyright (c) 2015 - 2024 AzuyaLabs + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Sacha Telgenhof + */ require 'vendor/autoload.php'; @@ -33,11 +46,11 @@ public function initialize(): void $NYSEHolidays = Yasumi\Yasumi::create(NYSE::class, (int) date('Y')); // We then can retrieve the NYSE observed holidays in the usual manner: -echo 'List of all the holiday names: '.PHP_EOL; +echo 'List of all the holiday names: ' . PHP_EOL; foreach ($NYSEHolidays->getHolidayNames() as $day) { - echo $day.PHP_EOL; + echo $day . PHP_EOL; } echo PHP_EOL; // Use the count() method to show how many holidays are returned -echo 'Number of defined holidays: '.$NYSEHolidays->count().PHP_EOL; +echo 'Number of defined holidays: ' . $NYSEHolidays->count() . PHP_EOL; diff --git a/examples/filters.php b/examples/filters.php index 3a82af460..5e85543ab 100644 --- a/examples/filters.php +++ b/examples/filters.php @@ -4,7 +4,20 @@ // based on certain conditions. In this examples we show only the holidays that are // marked as 'official'. -declare(strict_types=1); +declare(strict_types = 1); + +/** + * This file is part of the 'Yasumi' package. + * + * The easy PHP Library for calculating holidays. + * + * Copyright (c) 2015 - 2024 AzuyaLabs + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Sacha Telgenhof + */ require 'vendor/autoload.php'; @@ -14,7 +27,7 @@ // Create a filter instance for the official holidays $official = new Yasumi\Filters\OfficialHolidaysFilter($holidays->getIterator()); -echo 'List of all official holidays: '.PHP_EOL; +echo 'List of all official holidays: ' . PHP_EOL; foreach ($official as $day) { - echo $day->getName().PHP_EOL; + echo $day->getName() . PHP_EOL; } diff --git a/phpinsights.php b/phpinsights.php index 4b5520d8b..9dbda25a8 100644 --- a/phpinsights.php +++ b/phpinsights.php @@ -1,6 +1,19 @@ + */ return [ /* diff --git a/rector.php b/rector.php index a75a58ab8..112903d93 100644 --- a/rector.php +++ b/rector.php @@ -1,6 +1,19 @@ + */ use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; use Rector\Config\RectorConfig; @@ -8,8 +21,8 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->paths([ - __DIR__.'/src', - __DIR__.'/tests', + __DIR__ . '/src', + __DIR__ . '/tests', ]); // single rules diff --git a/src/Yasumi/Exception/Exception.php b/src/Yasumi/Exception/Exception.php index fe9254e73..4faee05ea 100644 --- a/src/Yasumi/Exception/Exception.php +++ b/src/Yasumi/Exception/Exception.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'queensBirthday', [], - new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -190,10 +192,10 @@ protected function calculateReconciliationDay(): void return; } - $date = new \DateTime($this->year.'-05-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime($this->year . '-05-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $day = (int) $date->format('w'); if (1 !== $day) { - $date = $date->add(0 === $day ? new \DateInterval('P1D') : new \DateInterval('P'.(8 - $day).'D')); + $date = $date->add(0 === $day ? new \DateInterval('P1D') : new \DateInterval('P' . (8 - $day) . 'D')); } $this->addHoliday(new Holiday('reconciliationDay', ['en' => 'Reconciliation Day'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/NewSouthWales.php b/src/Yasumi/Provider/Australia/NewSouthWales.php index 54366a841..eb72ded0a 100644 --- a/src/Yasumi/Provider/Australia/NewSouthWales.php +++ b/src/Yasumi/Provider/Australia/NewSouthWales.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'queensBirthday', [], - new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -138,7 +140,7 @@ protected function calculateBankHoliday(): void $this->addHoliday(new Holiday( 'bankHoliday', ['en' => 'Bank Holiday'], - new \DateTime('first monday of august '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('first monday of august ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK )); diff --git a/src/Yasumi/Provider/Australia/NorthernTerritory.php b/src/Yasumi/Provider/Australia/NorthernTerritory.php index 55c69d125..b9c88d4c0 100644 --- a/src/Yasumi/Provider/Australia/NorthernTerritory.php +++ b/src/Yasumi/Provider/Australia/NorthernTerritory.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'queensBirthday', [], - new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -139,7 +141,7 @@ protected function calculatePicnicDay(): void $this->addHoliday(new Holiday( 'picnicDay', ['en' => 'Picnic Day'], - new \DateTime('first monday of august '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('first monday of august ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index 0c6e38dc7..6becbfd38 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -1,9 +1,11 @@ year; + $birthDay = 'first monday of october ' . $this->year; if ($this->year < 2012 || 2013 === $this->year || 2014 === $this->year || 2015 === $this->year) { - $birthDay = 'second monday of june '.$this->year; + $birthDay = 'second monday of june ' . $this->year; } $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php index b63d8f2dd..96c6c66be 100644 --- a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php +++ b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php @@ -1,9 +1,11 @@ year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('first friday of august ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); if ($date->format('d') < 5) { $date = $date->add(new \DateInterval('P7D')); } diff --git a/src/Yasumi/Provider/Australia/SouthAustralia.php b/src/Yasumi/Provider/Australia/SouthAustralia.php index a08713fc0..d27e69f33 100644 --- a/src/Yasumi/Provider/Australia/SouthAustralia.php +++ b/src/Yasumi/Provider/Australia/SouthAustralia.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'queensBirthday', [], - new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -145,10 +147,10 @@ protected function calculateLabourDay(): void protected function calculateAdelaideCupDay(): void { if ($this->year >= 1973) { - $cupDay = 'second monday of march '.$this->year; + $cupDay = 'second monday of march ' . $this->year; if ($this->year < 2006) { - $cupDay = 'third monday of may '.$this->year; + $cupDay = 'third monday of may ' . $this->year; } $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index 7d97aa80f..9dce59344 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'queensBirthday', [], - new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -100,7 +102,7 @@ protected function calculateRecreationDay(): void $this->addHoliday(new Holiday( 'recreationDay', ['en' => 'Recreation Day'], - new \DateTime('first monday of november '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('first monday of november ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php index 3701c94b9..5134add2f 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php +++ b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php @@ -1,9 +1,11 @@ year.'-12-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime($this->year . '-12-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->modify('previous friday'); if (! $date instanceof \DateTime) { diff --git a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php index 7f50e4579..91f9d227b 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php @@ -1,9 +1,11 @@ year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('third saturday of october ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new \DateInterval('P1D')); $this->addHoliday(new Holiday('flindersIslandShow', ['en' => 'Flinders Island Show'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php index 78e4abc43..1916b3ce2 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'kingIslandShow', ['en' => 'King Island Show'], - new \DateTime('first tuesday of march '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('first tuesday of march ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php index b2aca1fd9..46fcf2dce 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php @@ -1,9 +1,11 @@ year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('second saturday of october ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new \DateInterval('P2D')); $this->addHoliday(new Holiday('launcestonShow', ['en' => 'Royal Launceston Show'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php index be6fe7582..395204930 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php @@ -1,9 +1,11 @@ year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('first saturday of october ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new \DateInterval('P1D')); $this->addHoliday(new Holiday('burnieShow', ['en' => 'Burnie Show'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php index 160e966a0..e6da79a16 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php @@ -1,9 +1,11 @@ year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('first thursday of may ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->add(new \DateInterval('P1D')); $this->addHoliday(new Holiday('agfest', ['en' => 'AGFEST'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Tasmania/South.php b/src/Yasumi/Provider/Australia/Tasmania/South.php index 512815daa..ee54acd74 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South.php @@ -1,9 +1,11 @@ year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('fourth saturday of october ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)); $date = $date->sub(new \DateInterval('P2D')); $this->addHoliday(new Holiday('hobartShow', ['en' => 'Royal Hobart Show'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php index b489e4c53..08b73d70f 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'hobartRegatta', ['en' => 'Royal Hobart Regatta'], - new \DateTime('second monday of february '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of february ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index e0784de43..1757a0a85 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'queensBirthday', [], - new \DateTime('second monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('second monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -167,7 +169,7 @@ protected function calculateQueensBirthday(): void */ protected function calculateMelbourneCupDay(): void { - $date = new \DateTime('first Tuesday of November'." {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('first Tuesday of November' . " {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('melbourneCup', ['en' => 'Melbourne Cup'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/WesternAustralia.php b/src/Yasumi/Provider/Australia/WesternAustralia.php index 6727b2609..ffe2fd801 100644 --- a/src/Yasumi/Provider/Australia/WesternAustralia.php +++ b/src/Yasumi/Provider/Australia/WesternAustralia.php @@ -1,9 +1,11 @@ year; + $birthDay = 'last monday of september ' . $this->year; if (2011 === $this->year) { $birthDay = '2011-10-28'; } @@ -109,7 +111,7 @@ protected function calculateWesternAustraliaDay(): void $this->addHoliday(new Holiday( 'westernAustraliaDay', ['en' => 'Western Australia Day'], - new \DateTime('first monday of june '.$this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime('first monday of june ' . $this->year, DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/Austria.php b/src/Yasumi/Provider/Austria.php index 1e3c5516b..37898e399 100644 --- a/src/Yasumi/Provider/Austria.php +++ b/src/Yasumi/Provider/Austria.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'stLeopoldsDay', [], - new \DateTime($this->year.'-11-15', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-11-15', new \DateTimeZone($this->timezone)), $this->locale )); } @@ -125,7 +127,7 @@ protected function calculateNationalDay(): void $this->addHoliday(new Holiday( 'nationalDay', ['de' => 'Nationalfeiertag'], - new \DateTime($this->year.'-10-26', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-10-26', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Austria/Burgenland.php b/src/Yasumi/Provider/Austria/Burgenland.php index d9cf6c577..864c3314e 100644 --- a/src/Yasumi/Provider/Austria/Burgenland.php +++ b/src/Yasumi/Provider/Austria/Burgenland.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'plebisciteDay', [], - new \DateTime($this->year.'-10-10', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-10-10', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Austria/LowerAustria.php b/src/Yasumi/Provider/Austria/LowerAustria.php index 68696edc5..765ab054e 100644 --- a/src/Yasumi/Provider/Austria/LowerAustria.php +++ b/src/Yasumi/Provider/Austria/LowerAustria.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'stRupertsDay', [], - new \DateTime($this->year.'-9-24', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-9-24', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Austria/Styria.php b/src/Yasumi/Provider/Austria/Styria.php index bc88f2c0c..81b10f2fa 100644 --- a/src/Yasumi/Provider/Austria/Styria.php +++ b/src/Yasumi/Provider/Austria/Styria.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'stFloriansDay', [], - new \DateTime($this->year.'-5-4', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-5-4', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Austria/Vienna.php b/src/Yasumi/Provider/Austria/Vienna.php index 18f83e2a9..6cbc1f219 100644 --- a/src/Yasumi/Provider/Austria/Vienna.php +++ b/src/Yasumi/Provider/Austria/Vienna.php @@ -1,9 +1,11 @@ year < 1983) { return; } - $date = new \DateTime($this->year.'-07-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime($this->year . '-07-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)); if (7 === (int) $date->format('N')) { - $date = new \DateTime($this->year.'-07-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime($this->year . '-07-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)); } $this->addHoliday(new Holiday( 'canadaDay', diff --git a/src/Yasumi/Provider/Canada/Alberta.php b/src/Yasumi/Provider/Canada/Alberta.php index ef982cfa1..b827f8007 100644 --- a/src/Yasumi/Provider/Canada/Alberta.php +++ b/src/Yasumi/Provider/Canada/Alberta.php @@ -1,9 +1,11 @@ 'St. Patrick’s Day'], - new \DateTime($this->year.'-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); @@ -122,7 +124,7 @@ protected function calculateOrangemensDay(): void $holiday = new Holiday( 'orangemensDay', [], - new \DateTime($this->year.'-7-12', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-7-12', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); diff --git a/src/Yasumi/Provider/Canada/NorthwestTerritories.php b/src/Yasumi/Provider/Canada/NorthwestTerritories.php index ec1802d76..25662fa73 100644 --- a/src/Yasumi/Provider/Canada/NorthwestTerritories.php +++ b/src/Yasumi/Provider/Canada/NorthwestTerritories.php @@ -1,9 +1,11 @@ add(new \DateInterval('P'.$easterDays.'D')); + $easter->add(new \DateInterval('P' . $easterDays . 'D')); return $easter; } diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index e4006fb5f..762e84897 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -1,9 +1,11 @@ 'Den obnovy samostatného českého státu', 'en' => 'Day of renewal of the independent Czech state', ], - new \DateTime($this->year.'-01-01', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-01-01', new \DateTimeZone($this->timezone)), $this->locale )); } @@ -121,7 +123,7 @@ protected function calculateSaintsCyrilAndMethodiusDay(): void 'cs' => 'Den slovanských věrozvěstů Cyrila a Metoděje', 'en' => 'Saints Cyril and Methodius Day', ], - new \DateTime($this->year.'-07-5', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-07-5', new \DateTimeZone($this->timezone)), $this->locale )); } @@ -145,7 +147,7 @@ protected function calculateJanHusDay(): void $this->addHoliday(new Holiday( 'janHusDay', ['cs' => 'Den upálení mistra Jana Husa', 'en' => 'Jan Hus Day'], - new \DateTime($this->year.'-07-6', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-07-6', new \DateTimeZone($this->timezone)), $this->locale )); } @@ -175,7 +177,7 @@ protected function calculateCzechStatehoodDay(): void 'cs' => 'Den české státnosti', 'en' => 'St. Wenceslas Day (Czech Statehood Day)', ], - new \DateTime($this->year.'-09-28', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-09-28', new \DateTimeZone($this->timezone)), $this->locale )); } @@ -194,7 +196,7 @@ protected function calculateIndependentCzechoslovakStateDay(): void $this->addHoliday(new Holiday('independentCzechoslovakStateDay', [ 'cs' => 'Den vzniku samostatného československého státu', 'en' => 'Independent Czechoslovak State Day', - ], new \DateTime($this->year.'-10-28', new \DateTimeZone($this->timezone)), $this->locale)); + ], new \DateTime($this->year . '-10-28', new \DateTimeZone($this->timezone)), $this->locale)); } /** @@ -214,7 +216,7 @@ protected function calculateStruggleForFreedomAndDemocracyDay(): void 'cs' => 'Den boje za svobodu a demokracii', 'en' => 'Struggle for Freedom and Democracy Day', ], - new \DateTime($this->year.'-11-17', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-11-17', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/DateTimeZoneFactory.php b/src/Yasumi/Provider/DateTimeZoneFactory.php index 537828770..f09ea23f8 100644 --- a/src/Yasumi/Provider/DateTimeZoneFactory.php +++ b/src/Yasumi/Provider/DateTimeZoneFactory.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'germanUnityDay', ['de' => 'Tag der Deutschen Einheit'], - new \DateTime($this->year.'-10-3', new \DateTimeZone($this->timezone)), + new \DateTime($this->year . '-10-3', new \DateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Germany/BadenWurttemberg.php b/src/Yasumi/Provider/Germany/BadenWurttemberg.php index 678710d4e..57eec668c 100644 --- a/src/Yasumi/Provider/Germany/BadenWurttemberg.php +++ b/src/Yasumi/Provider/Germany/BadenWurttemberg.php @@ -1,9 +1,11 @@ 'Christmas Day', 'ga' => 'Lá Nollag'], - new \DateTime($this->year.'-12-25', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-12-25', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale ); @@ -198,7 +200,7 @@ protected function calculateStStephensDay(): void $holiday = new Holiday( 'stStephensDay', [], - new \DateTime($this->year.'-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale ); @@ -241,7 +243,7 @@ protected function calculateStPatricksDay(): void $holiday = new Holiday( 'stPatricksDay', ['en' => 'St. Patrick’s Day', 'ga' => 'Lá Fhéile Pádraig'], - new \DateTime($this->year.'-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale ); diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index 8266fd9ab..fa1521b7b 100644 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -1,9 +1,11 @@ add(new \DateInterval('P1D')); - $this->addHoliday(new Holiday('bridgeDay'.$counter, [ + $this->addHoliday(new Holiday('bridgeDay' . $counter, [ 'en' => 'Bridge Public holiday', 'ja' => '国民の休日', ], $bridgeDate, $this->locale)); diff --git a/src/Yasumi/Provider/Latvia.php b/src/Yasumi/Provider/Latvia.php index 9afe8d51e..fde07e6d2 100644 --- a/src/Yasumi/Provider/Latvia.php +++ b/src/Yasumi/Provider/Latvia.php @@ -1,9 +1,11 @@ */ -declare(strict_types=1); +declare(strict_types = 1); + +/** + * This file is part of the 'Yasumi' package. + * + * The easy PHP Library for calculating holidays. + * + * Copyright (c) 2015 - 2024 AzuyaLabs + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Sacha Telgenhof + */ namespace Yasumi\Provider; diff --git a/src/Yasumi/Provider/Mexico.php b/src/Yasumi/Provider/Mexico.php index d4bbffaff..971f59078 100644 --- a/src/Yasumi/Provider/Mexico.php +++ b/src/Yasumi/Provider/Mexico.php @@ -1,11 +1,11 @@ year < 1910 ? 'second wednesday of october' : 'fourth monday of october')." {$this->year}", + ($this->year < 1910 ? 'second wednesday of october' : 'fourth monday of october') . " {$this->year}", DateTimeZoneFactory::getDateTimeZone($this->timezone) ); diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index 894d5dc74..82c79806b 100644 --- a/src/Yasumi/Provider/Norway.php +++ b/src/Yasumi/Provider/Norway.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'stAndrewsDay', [], - new \DateTime($this->year.'-11-30', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-11-30', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -222,7 +224,7 @@ protected function calculateStJohnsDay(): void $this->addHoliday(new Holiday( 'stJohnsDay', [], - new \DateTime($this->year.'-01-07', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-01-07', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/Russia.php b/src/Yasumi/Provider/Russia.php index 8f9b94f13..90146706f 100644 --- a/src/Yasumi/Provider/Russia.php +++ b/src/Yasumi/Provider/Russia.php @@ -1,9 +1,11 @@ addHoliday(new Holiday('newYearHolidaysDay'.$day, [ + $this->addHoliday(new Holiday('newYearHolidaysDay' . $day, [ 'en' => 'New Year’s holidays', 'ru' => 'Новогодние каникулы', ], new \DateTime("{$this->year}-01-{$day}", new \DateTimeZone($this->timezone)), $this->locale)); diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index 62406f4d5..603d6eda1 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -1,9 +1,11 @@ 'Deň vzniku Slovenskej republiky', 'en' => 'Day of the Establishment of the Slovak Republic', ], - new \DateTime($this->year.'-01-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-01-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -154,7 +156,7 @@ protected function calculateSaintsCyrilAndMethodiusDay(): void 'cs' => 'Den slovanských věrozvěstů Cyrila a Metoděje', 'en' => 'Saints Cyril and Methodius Day', ], - new \DateTime($this->year.'-07-05', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-07-05', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -177,7 +179,7 @@ protected function calculateSlovakNationalUprisingDay(): void 'sk' => 'Výročie Slovenského národného povstania', 'en' => 'Slovak National Uprising Day', ], - new \DateTime($this->year.'-08-29', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-08-29', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -200,7 +202,7 @@ protected function calculateSlovakConstitutionDay(): void 'sk' => 'Deň Ústavy Slovenskej republiky', 'en' => 'Day of the Constitution of the Slovak Republic', ], - new \DateTime($this->year.'-09-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-09-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -224,7 +226,7 @@ protected function calculateOurLadyOfSorrowsDay(): void $this->addHoliday(new Holiday('ourLadyOfSorrowsDay', [ 'sk' => 'Sviatok Sedembolestnej Panny Márie', 'en' => 'Our Lady of Sorrows Day', - ], new \DateTime($this->year.'-09-15', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK)); + ], new \DateTime($this->year . '-09-15', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK)); } /** @@ -245,7 +247,7 @@ protected function calculateStruggleForFreedomAndDemocracyDay(): void 'cs' => 'Den boje za svobodu a demokracii', 'en' => 'Struggle for Freedom and Democracy Day', ], - new \DateTime($this->year.'-11-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-11-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index 42e14b406..5ce3d446c 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -1,9 +1,11 @@ addHoliday(new Holiday( 'humanRightsDay', ['en' => 'Human Rights Day'], - new \DateTime($this->year.'-3-21', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-3-21', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -149,7 +151,7 @@ protected function calculateFreedomDay(): void $this->addHoliday(new Holiday( 'freedomDay', ['en' => 'Freedom Day'], - new \DateTime($this->year.'-4-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-4-27', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -175,7 +177,7 @@ protected function calculateYouthDay(): void $this->addHoliday(new Holiday( 'youthDay', ['en' => 'Youth Day'], - new \DateTime($this->year.'-6-16', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-6-16', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -225,7 +227,7 @@ protected function calculateNationalWomensDay(): void $this->addHoliday(new Holiday( 'nationalWomensDay', ['en' => 'National Women’s Day'], - new \DateTime($this->year.'-8-9', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-8-9', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -249,7 +251,7 @@ protected function calculateHeritageDay(): void $this->addHoliday(new Holiday( 'heritageDay', ['en' => 'Heritage Day'], - new \DateTime($this->year.'-9-24', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-9-24', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } @@ -275,7 +277,7 @@ protected function calculateDayOfReconciliation(): void $this->addHoliday(new Holiday( 'reconciliationDay', ['en' => 'Day of Reconciliation'], - new \DateTime($this->year.'-12-16', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-12-16', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale )); } diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 4315758fc..c32ac9084 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -1,9 +1,11 @@ format('w'); if (\in_array($dayOfWeek, $acceptedHolidays[$name], true)) { - $dates[$day]['weekend:'.$day] = $name; + $dates[$day]['weekend:' . $day] = $name; } } diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index d5cf10c35..2a1007d17 100644 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -1,9 +1,11 @@ 'Jour de la Saint-Berthold', 'en' => 'Berchtoldstag', ], - new \DateTime($this->year.'-01-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-01-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -101,7 +103,7 @@ protected function calculateBettagsMontag(): void { if ($this->year >= 1832) { // Find third Sunday of September - $date = new \DateTime('Third Sunday of '.$this->year.'-09', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('Third Sunday of ' . $this->year . '-09', DateTimeZoneFactory::getDateTimeZone($this->timezone)); // Go to next Thursday $date->add(new \DateInterval('P1D')); @@ -139,7 +141,7 @@ protected function calculateNationalDay(): void $this->addHoliday(new Holiday( 'swissNationalDay', $translations, - new \DateTime($this->year.'-08-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-08-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL )); @@ -147,7 +149,7 @@ protected function calculateNationalDay(): void $this->addHoliday(new Holiday( 'swissNationalDay', $translations, - new \DateTime($this->year.'-08-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-08-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); diff --git a/src/Yasumi/Provider/Switzerland/Aargau.php b/src/Yasumi/Provider/Switzerland/Aargau.php index 00a46c444..419415503 100644 --- a/src/Yasumi/Provider/Switzerland/Aargau.php +++ b/src/Yasumi/Provider/Switzerland/Aargau.php @@ -1,8 +1,11 @@ 'December 26th', 'fr' => '26 décembre', ], - new \DateTime($this->year.'-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Geneva.php b/src/Yasumi/Provider/Switzerland/Geneva.php index 44f97125a..d09489768 100644 --- a/src/Yasumi/Provider/Switzerland/Geneva.php +++ b/src/Yasumi/Provider/Switzerland/Geneva.php @@ -1,8 +1,11 @@ year.'-09', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('First Sunday of ' . $this->year . '-09', DateTimeZoneFactory::getDateTimeZone($this->timezone)); // Go to next Thursday $date->add(new \DateInterval('P4D')); @@ -115,7 +118,7 @@ protected function calculateRestaurationGenevoise(): void [ 'fr' => 'Restauration de la République', ], - new \DateTime($this->year.'-12-31', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-12-31', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Glarus.php b/src/Yasumi/Provider/Switzerland/Glarus.php index a364d9516..2f81a2495 100644 --- a/src/Yasumi/Provider/Switzerland/Glarus.php +++ b/src/Yasumi/Provider/Switzerland/Glarus.php @@ -1,8 +1,11 @@ year >= 1389) { - $date = new \DateTime('First Thursday of '.$this->year.'-04', DateTimeZoneFactory::getDateTimeZone($this->timezone)); + $date = new \DateTime('First Thursday of ' . $this->year . '-04', DateTimeZoneFactory::getDateTimeZone($this->timezone)); $this->addHoliday(new Holiday('nafelserFahrt', [ 'de' => 'Näfelser Fahrt', ], $date, $this->locale, Holiday::TYPE_OTHER)); diff --git a/src/Yasumi/Provider/Switzerland/Grisons.php b/src/Yasumi/Provider/Switzerland/Grisons.php index 36ffbeb69..6c33268fb 100644 --- a/src/Yasumi/Provider/Switzerland/Grisons.php +++ b/src/Yasumi/Provider/Switzerland/Grisons.php @@ -1,8 +1,11 @@ 'Commémoration du plébiscite jurassien', ], - new \DateTime($this->year.'-06-23', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-06-23', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Lucerne.php b/src/Yasumi/Provider/Switzerland/Lucerne.php index 30352ca47..a2ae96b48 100644 --- a/src/Yasumi/Provider/Switzerland/Lucerne.php +++ b/src/Yasumi/Provider/Switzerland/Lucerne.php @@ -1,8 +1,11 @@ 'Instauration de la République', ], - new \DateTime($this->year.'-03-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-03-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -116,7 +119,7 @@ protected function calculateJanuary2nd(): void 'en' => 'January 2nd', 'fr' => '2 janvier', ], - new \DateTime($this->year.'-01-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-01-02', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -137,7 +140,7 @@ protected function calculateDecember26th(): void 'en' => 'December 26th', 'fr' => '26 décembre', ], - new \DateTime($this->year.'-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-12-26', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Nidwalden.php b/src/Yasumi/Provider/Switzerland/Nidwalden.php index 0d0a42a73..d147fcce3 100644 --- a/src/Yasumi/Provider/Switzerland/Nidwalden.php +++ b/src/Yasumi/Provider/Switzerland/Nidwalden.php @@ -1,8 +1,11 @@ 'Bruder-Klausen-Fest', ], - new \DateTime($this->year.'-09-25', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-09-25', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); @@ -94,7 +97,7 @@ protected function calculateBruderKlausenFest(): void [ 'de' => 'Bruder-Klausen-Fest', ], - new \DateTime($this->year.'-09-21', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-09-21', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Schaffhausen.php b/src/Yasumi/Provider/Switzerland/Schaffhausen.php index c15f4f638..0ffcc885c 100644 --- a/src/Yasumi/Provider/Switzerland/Schaffhausen.php +++ b/src/Yasumi/Provider/Switzerland/Schaffhausen.php @@ -1,8 +1,11 @@ 'Solennité des saints Pierre et Paul', 'de' => 'St. Peter und Paul', ], - new \DateTime($this->year.'-06-29', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-06-29', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER )); diff --git a/src/Yasumi/Provider/Switzerland/Uri.php b/src/Yasumi/Provider/Switzerland/Uri.php index 49358abc6..2b6f630e6 100644 --- a/src/Yasumi/Provider/Switzerland/Uri.php +++ b/src/Yasumi/Provider/Switzerland/Uri.php @@ -1,8 +1,11 @@ addHoliday(new SubstituteHoliday( $holiday, [ - 'en' => $label.' (observed)', + 'en' => $label . ' (observed)', ], $date, $this->locale diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index d08cb4cc3..2c37405f3 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -1,9 +1,11 @@ 'St. Patrick’s Day'], - new \DateTime($this->year.'-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-3-17', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); @@ -120,7 +123,7 @@ protected function calculateBattleOfTheBoyne(): void $holiday = new Holiday( 'battleOfTheBoyne', ['en' => 'Battle of the Boyne'], - new \DateTime($this->year.'-7-12', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-7-12', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index 258d26b93..e0b14b02f 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -1,8 +1,11 @@ year.'-11-30', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + new \DateTime($this->year . '-11-30', DateTimeZoneFactory::getDateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK ); diff --git a/src/Yasumi/Provider/UnitedKingdom/Wales.php b/src/Yasumi/Provider/UnitedKingdom/Wales.php index 21a6bc1f9..a59defc64 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Wales.php +++ b/src/Yasumi/Provider/UnitedKingdom/Wales.php @@ -1,8 +1,11 @@ substitutedHoliday = $substitutedHoliday; - $key = 'substituteHoliday:'.$substitutedHoliday->getKey(); + $key = 'substituteHoliday:' . $substitutedHoliday->getKey(); if ($date == $substitutedHoliday) { throw new \InvalidArgumentException('Date must differ from the substituted holiday'); diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index 7d1f93ca8..e7ec9a248 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -1,9 +1,11 @@ getFilename(); - $key = $file->getBasename('.'.$extension); + $key = $file->getBasename('.' . $extension); - $translations = require $directoryPath.$filename; + $translations = require $directoryPath . $filename; if (\is_array($translations)) { foreach (array_keys($translations) as $locale) { diff --git a/src/Yasumi/TranslationsInterface.php b/src/Yasumi/TranslationsInterface.php index 717d848fd..4adfe4b50 100644 --- a/src/Yasumi/TranslationsInterface.php +++ b/src/Yasumi/TranslationsInterface.php @@ -1,9 +1,11 @@ loadTranslations(__DIR__.'/data/translations'); + self::$globalTranslations->loadTranslations(__DIR__ . '/data/translations'); } // Assert locale input @@ -158,7 +160,7 @@ public static function create(string $class, int $year = self::YEAR_LOWER_BOUND, */ public static function getAvailableLocales(): array { - return require __DIR__.'/data/locales.php'; + return require __DIR__ . '/data/locales.php'; } /** @@ -212,7 +214,7 @@ public static function getProviders(): array $providers = []; $filesIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator( - __DIR__.\DIRECTORY_SEPARATOR.'Provider', + __DIR__ . \DIRECTORY_SEPARATOR . 'Provider', \FilesystemIterator::SKIP_DOTS ), \RecursiveIteratorIterator::SELF_FIRST); diff --git a/src/Yasumi/data/locales.php b/src/Yasumi/data/locales.php index 35917a5d4..9e465b29e 100644 --- a/src/Yasumi/data/locales.php +++ b/src/Yasumi/data/locales.php @@ -1,8 +1,11 @@ between( new \DateTime('03/25/2011', new \DateTimeZone($timezone)), - new \DateTime('05/17/'.$year, new \DateTimeZone($timezone)) + new \DateTime('05/17/' . $year, new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); @@ -232,7 +235,7 @@ public function testHolidaysBetweenDateRangeWithEndAfterInstanceYear(): void $holidays = Yasumi::create('Italy', $year); $between = $holidays->between( - new \DateTime('03/25/'.$year, new \DateTimeZone($timezone)), + new \DateTime('03/25/' . $year, new \DateTimeZone($timezone)), new \DateTime('09/21/2021', new \DateTimeZone($timezone)) ); @@ -269,8 +272,8 @@ public function testWrongDates(): void $holidays = Yasumi::create('USA', $year); $holidays->between( - new \DateTime('12/31/'.$year, new \DateTimeZone($timezone)), - new \DateTime('01/01/'.$year, new \DateTimeZone($timezone)) + new \DateTime('12/31/' . $year, new \DateTimeZone($timezone)), + new \DateTime('01/01/' . $year, new \DateTimeZone($timezone)) ); } @@ -289,8 +292,8 @@ public function testCountBetweenWithSubstitutes(): void $holidays = Yasumi::create('Ireland', $year); $between = $holidays->between( - new \DateTime('01/01/'.$year, new \DateTimeZone($timezone)), - new \DateTime('12/31/'.$year, new \DateTimeZone($timezone)) + new \DateTime('01/01/' . $year, new \DateTimeZone($timezone)), + new \DateTime('12/31/' . $year, new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); @@ -329,8 +332,8 @@ public function testCountBetweenExcludingSubstituteHoliday(): void $holidays = Yasumi::create('Ireland', $year); $between = $holidays->between( - new \DateTime('01/01/'.$year, new \DateTimeZone($timezone)), - new \DateTime('03/20/'.$year, new \DateTimeZone($timezone)) + new \DateTime('01/01/' . $year, new \DateTimeZone($timezone)), + new \DateTime('03/20/' . $year, new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); @@ -373,8 +376,8 @@ public function testCountBetweenExcludingSubstituteHolidayIncludingOriginalHolid $holidays = Yasumi::create('Ireland', $year); $between = $holidays->between( - new \DateTime('01/01/'.$year, new \DateTimeZone($timezone)), - new \DateTime('03/18/'.$year, new \DateTimeZone($timezone)) + new \DateTime('01/01/' . $year, new \DateTimeZone($timezone)), + new \DateTime('03/18/' . $year, new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); @@ -418,8 +421,8 @@ public function testCountBetweenExcludingSubstituteHolidayAndOriginalHoliday(): $holidays = Yasumi::create('Ireland', $year); $between = $holidays->between( - new \DateTime('01/01/'.$year, new \DateTimeZone($timezone)), - new \DateTime('03/16/'.$year, new \DateTimeZone($timezone)) + new \DateTime('01/01/' . $year, new \DateTimeZone($timezone)), + new \DateTime('03/16/' . $year, new \DateTimeZone($timezone)) ); $betweenHolidays = iterator_to_array($between); diff --git a/tests/Base/HolidayFiltersTest.php b/tests/Base/HolidayFiltersTest.php index 3fbcd82fa..b9ce89597 100644 --- a/tests/Base/HolidayFiltersTest.php +++ b/tests/Base/HolidayFiltersTest.php @@ -1,8 +1,11 @@ getName()); - self::assertEquals('substituteHoliday:'.$name, $substitute->getName()); + self::assertEquals('substituteHoliday:' . $name, $substitute->getName()); } /** @throws \Exception */ diff --git a/tests/Base/TranslationsTest.php b/tests/Base/TranslationsTest.php index 0ef705eab..cd3640482 100644 --- a/tests/Base/TranslationsTest.php +++ b/tests/Base/TranslationsTest.php @@ -1,8 +1,11 @@ [$key.'.php' => $fileContents]]); + vfsStream::setup('root', null, ['lang' => [$key . '.php' => $fileContents]]); $translations = new Translations(self::LOCALES); $translations->loadTranslations(vfsStream::url('root/lang')); @@ -181,7 +184,7 @@ public function testNotLoadingTranslationsFromFileWithInvalidExtension(): void ]; FILE; - vfsStream::setup('root', null, ['lang' => [$key.'.translation' => $fileContents]]); + vfsStream::setup('root', null, ['lang' => [$key . '.translation' => $fileContents]]); $translations = new Translations(self::LOCALES); $translations->loadTranslations(vfsStream::url('root/lang')); @@ -203,7 +206,7 @@ public function testLoadingTranslationsFromDirectoryWithUnknownLocaleException() ]; FILE; - vfsStream::setup('root', null, ['lang' => [$key.'.php' => $fileContents]]); + vfsStream::setup('root', null, ['lang' => [$key . '.php' => $fileContents]]); $translations = new Translations(self::LOCALES); $translations->loadTranslations(vfsStream::url('root/lang')); @@ -242,8 +245,8 @@ public function testLoadingMultipleTranslationsFromDirectory(): void vfsStream::setup('root', null, [ 'lang' => [ - $firstIdentifier.'.php' => $firstFileContents, - $secondIdentifier.'.php' => $secondFileContents, + $firstIdentifier . '.php' => $firstFileContents, + $secondIdentifier . '.php' => $secondFileContents, ], ]); diff --git a/tests/Base/TypographyTest.php b/tests/Base/TypographyTest.php index 913bdbb6d..bcf9d3321 100644 --- a/tests/Base/TypographyTest.php +++ b/tests/Base/TypographyTest.php @@ -1,9 +1,11 @@ isHoliday(new \DateTime($date)); @@ -296,7 +299,7 @@ public function testIsNotHoliday(): void { $year = 5220; $provider = 'Japan'; - $date = $year.'-06-10'; + $date = $year . '-06-10'; // Assertion using a DateTime instance $isHoliday = Yasumi::create($provider, $year)->isHoliday(new \DateTime($date)); @@ -323,7 +326,7 @@ public function testIsWorkingDay(): void { $year = 2020; $provider = 'Netherlands'; - $date = $year.'-06-02'; + $date = $year . '-06-02'; // Assertion using a DateTime instance $isWorkingDay = Yasumi::create($provider, $year)->isWorkingDay(new \DateTime($date)); @@ -350,7 +353,7 @@ public function testIsNotWorkingDay(): void { $year = 2016; $provider = 'Japan'; - $date = $year.'-01-11'; + $date = $year . '-01-11'; // Assertion using a DateTime instance $isNotWorkingDay = Yasumi::create($provider, $year)->isWorkingDay(new \DateTime($date)); diff --git a/tests/Base/YasumiWorkdayTest.php b/tests/Base/YasumiWorkdayTest.php index c4a971d5c..e83fc34b9 100644 --- a/tests/Base/YasumiWorkdayTest.php +++ b/tests/Base/YasumiWorkdayTest.php @@ -1,8 +1,11 @@ + */ namespace Yasumi\tests\Georgia; diff --git a/tests/Georgia/GeorgiaBaseTestCase.php b/tests/Georgia/GeorgiaBaseTestCase.php index 98bbcde79..aba2854b9 100644 --- a/tests/Georgia/GeorgiaBaseTestCase.php +++ b/tests/Georgia/GeorgiaBaseTestCase.php @@ -1,9 +1,11 @@ generateRandomYear(); $time_stamp = strtotime( - $year.'-03-21'.easter_days($year).' day + 49 day' + $year . '-03-21' . easter_days($year) . ' day + 49 day' ); $date = date('Y-m-d', $time_stamp); diff --git a/tests/Germany/ReformationDay2017Test.php b/tests/Germany/ReformationDay2017Test.php index 52a876dfd..64f5d767c 100644 --- a/tests/Germany/ReformationDay2017Test.php +++ b/tests/Germany/ReformationDay2017Test.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->modify('next tuesday'); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/Ireland/EasterMondayTest.php b/tests/Ireland/EasterMondayTest.php index a5865fdd2..f035aeebb 100644 --- a/tests/Ireland/EasterMondayTest.php +++ b/tests/Ireland/EasterMondayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->modify('next monday'); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/Ireland/OctoberHolidayTest.php b/tests/Ireland/OctoberHolidayTest.php index f1bb56ad7..1921bea4e 100644 --- a/tests/Ireland/OctoberHolidayTest.php +++ b/tests/Ireland/OctoberHolidayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->modify('next monday'); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/Ireland/StStephensDayTest.php b/tests/Ireland/StStephensDayTest.php index d3598fe28..7bacde176 100644 --- a/tests/Ireland/StStephensDayTest.php +++ b/tests/Ireland/StStephensDayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->modify('next monday'); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/Ireland/pentecostMondayTest.php b/tests/Ireland/pentecostMondayTest.php index ab6356079..49ccfaaef 100644 --- a/tests/Ireland/pentecostMondayTest.php +++ b/tests/Ireland/pentecostMondayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-5-6", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/ComingOfAgeDayTest.php b/tests/Japan/ComingOfAgeDayTest.php index b41d4864c..86a017c5a 100644 --- a/tests/Japan/ComingOfAgeDayTest.php +++ b/tests/Japan/ComingOfAgeDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-5-6", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/CoronationDayTest.php b/tests/Japan/CoronationDayTest.php index 46891f10d..da3d5fb82 100644 --- a/tests/Japan/CoronationDayTest.php +++ b/tests/Japan/CoronationDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-11-4", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/EmperorsBirthdayTest.php b/tests/Japan/EmperorsBirthdayTest.php index ccd57d219..068e8dab1 100644 --- a/tests/Japan/EmperorsBirthdayTest.php +++ b/tests/Japan/EmperorsBirthdayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-12-24", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/EnthronementProclamationCeremonyTest.php b/tests/Japan/EnthronementProclamationCeremonyTest.php index b7d9cafce..8a3c7b79b 100644 --- a/tests/Japan/EnthronementProclamationCeremonyTest.php +++ b/tests/Japan/EnthronementProclamationCeremonyTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-5-6", new \DateTimeZone(self::TIMEZONE)) ); @@ -92,7 +95,7 @@ public function testHolidayBetween1989And2007SubstitutedNextWorkingDay(): void $year = 2001; $this->assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-4-30", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/JapanBaseTestCase.php b/tests/Japan/JapanBaseTestCase.php index 4e1de357c..2f3632964 100644 --- a/tests/Japan/JapanBaseTestCase.php +++ b/tests/Japan/JapanBaseTestCase.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-11-24", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/MarineDayTest.php b/tests/Japan/MarineDayTest.php index 7cecbe5a5..ff800ba81 100644 --- a/tests/Japan/MarineDayTest.php +++ b/tests/Japan/MarineDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-7-21", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/MountainDayTest.php b/tests/Japan/MountainDayTest.php index 82dff86e3..3e78396c1 100644 --- a/tests/Japan/MountainDayTest.php +++ b/tests/Japan/MountainDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-8-12", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/NationalFoundationDayTest.php b/tests/Japan/NationalFoundationDayTest.php index 9b44ebac1..f2c44dd7e 100644 --- a/tests/Japan/NationalFoundationDayTest.php +++ b/tests/Japan/NationalFoundationDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-2-12", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/NewYearsDayTest.php b/tests/Japan/NewYearsDayTest.php index 20ee8384d..de73f3880 100644 --- a/tests/Japan/NewYearsDayTest.php +++ b/tests/Japan/NewYearsDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-1-2", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/PublicBridgeDayTest.php b/tests/Japan/PublicBridgeDayTest.php index 57888876a..ee83c4bd9 100644 --- a/tests/Japan/PublicBridgeDayTest.php +++ b/tests/Japan/PublicBridgeDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::HOLIDAY.'1', + self::HOLIDAY . '1', $this->year, new \DateTime("{$this->year}-4-30", new \DateTimeZone(self::TIMEZONE)) ); $this->assertHoliday( self::REGION, - self::HOLIDAY.'2', + self::HOLIDAY . '2', $this->year, new \DateTime("{$this->year}-5-2", new \DateTimeZone(self::TIMEZONE)) ); @@ -66,7 +69,7 @@ public function testPublicBridgeDay(): void */ public function testTranslation(): void { - $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY.'1', $this->year, [self::LOCALE => '国民の休日']); + $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY . '1', $this->year, [self::LOCALE => '国民の休日']); } /** @@ -74,6 +77,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY.'1', $this->year, Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY . '1', $this->year, Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Japan/RespectForTheAgedDayTest.php b/tests/Japan/RespectForTheAgedDayTest.php index 3e22e866a..6049e054b 100644 --- a/tests/Japan/RespectForTheAgedDayTest.php +++ b/tests/Japan/RespectForTheAgedDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-9-16", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/ShowaDayTest.php b/tests/Japan/ShowaDayTest.php index eab7e362f..0c81b4d1c 100644 --- a/tests/Japan/ShowaDayTest.php +++ b/tests/Japan/ShowaDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-4-30", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/SportsDayTest.php b/tests/Japan/SportsDayTest.php index 5fc299a8b..a0310a248 100644 --- a/tests/Japan/SportsDayTest.php +++ b/tests/Japan/SportsDayTest.php @@ -1,8 +1,11 @@ assertHoliday( self::REGION, - self::SUBSTITUTE_PREFIX.self::HOLIDAY, + self::SUBSTITUTE_PREFIX . self::HOLIDAY, $year, new \DateTime("{$year}-10-11", new \DateTimeZone(self::TIMEZONE)) ); diff --git a/tests/Japan/VernalEquinoxDayTest.php b/tests/Japan/VernalEquinoxDayTest.php index 9eb842e8e..afb09dade 100644 --- a/tests/Japan/VernalEquinoxDayTest.php +++ b/tests/Japan/VernalEquinoxDayTest.php @@ -1,8 +1,11 @@ + */ namespace Yasumi\tests\Mexico; diff --git a/tests/Mexico/ChristmasTest.php b/tests/Mexico/ChristmasTest.php index 50d1f97de..2805ea2b9 100644 --- a/tests/Mexico/ChristmasTest.php +++ b/tests/Mexico/ChristmasTest.php @@ -1,8 +1,11 @@ + */ namespace Yasumi\tests\Mexico; diff --git a/tests/Mexico/VirginOfGuadalupeTest.php b/tests/Mexico/VirginOfGuadalupeTest.php index c8aa40089..f3ef2408e 100644 --- a/tests/Mexico/VirginOfGuadalupeTest.php +++ b/tests/Mexico/VirginOfGuadalupeTest.php @@ -1,6 +1,19 @@ + */ namespace Yasumi\tests\Mexico; diff --git a/tests/Netherlands/AscensionDayTest.php b/tests/Netherlands/AscensionDayTest.php index 7cd8a3195..fbd50b71f 100644 --- a/tests/Netherlands/AscensionDayTest.php +++ b/tests/Netherlands/AscensionDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(self::ESTABLISHMENT_YEAR); $expected = new \DateTime( - (($year < 1910) ? 'second wednesday of october' : 'fourth monday of october')." {$year}", + (($year < 1910) ? 'second wednesday of october' : 'fourth monday of october') . " {$year}", new \DateTimeZone(self::TIMEZONE) ); diff --git a/tests/NewZealand/NewYearsDayTest.php b/tests/NewZealand/NewYearsDayTest.php index 0235227af..fcfd109f8 100644 --- a/tests/NewZealand/NewYearsDayTest.php +++ b/tests/NewZealand/NewYearsDayTest.php @@ -1,8 +1,11 @@ add(new \DateInterval('P'.$easter_days.'D')); + $easter->add(new \DateInterval('P' . $easter_days . 'D')); return $easter; } diff --git a/tests/Romania/AssumptionOfMaryTest.php b/tests/Romania/AssumptionOfMaryTest.php index 62b6e71a7..8ec922302 100644 --- a/tests/Romania/AssumptionOfMaryTest.php +++ b/tests/Romania/AssumptionOfMaryTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/FamilyDayTest.php b/tests/SouthAfrica/FamilyDayTest.php index 3ba096b5a..909f05e58 100644 --- a/tests/SouthAfrica/FamilyDayTest.php +++ b/tests/SouthAfrica/FamilyDayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/GoodFridayTest.php b/tests/SouthAfrica/GoodFridayTest.php index 60148fabe..9b35b3aaf 100644 --- a/tests/SouthAfrica/GoodFridayTest.php +++ b/tests/SouthAfrica/GoodFridayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/HumanRightsDayTest.php b/tests/SouthAfrica/HumanRightsDayTest.php index 140196022..05bd17211 100644 --- a/tests/SouthAfrica/HumanRightsDayTest.php +++ b/tests/SouthAfrica/HumanRightsDayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/MunicipalElections2016DayTest.php b/tests/SouthAfrica/MunicipalElections2016DayTest.php index 45ba0b67a..84513dfe5 100644 --- a/tests/SouthAfrica/MunicipalElections2016DayTest.php +++ b/tests/SouthAfrica/MunicipalElections2016DayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/NewYearsDayTest.php b/tests/SouthAfrica/NewYearsDayTest.php index f37033346..20f989c6c 100644 --- a/tests/SouthAfrica/NewYearsDayTest.php +++ b/tests/SouthAfrica/NewYearsDayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/ReconciliationDayTest.php b/tests/SouthAfrica/ReconciliationDayTest.php index 47199f0a9..9e9f1561c 100644 --- a/tests/SouthAfrica/ReconciliationDayTest.php +++ b/tests/SouthAfrica/ReconciliationDayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/SecondChristmasDayTest.php b/tests/SouthAfrica/SecondChristmasDayTest.php index 44f9f09a0..ba97fa6b1 100644 --- a/tests/SouthAfrica/SecondChristmasDayTest.php +++ b/tests/SouthAfrica/SecondChristmasDayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/SouthAfricaBaseTestCase.php b/tests/SouthAfrica/SouthAfricaBaseTestCase.php index eee3b1b57..e98efa0d5 100644 --- a/tests/SouthAfrica/SouthAfricaBaseTestCase.php +++ b/tests/SouthAfrica/SouthAfricaBaseTestCase.php @@ -1,9 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthAfrica/YouthDayTest.php b/tests/SouthAfrica/YouthDayTest.php index a38271a88..1e8dd5e9a 100644 --- a/tests/SouthAfrica/YouthDayTest.php +++ b/tests/SouthAfrica/YouthDayTest.php @@ -1,8 +1,11 @@ format('w')) { $date->add(new \DateInterval('P1D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/SouthKorea/ArborDayTest.php b/tests/SouthKorea/ArborDayTest.php index c93ff92a4..9cdf7f4dc 100644 --- a/tests/SouthKorea/ArborDayTest.php +++ b/tests/SouthKorea/ArborDayTest.php @@ -1,9 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Bern/BernBaseTestCase.php b/tests/Switzerland/Bern/BernBaseTestCase.php index 16b755b95..526a7c5b9 100644 --- a/tests/Switzerland/Bern/BernBaseTestCase.php +++ b/tests/Switzerland/Bern/BernBaseTestCase.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Fribourg/ChristmasDayTest.php b/tests/Switzerland/Fribourg/ChristmasDayTest.php index b403b28c2..189ecd63e 100644 --- a/tests/Switzerland/Fribourg/ChristmasDayTest.php +++ b/tests/Switzerland/Fribourg/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(1870, 1965); // Find first Sunday of September - $date = new \DateTime('First Sunday of '.$year.'-09', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('First Sunday of ' . $year . '-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday $date->add(new \DateInterval('P4D')); @@ -54,7 +57,7 @@ public function testJeuneGenevoisBetween1840And1869(): void { $year = $this->generateRandomYear(Geneva::JEUNE_GENEVOIS_ESTABLISHMENT_YEAR, 1869); // Find first Sunday of September - $date = new \DateTime('First Sunday of '.$year.'-09', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('First Sunday of ' . $year . '-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday $date->add(new \DateInterval('P4D')); diff --git a/tests/Switzerland/Geneva/NewYearsDayTest.php b/tests/Switzerland/Geneva/NewYearsDayTest.php index 7c02946a7..e17861f8b 100644 --- a/tests/Switzerland/Geneva/NewYearsDayTest.php +++ b/tests/Switzerland/Geneva/NewYearsDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Glarus/ChristmasDayTest.php b/tests/Switzerland/Glarus/ChristmasDayTest.php index f492a03b9..9a99a5b39 100644 --- a/tests/Switzerland/Glarus/ChristmasDayTest.php +++ b/tests/Switzerland/Glarus/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new \DateTime('First Thursday of '.$year.'-04', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('First Thursday of ' . $year . '-04', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); } diff --git a/tests/Switzerland/Glarus/NewYearsDayTest.php b/tests/Switzerland/Glarus/NewYearsDayTest.php index 590e512c3..eef7dc1c9 100644 --- a/tests/Switzerland/Glarus/NewYearsDayTest.php +++ b/tests/Switzerland/Glarus/NewYearsDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Jura/BettagsMontagTest.php b/tests/Switzerland/Jura/BettagsMontagTest.php index 3064c4486..101d0c521 100644 --- a/tests/Switzerland/Jura/BettagsMontagTest.php +++ b/tests/Switzerland/Jura/BettagsMontagTest.php @@ -1,8 +1,11 @@ generateRandomYear(1832); // Find third Sunday of September - $date = new \DateTime('Third Sunday of '.$year.'-09', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('Third Sunday of ' . $year . '-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday $date->add(new \DateInterval('P1D')); diff --git a/tests/Switzerland/Jura/ChristmasDayTest.php b/tests/Switzerland/Jura/ChristmasDayTest.php index 12b6cbc4b..497d27546 100644 --- a/tests/Switzerland/Jura/ChristmasDayTest.php +++ b/tests/Switzerland/Jura/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Lucerne/ChristmasDayTest.php b/tests/Switzerland/Lucerne/ChristmasDayTest.php index 286c4de51..902103361 100644 --- a/tests/Switzerland/Lucerne/ChristmasDayTest.php +++ b/tests/Switzerland/Lucerne/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(1832); // Find third Sunday of September - $date = new \DateTime('Third Sunday of '.$year.'-09', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('Third Sunday of ' . $year . '-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday $date->add(new \DateInterval('P1D')); diff --git a/tests/Switzerland/Neuchatel/ChristmasDayTest.php b/tests/Switzerland/Neuchatel/ChristmasDayTest.php index 55702460a..7a67c3d84 100644 --- a/tests/Switzerland/Neuchatel/ChristmasDayTest.php +++ b/tests/Switzerland/Neuchatel/ChristmasDayTest.php @@ -1,8 +1,11 @@ assertNotHoliday( self::REGION, diff --git a/tests/Switzerland/Neuchatel/EasterMondayTest.php b/tests/Switzerland/Neuchatel/EasterMondayTest.php index 5c7b1eeb6..b866834be 100644 --- a/tests/Switzerland/Neuchatel/EasterMondayTest.php +++ b/tests/Switzerland/Neuchatel/EasterMondayTest.php @@ -1,8 +1,11 @@ assertNotHoliday( self::REGION, diff --git a/tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php b/tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php index f801e056c..85406b8d5 100644 --- a/tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php +++ b/tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php index a7b8811cf..d3d5befea 100644 --- a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php +++ b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php @@ -1,8 +1,11 @@ generateRandomYear(1947); - $date = new \DateTime($year.'-09-25', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-09-25', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); @@ -49,7 +52,7 @@ public function testBruderKlausenFestOnAfter1947(): void public function testBruderKlausenFestBetween1649And1946(): void { $year = $this->generateRandomYear(1649, 1946); - $date = new \DateTime($year.'-09-21', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-09-21', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Obwalden/ChristmasDayTest.php b/tests/Switzerland/Obwalden/ChristmasDayTest.php index 7467fec14..224330c64 100644 --- a/tests/Switzerland/Obwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Obwalden/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php index 9d4edda92..a44947a49 100644 --- a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php +++ b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Solothurn/ChristmasDayTest.php b/tests/Switzerland/Solothurn/ChristmasDayTest.php index 599f801c3..dd0d43ed4 100644 --- a/tests/Switzerland/Solothurn/ChristmasDayTest.php +++ b/tests/Switzerland/Solothurn/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Thurgau/ChristmasDayTest.php b/tests/Switzerland/Thurgau/ChristmasDayTest.php index 908fb1e04..3c5c99fc9 100644 --- a/tests/Switzerland/Thurgau/ChristmasDayTest.php +++ b/tests/Switzerland/Thurgau/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Vaud/BettagsMontagTest.php b/tests/Switzerland/Vaud/BettagsMontagTest.php index 8b0e91909..368a363e3 100644 --- a/tests/Switzerland/Vaud/BettagsMontagTest.php +++ b/tests/Switzerland/Vaud/BettagsMontagTest.php @@ -1,8 +1,11 @@ generateRandomYear(1832); // Find third Sunday of September - $date = new \DateTime('Third Sunday of '.$year.'-09', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime('Third Sunday of ' . $year . '-09', new \DateTimeZone(self::TIMEZONE)); // Go to next Thursday $date->add(new \DateInterval('P1D')); diff --git a/tests/Switzerland/Vaud/ChristmasDayTest.php b/tests/Switzerland/Vaud/ChristmasDayTest.php index 9301bd460..8a3637139 100644 --- a/tests/Switzerland/Vaud/ChristmasDayTest.php +++ b/tests/Switzerland/Vaud/ChristmasDayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); - $date = new \DateTime($year.'-01-02', new \DateTimeZone(self::TIMEZONE)); + $date = new \DateTime($year . '-01-02', new \DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); $this->assertHolidayType(self::REGION, self::HOLIDAY, $year, Holiday::TYPE_OTHER); diff --git a/tests/Switzerland/Zug/ChristmasDayTest.php b/tests/Switzerland/Zug/ChristmasDayTest.php index 0c4be41fe..8efb9e1b2 100644 --- a/tests/Switzerland/Zug/ChristmasDayTest.php +++ b/tests/Switzerland/Zug/ChristmasDayTest.php @@ -1,8 +1,11 @@ isHoliday($holidayOfficial)); self::assertEquals(Holiday::TYPE_OFFICIAL, $holidayOfficial->getType()); - $holidaySubstitution = $holidays->getHoliday('substituteHoliday:'.$holidayOfficial->getKey()); + $holidaySubstitution = $holidays->getHoliday('substituteHoliday:' . $holidayOfficial->getKey()); if (! $expectedSubstitution instanceof \DateTimeInterface) { // without substitution diff --git a/tests/Ukraine/UkraineBaseTestCase.php b/tests/Ukraine/UkraineBaseTestCase.php index b9ad9b170..8dbd4567d 100644 --- a/tests/Ukraine/UkraineBaseTestCase.php +++ b/tests/Ukraine/UkraineBaseTestCase.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/ChristmasDayTest.php b/tests/UnitedKingdom/ChristmasDayTest.php index d28c1e02f..93827c0ae 100644 --- a/tests/UnitedKingdom/ChristmasDayTest.php +++ b/tests/UnitedKingdom/ChristmasDayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/EasterMondayTest.php b/tests/UnitedKingdom/EasterMondayTest.php index c8e6f51a2..309d2082f 100644 --- a/tests/UnitedKingdom/EasterMondayTest.php +++ b/tests/UnitedKingdom/EasterMondayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/England/ChristmasDayTest.php b/tests/UnitedKingdom/England/ChristmasDayTest.php index ccb38f337..3cd366bca 100644 --- a/tests/UnitedKingdom/England/ChristmasDayTest.php +++ b/tests/UnitedKingdom/England/ChristmasDayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/England/EasterMondayTest.php b/tests/UnitedKingdom/England/EasterMondayTest.php index 9f71c5ea2..53ddde421 100644 --- a/tests/UnitedKingdom/England/EasterMondayTest.php +++ b/tests/UnitedKingdom/England/EasterMondayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->modify('next monday'); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php index 9af416e6c..6dfeac991 100644 --- a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php index e8e7fbaf0..e54f944cc 100644 --- a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php index ab46f8a46..912e35572 100644 --- a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->modify('next monday'); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php index fe912a8c3..a9198c914 100644 --- a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php index b089a2ba3..2a12100b7 100644 --- a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/Scotland/GoodFridayTest.php b/tests/UnitedKingdom/Scotland/GoodFridayTest.php index caf8d596f..7369c6a8d 100644 --- a/tests/UnitedKingdom/Scotland/GoodFridayTest.php +++ b/tests/UnitedKingdom/Scotland/GoodFridayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php b/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php index b62cb9b0c..c76e60658 100644 --- a/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php +++ b/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php index 5ea15793a..df7799ba9 100644 --- a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->modify('next monday'); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); } } diff --git a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php index 3d24bb8e2..c7c1c959d 100644 --- a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php @@ -1,8 +1,11 @@ generateRandomYear(); diff --git a/tests/UnitedKingdom/Wales/BoxingDayTest.php b/tests/UnitedKingdom/Wales/BoxingDayTest.php index 2fd34f441..9f770fcb6 100644 --- a/tests/UnitedKingdom/Wales/BoxingDayTest.php +++ b/tests/UnitedKingdom/Wales/BoxingDayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/Wales/ChristmasDayTest.php b/tests/UnitedKingdom/Wales/ChristmasDayTest.php index 83ef0087d..1a4114773 100644 --- a/tests/UnitedKingdom/Wales/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Wales/ChristmasDayTest.php @@ -1,8 +1,11 @@ format('w'), [0, 6], true)) { $date->add(new \DateInterval('P2D')); - $this->assertHoliday(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, $date); - $this->assertHolidayType(self::REGION, 'substituteHoliday:'.self::HOLIDAY, $year, Holiday::TYPE_BANK); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + $this->assertHolidayType(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, Holiday::TYPE_BANK); } } diff --git a/tests/UnitedKingdom/Wales/EasterMondayTest.php b/tests/UnitedKingdom/Wales/EasterMondayTest.php index 5154f67d5..1c825e6b6 100644 --- a/tests/UnitedKingdom/Wales/EasterMondayTest.php +++ b/tests/UnitedKingdom/Wales/EasterMondayTest.php @@ -1,8 +1,11 @@ getHoliday('substituteHoliday:'.$key); + $holiday = $holidays->getHoliday('substituteHoliday:' . $key); self::assertInstanceOf(SubstituteHoliday::class, $holiday); $this->assertDateTime($expected, $holiday); @@ -152,7 +154,7 @@ public function assertNotSubstituteHoliday( ): void { $this->assertNotHoliday( $provider, - 'substituteHoliday:'.$key, + 'substituteHoliday:' . $key, $year ); } From d13723ac49ac052af99795a8b50c0d2cc0105704 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 11 Apr 2024 00:20:36 +0900 Subject: [PATCH 06/16] test: fix issue with Portuguese Republic Day test The generator for the years on or after the establishment of the Portuguese Republic Day did not honor the fact that this holiday was suspended in 2013, resulting in tests to fail for years between 2013 and 2016 (when it was restored again). Signed-off-by: Sacha Telgenhof --- tests/Portugal/PortugueseRepublicDayTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index c9088055c..ee52961a3 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -138,7 +138,7 @@ private function randomYearsBeforeEstablishment(): \Generator */ private function randomYearsOnAfterEstablishment(): \Generator { - yield $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + yield $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::HOLIDAY_YEAR_SUSPENDED - 1); yield self::ESTABLISHMENT_YEAR; } From 1f8fca66b072d10cc415ee7bf864b5238a185fef Mon Sep 17 00:00:00 2001 From: fbett Date: Fri, 12 Apr 2024 13:48:28 +0200 Subject: [PATCH 07/16] fix(PHPUnit): Increase memory_limit, to be able to run all tests on MacOS --- phpunit.xml.dist | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index fcf8aea40..62403f3bd 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -18,6 +18,10 @@ verbose="true" > + + + + ./src/Yasumi From 35938765f4766c85519c5fd0053bc23e7f182c79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Hamr=C3=A1k?= Date: Tue, 11 Jun 2024 16:47:16 +0200 Subject: [PATCH 08/16] Update Slovakia.php (#340) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One-time holiday was added on 30.11.2018 and removed 1.9. since 2024, because our Slovak government has officially decided that we don't need so many days to rest 🤦🏼 --- src/Yasumi/Provider/Slovakia.php | 53 ++++++++--- .../DeclarationOfTheSlovakNationTest.php | 88 +++++++++++++++++++ tests/Slovakia/SlovakConstitutionDayTest.php | 10 ++- tests/Slovakia/SlovakiaTest.php | 9 +- 4 files changed, 145 insertions(+), 15 deletions(-) create mode 100644 tests/Slovakia/DeclarationOfTheSlovakNationTest.php diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index 603d6eda1..f6b0474d0 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -86,10 +86,12 @@ public function initialize(): void $this->calculateSaintsCyrilAndMethodiusDay(); // 29.8. $this->calculateSlovakNationalUprisingDay(); - // 1.9. + // 1.9.(<2024) $this->calculateSlovakConstitutionDay(); // 15.9. $this->calculateOurLadyOfSorrowsDay(); + // 30.10.2018 + $this->calculateDeclarationOfTheSlovakNation(); // 1.11. $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK)); // 17.11. @@ -114,6 +116,31 @@ public function getSources(): array ]; } + /** + * Anniversary of the Declaration of the Slovak Nation. + * In 2018, October 30 was a one-time public holiday. For this reason, it was not a commemorative day in 2018. + * + * @see https://sk.wikipedia.org/wiki/Zoznam_sviatkov_na_Slovensku#endnote_pozn-01 + * + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + protected function calculateDeclarationOfTheSlovakNation(): void + { + if (2018 === $this->year) { + $this->addHoliday(new Holiday( + 'declarationOfTheSlovakNation', + [ + 'sk' => 'Výročie Deklarácie slovenského národa', + 'en' => 'Anniversary of the Declaration of the Slovak Nation', + ], + new \DateTime($this->year . '-10-30', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale + )); + } + } + /** * New Year's Day. * @@ -189,6 +216,8 @@ protected function calculateSlovakNationalUprisingDay(): void * Day of the Constitution of the Slovak Republic. * * @see https://en.wikipedia.org/wiki/Constitution_of_Slovakia + * Removed since 2024 + * @see https://www.slov-lex.sk/pravne-predpisy/SK/ZZ/1993/241/ * * @throws \InvalidArgumentException * @throws UnknownLocaleException @@ -196,16 +225,18 @@ protected function calculateSlovakNationalUprisingDay(): void */ protected function calculateSlovakConstitutionDay(): void { - $this->addHoliday(new Holiday( - 'slovakConstitutionDay', - [ - 'sk' => 'Deň Ústavy Slovenskej republiky', - 'en' => 'Day of the Constitution of the Slovak Republic', - ], - new \DateTime($this->year . '-09-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), - $this->locale, - Holiday::TYPE_OFFICIAL - )); + if ($this->year < 2024) { + $this->addHoliday(new Holiday( + 'slovakConstitutionDay', + [ + 'sk' => 'Deň Ústavy Slovenskej republiky', + 'en' => 'Day of the Constitution of the Slovak Republic', + ], + new \DateTime($this->year . '-09-01', DateTimeZoneFactory::getDateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); + } } /** diff --git a/tests/Slovakia/DeclarationOfTheSlovakNationTest.php b/tests/Slovakia/DeclarationOfTheSlovakNationTest.php new file mode 100644 index 000000000..bfb397fc1 --- /dev/null +++ b/tests/Slovakia/DeclarationOfTheSlovakNationTest.php @@ -0,0 +1,88 @@ + + */ + +namespace Yasumi\tests\Slovakia; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing an official holiday in Slovakia. + * + * @author Jan Hamrak + */ +class DeclarationOfTheSlovakNationTest extends SlovakiaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday to be tested. + */ + public const HOLIDAY = 'declarationOfTheSlovakNation'; + + /** + * Tests the holiday defined in this test. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + if (2018 === $year) { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } else { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + } + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(10, 30, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + 2018, + [self::LOCALE => 'Výročie Deklarácie slovenského národa'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, 2018, Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Slovakia/SlovakConstitutionDayTest.php b/tests/Slovakia/SlovakConstitutionDayTest.php index 73a6749aa..5b0f68fa2 100644 --- a/tests/Slovakia/SlovakConstitutionDayTest.php +++ b/tests/Slovakia/SlovakConstitutionDayTest.php @@ -42,7 +42,11 @@ class SlovakConstitutionDayTest extends SlovakiaBaseTestCase implements HolidayT */ public function testHoliday(int $year, \DateTimeInterface $expected): void { - $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + if ($year < 2024) { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } else { + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + } } /** @@ -67,7 +71,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(), + $this->generateRandomYear(null, 2013), [self::LOCALE => 'Deň Ústavy Slovenskej republiky'] ); } @@ -79,6 +83,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(null, 2013), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Slovakia/SlovakiaTest.php b/tests/Slovakia/SlovakiaTest.php index 26b4259eb..2638a42e4 100644 --- a/tests/Slovakia/SlovakiaTest.php +++ b/tests/Slovakia/SlovakiaTest.php @@ -50,11 +50,18 @@ public function testOfficialHolidays(): void { $this->assertDefinedHolidays([ 'slovakIndependenceDay', - 'slovakConstitutionDay', 'slovakNationalUprisingDay', 'saintsCyrilAndMethodiusDay', 'struggleForFreedomAndDemocracyDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + + $this->assertDefinedHolidays([ + 'slovakConstitutionDay', + ], self::REGION, 2013, Holiday::TYPE_OFFICIAL); + + $this->assertDefinedHolidays([ + 'declarationOfTheSlovakNation', + ], self::REGION, 2018, Holiday::TYPE_OFFICIAL); } /** From 18695bdad4dce6839cea44321758b854e1091e56 Mon Sep 17 00:00:00 2001 From: Reza Rabbani <50789773+thrashzone13@users.noreply.github.com> Date: Sat, 6 Jul 2024 06:54:04 +0200 Subject: [PATCH 09/16] Iran provider (#341) Implement provider for Iran --- src/Yasumi/Provider/Iran.php | 152 ++++++++++++++++++ .../AnniversaryOfIslamicRevolutionTest.php | 76 +++++++++ tests/Iran/DeathOfKhomeiniTest.php | 76 +++++++++ tests/Iran/IranBaseTestCase.php | 32 ++++ tests/Iran/IranTest.php | 93 +++++++++++ tests/Iran/IslamicRepublicDayTest.php | 110 +++++++++++++ ...onalizationOfTheIranianOilIndustryTest.php | 76 +++++++++ tests/Iran/Nowruz1Test.php | 64 ++++++++ tests/Iran/Nowruz2Test.php | 64 ++++++++ tests/Iran/Nowruz3Test.php | 64 ++++++++ tests/Iran/Nowruz4Test.php | 64 ++++++++ tests/Iran/RevoltOfKhordad15Test.php | 76 +++++++++ tests/Iran/SizdahBedarTest.php | 64 ++++++++ 13 files changed, 1011 insertions(+) create mode 100644 src/Yasumi/Provider/Iran.php create mode 100644 tests/Iran/AnniversaryOfIslamicRevolutionTest.php create mode 100644 tests/Iran/DeathOfKhomeiniTest.php create mode 100644 tests/Iran/IranBaseTestCase.php create mode 100644 tests/Iran/IranTest.php create mode 100644 tests/Iran/IslamicRepublicDayTest.php create mode 100644 tests/Iran/NationalizationOfTheIranianOilIndustryTest.php create mode 100644 tests/Iran/Nowruz1Test.php create mode 100644 tests/Iran/Nowruz2Test.php create mode 100644 tests/Iran/Nowruz3Test.php create mode 100644 tests/Iran/Nowruz4Test.php create mode 100644 tests/Iran/RevoltOfKhordad15Test.php create mode 100644 tests/Iran/SizdahBedarTest.php diff --git a/src/Yasumi/Provider/Iran.php b/src/Yasumi/Provider/Iran.php new file mode 100644 index 000000000..8ead12ac2 --- /dev/null +++ b/src/Yasumi/Provider/Iran.php @@ -0,0 +1,152 @@ + + */ + +namespace Yasumi\Provider; + +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; + +/** + * Note: Any Islamic holidays are not part of this provider yet. Islamic holidays are quite complex and at first, + * only Jalali holidays are implemented. + */ +class Iran extends AbstractProvider +{ + /** {@inheritdoc} */ + public const ID = 'IR'; + + /** + * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + $this->timezone = 'Asia/Tehran'; + + $this->addNowruz(); + $this->addIslamicRepublicDay(); + $this->addSizdahBedar(); + $this->addDeathOfKhomeini(); + $this->addRevoltOfKhordad15(); + $this->addAnniversaryOfIslamicRevolution(); + $this->addNationalizationOfTheIranianOilIndustry(); + } + + public function getSources(): array + { + return [ + 'https://en.wikipedia.org/wiki/Public_holidays_in_Iran', + 'https://fa.wikipedia.org/wiki/%D8%AA%D8%B9%D8%B7%DB%8C%D9%84%D8%A7%D8%AA_%D8%B1%D8%B3%D9%85%DB%8C_%D8%AF%D8%B1_%D8%A7%DB%8C%D8%B1%D8%A7%D9%86', + ]; + } + + protected function addNowruz(): void + { + foreach ([21, 22, 23, 24] as $index => $day) { + ++$index; + $this->addHoliday(new Holiday("nowruz{$index}", [ + 'en' => 'Nowruz', + 'fa' => 'نوروز', + ], new \DateTime("{$this->year}-03-{$day}", new \DateTimeZone($this->timezone)), $this->locale)); + } + } + + /** + * The day usually falls on 1 April, however, as it is determined by the vernal equinox, the date can change if the equinox does not fall on 21 March. + * In 2016, it was on 31 March, and in 2017, 2019, 2021, 2022 and 2023 the date was back to 1 April. + * + * @see https://en.wikipedia.org/wiki/Iranian_Islamic_Republic_Day + * + * @throws \Exception + */ + protected function addIslamicRepublicDay(): void + { + if (1979 > $this->year) { + return; + } + + $month = '04'; + $day = '01'; + + if (2016 === $this->year) { + $month = '03'; + $day = '31'; + } + + $this->addHoliday(new Holiday('islamicRepublicDay', [ + 'en' => 'Ruz e Jomhuri ye Eslami', + 'fa' => 'روز جمهوری اسلامی', + ], new \DateTime("{$this->year}-{$month}-{$day}", new \DateTimeZone($this->timezone)), $this->locale)); + } + + protected function addSizdahBedar(): void + { + $this->addHoliday(new Holiday('sizdahBedar', [ + 'en' => 'Sizdah be dar', + 'fa' => 'سیزده بدر', + ], new \DateTime("{$this->year}-04-02", new \DateTimeZone($this->timezone)), $this->locale)); + } + + protected function addDeathOfKhomeini(): void + { + if (1989 > $this->year) { + return; + } + + $this->addHoliday(new Holiday('deathOfKhomeini', [ + 'en' => 'Marg e Khomeini', + 'fa' => 'مرگ خمینی', + ], new \DateTime("{$this->year}-06-04", new \DateTimeZone($this->timezone)), $this->locale)); + } + + protected function addRevoltOfKhordad15(): void + { + if (1979 > $this->year) { + return; + } + + $this->addHoliday(new Holiday('revoltOfKhordad15', [ + 'en' => 'Qiam e Panzdah e Khordad', + 'fa' => 'قیام ۱۵ خرداد', + ], new \DateTime("{$this->year}-06-05", new \DateTimeZone($this->timezone)), $this->locale)); + } + + protected function addAnniversaryOfIslamicRevolution(): void + { + if (1979 > $this->year) { + return; + } + + $this->addHoliday(new Holiday('anniversaryOfIslamicRevolution', [ + 'en' => 'Enqelab e Eslami', + 'fa' => 'انقلاب اسلامی پنجاه و هفت', + ], new \DateTime("{$this->year}-02-11", new \DateTimeZone($this->timezone)), $this->locale)); + } + + protected function addNationalizationOfTheIranianOilIndustry(): void + { + if (1951 > $this->year) { + return; + } + + $this->addHoliday(new Holiday('nationalizationOfTheIranianOilIndustry', [ + 'en' => 'Melli Shodan e Saneat e Naft', + 'fa' => 'ملی شدن صنعت نفت', + ], new \DateTime("{$this->year}-03-20", new \DateTimeZone($this->timezone)), $this->locale)); + } +} diff --git a/tests/Iran/AnniversaryOfIslamicRevolutionTest.php b/tests/Iran/AnniversaryOfIslamicRevolutionTest.php new file mode 100644 index 000000000..0734ff3ef --- /dev/null +++ b/tests/Iran/AnniversaryOfIslamicRevolutionTest.php @@ -0,0 +1,76 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; +use Yasumi\Yasumi; + +class AnniversaryOfIslamicRevolutionTest extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'anniversaryOfIslamicRevolution'; + + public const ESTABLISHMENT_YEAR = 1979; + + public function testAnniversaryOfIslamicRevolutionBeforeEstablishment(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * @throws \Exception + */ + public function testAnniversaryOfIslamicRevolutionAfterEstablishment(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-02-11", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [ + self::LOCALE => 'انقلاب اسلامی پنجاه و هفت', + 'en' => 'Enqelab e Eslami', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/DeathOfKhomeiniTest.php b/tests/Iran/DeathOfKhomeiniTest.php new file mode 100644 index 000000000..9e5229172 --- /dev/null +++ b/tests/Iran/DeathOfKhomeiniTest.php @@ -0,0 +1,76 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; +use Yasumi\Yasumi; + +class DeathOfKhomeiniTest extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'deathOfKhomeini'; + + public const ESTABLISHMENT_YEAR = 1989; + + public function testDeathOfKhomeiniBeforeEstablishment(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * @throws \Exception + */ + public function testDeathOfKhomeiniAfterEstablishment(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-06-04", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [ + self::LOCALE => 'مرگ خمینی', + 'en' => 'Marg e Khomeini', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/IranBaseTestCase.php b/tests/Iran/IranBaseTestCase.php new file mode 100644 index 000000000..b2afb67ba --- /dev/null +++ b/tests/Iran/IranBaseTestCase.php @@ -0,0 +1,32 @@ + + */ + +namespace Yasumi\tests\Iran; + +use PHPUnit\Framework\TestCase; +use Yasumi\tests\YasumiBase; + +class IranBaseTestCase extends TestCase +{ + use YasumiBase; + + public const REGION = 'Iran'; + + public const TIMEZONE = 'Asia/Tehran'; + + public const LOCALE = 'fa'; +} diff --git a/tests/Iran/IranTest.php b/tests/Iran/IranTest.php new file mode 100644 index 000000000..6c6f0b8fe --- /dev/null +++ b/tests/Iran/IranTest.php @@ -0,0 +1,93 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\ProviderTestCase; + +class IranTest extends IranBaseTestCase implements ProviderTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected int $year; + + /** + * @throws \Exception + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(); + } + + public function testOfficialHolidays(): void + { + $holidays = [ + 'nowruz1', + 'nowruz2', + 'nowruz3', + 'nowruz4', + 'sizdahBedar', + ]; + + if (1979 <= $this->year) { + $holidays[] = 'islamicRepublicDay'; + $holidays[] = 'revoltOfKhordad15'; + $holidays[] = 'anniversaryOfIslamicRevolution'; + } + + if (1989 <= $this->year) { + $holidays[] = 'deathOfKhomeini'; + } + + if (1951 <= $this->year) { + $holidays[] = 'nationalizationOfTheIranianOilIndustry'; + } + + $this->assertDefinedHolidays($holidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + public function testSeasonalHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_SEASON); + } + + public function testBankHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_BANK); + } + + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * @throws \ReflectionException + * @throws \Exception + */ + public function testSources(): void + { + $this->assertSources(self::REGION, 2); + } +} diff --git a/tests/Iran/IslamicRepublicDayTest.php b/tests/Iran/IslamicRepublicDayTest.php new file mode 100644 index 000000000..c030a24ee --- /dev/null +++ b/tests/Iran/IslamicRepublicDayTest.php @@ -0,0 +1,110 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; +use Yasumi\Yasumi; + +class IslamicRepublicDayTest extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'islamicRepublicDay'; + + public const ESTABLISHMENT_YEAR = 1979; + + public const EQUINOX_YEAR = 2016; + + /** + * @throws \Exception + */ + public function testIslamicRepublicDayBeforeEstablishment(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * @throws \Exception + */ + public function testIslamicRepublicDayBeforeEquinoxYear(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::EQUINOX_YEAR - 1); + var_dump($year); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-04-01", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testIslamicRepublicDayOnEquinoxYear(): void + { + $year = $this->generateRandomYear(self::EQUINOX_YEAR, self::EQUINOX_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-03-31", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testIslamicRepublicDayAfterEquinoxYear(): void + { + $year = $this->generateRandomYear(self::EQUINOX_YEAR + 1); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-04-01", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::EQUINOX_YEAR), + [ + self::LOCALE => 'روز جمهوری اسلامی', + 'en' => 'Ruz e Jomhuri ye Eslami', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::EQUINOX_YEAR), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/NationalizationOfTheIranianOilIndustryTest.php b/tests/Iran/NationalizationOfTheIranianOilIndustryTest.php new file mode 100644 index 000000000..94f34bb07 --- /dev/null +++ b/tests/Iran/NationalizationOfTheIranianOilIndustryTest.php @@ -0,0 +1,76 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; +use Yasumi\Yasumi; + +class NationalizationOfTheIranianOilIndustryTest extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'nationalizationOfTheIranianOilIndustry'; + + public const ESTABLISHMENT_YEAR = 1951; + + public function testNationalizationOfTheIranianOilIndustryBeforeEstablishment(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * @throws \Exception + */ + public function testNationalizationOfTheIranianOilIndustryAfterEstablishment(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-03-20", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [ + self::LOCALE => 'ملی شدن صنعت نفت', + 'en' => 'Melli Shodan e Saneat e Naft', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/Nowruz1Test.php b/tests/Iran/Nowruz1Test.php new file mode 100644 index 000000000..31926b82e --- /dev/null +++ b/tests/Iran/Nowruz1Test.php @@ -0,0 +1,64 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +class Nowruz1Test extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'nowruz1'; + + /** + * @throws \Exception + */ + public function testNowruz1(): void + { + $year = $this->generateRandomYear(); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-03-21", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [ + self::LOCALE => 'نوروز', + 'en' => 'Nowruz', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/Nowruz2Test.php b/tests/Iran/Nowruz2Test.php new file mode 100644 index 000000000..e1487c75f --- /dev/null +++ b/tests/Iran/Nowruz2Test.php @@ -0,0 +1,64 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +class Nowruz2Test extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'nowruz2'; + + /** + * @throws \Exception + */ + public function testNowruz2(): void + { + $year = $this->generateRandomYear(); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-03-22", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [ + self::LOCALE => 'نوروز', + 'en' => 'Nowruz', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/Nowruz3Test.php b/tests/Iran/Nowruz3Test.php new file mode 100644 index 000000000..51df83842 --- /dev/null +++ b/tests/Iran/Nowruz3Test.php @@ -0,0 +1,64 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +class Nowruz3Test extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'nowruz3'; + + /** + * @throws \Exception + */ + public function testNowruz3(): void + { + $year = $this->generateRandomYear(); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-03-23", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [ + self::LOCALE => 'نوروز', + 'en' => 'Nowruz', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/Nowruz4Test.php b/tests/Iran/Nowruz4Test.php new file mode 100644 index 000000000..9b27e6741 --- /dev/null +++ b/tests/Iran/Nowruz4Test.php @@ -0,0 +1,64 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +class Nowruz4Test extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'nowruz4'; + + /** + * @throws \Exception + */ + public function testNowruz4(): void + { + $year = $this->generateRandomYear(); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-03-24", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [ + self::LOCALE => 'نوروز', + 'en' => 'Nowruz', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/RevoltOfKhordad15Test.php b/tests/Iran/RevoltOfKhordad15Test.php new file mode 100644 index 000000000..7d3b7b07f --- /dev/null +++ b/tests/Iran/RevoltOfKhordad15Test.php @@ -0,0 +1,76 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; +use Yasumi\Yasumi; + +class RevoltOfKhordad15Test extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'revoltOfKhordad15'; + + public const ESTABLISHMENT_YEAR = 1979; + + public function testRevoltOfKhordad15BeforeEstablishment(): void + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(Yasumi::YEAR_LOWER_BOUND, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * @throws \Exception + */ + public function testRevoltOfKhordad15AfterEstablishment(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-06-05", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [ + self::LOCALE => 'قیام ۱۵ خرداد', + 'en' => 'Qiam e Panzdah e Khordad', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Iran/SizdahBedarTest.php b/tests/Iran/SizdahBedarTest.php new file mode 100644 index 000000000..84209f767 --- /dev/null +++ b/tests/Iran/SizdahBedarTest.php @@ -0,0 +1,64 @@ + + */ + +namespace Yasumi\tests\Iran; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +class SizdahBedarTest extends IranBaseTestCase implements HolidayTestCase +{ + public const HOLIDAY = 'sizdahBedar'; + + /** + * @throws \Exception + */ + public function testSizdahBedar(): void + { + $year = $this->generateRandomYear(); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new \DateTime("{$year}-04-02", new \DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [ + self::LOCALE => 'سیزده بدر', + 'en' => 'Sizdah be dar', + ] + ); + } + + /** + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} From c533bf5b22007715fb26905ab04fa87067300714 Mon Sep 17 00:00:00 2001 From: fbett Date: Sat, 6 Jul 2024 06:55:35 +0200 Subject: [PATCH 10/16] Fix, Provider\Germany: Pentecost is not an official holiday - except in Brandenburg (#337) * fix(Provider\Germany): pentecost is not an official holiday - except in Brandenburg (see #100) --- src/Yasumi/Provider/Germany.php | 2 +- tests/Germany/GermanyTest.php | 5 ++++- tests/Germany/PentecostTest.php | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Yasumi/Provider/Germany.php b/src/Yasumi/Provider/Germany.php index a2b3a7aae..2fb294a58 100644 --- a/src/Yasumi/Provider/Germany.php +++ b/src/Yasumi/Provider/Germany.php @@ -55,7 +55,7 @@ public function initialize(): void $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale)); - $this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); $this->addHoliday($this->pentecostMonday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale)); diff --git a/tests/Germany/GermanyTest.php b/tests/Germany/GermanyTest.php index 2577a4780..fb9a939c8 100644 --- a/tests/Germany/GermanyTest.php +++ b/tests/Germany/GermanyTest.php @@ -87,7 +87,10 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays([ + 'newYearsEve', + 'pentecost', + ], self::REGION, $this->year, Holiday::TYPE_OTHER); } /** diff --git a/tests/Germany/PentecostTest.php b/tests/Germany/PentecostTest.php index 6b415e8c6..8277dd7b7 100644 --- a/tests/Germany/PentecostTest.php +++ b/tests/Germany/PentecostTest.php @@ -73,6 +73,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OTHER); } } From 7447553379a962e5f04d1128f38269ed5f049a86 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 9 Jul 2024 08:43:11 +0900 Subject: [PATCH 11/16] refactor: remove astray var_dump use Signed-off-by: Sacha Telgenhof --- tests/Iran/IslamicRepublicDayTest.php | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/Iran/IslamicRepublicDayTest.php b/tests/Iran/IslamicRepublicDayTest.php index c030a24ee..1aee7ee8b 100644 --- a/tests/Iran/IslamicRepublicDayTest.php +++ b/tests/Iran/IslamicRepublicDayTest.php @@ -47,7 +47,6 @@ public function testIslamicRepublicDayBeforeEstablishment(): void public function testIslamicRepublicDayBeforeEquinoxYear(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::EQUINOX_YEAR - 1); - var_dump($year); $this->assertHoliday( self::REGION, self::HOLIDAY, From e7b3392abd0f1f68a6a0cc5c1658e61263488f69 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 9 Jul 2024 08:47:53 +0900 Subject: [PATCH 12/16] feat: Add Assumption of Mary holiday to Bavaria (Germany) Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Germany/Bavaria.php | 1 + .../Germany/Bavaria/AssumptionOfMaryTest.php | 82 +++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 tests/Germany/Bavaria/AssumptionOfMaryTest.php diff --git a/src/Yasumi/Provider/Germany/Bavaria.php b/src/Yasumi/Provider/Germany/Bavaria.php index 210ce52d1..aaea61e20 100644 --- a/src/Yasumi/Provider/Germany/Bavaria.php +++ b/src/Yasumi/Provider/Germany/Bavaria.php @@ -50,5 +50,6 @@ public function initialize(): void $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale, Holiday::TYPE_OFFICIAL)); $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->assumptionOfMary($this->year, $this->timezone, $this->locale, Holiday::TYPE_OTHER)); } } diff --git a/tests/Germany/Bavaria/AssumptionOfMaryTest.php b/tests/Germany/Bavaria/AssumptionOfMaryTest.php new file mode 100644 index 000000000..5bf174ccb --- /dev/null +++ b/tests/Germany/Bavaria/AssumptionOfMaryTest.php @@ -0,0 +1,82 @@ + + */ + +namespace Yasumi\tests\Germany\Bavaria; + +use Yasumi\Holiday; +use Yasumi\tests\HolidayTestCase; + +/** + * Class for testing the day of the Assumption of Mary in Bavaria (Germany). + */ +class AssumptionOfMaryTest extends BavariaBaseTestCase implements HolidayTestCase +{ + /** + * The name of the holiday. + */ + public const HOLIDAY = 'assumptionOfMary'; + + /** + * Tests the holiday defined in this test. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param \DateTime $expected the expected date + */ + public function testHoliday(int $year, \DateTimeInterface $expected): void + { + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Returns a list of random test dates used for assertion of the holiday defined in this test. + * + * @return array list of test dates for the holiday defined in this test + * + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(8, 15, self::TIMEZONE); + } + + /** + * Tests translated name of the Assumption of Mary. + * + * @throws \Exception + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Mariä Himmelfahrt'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * + * @throws \Exception + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OTHER); + } +} From 05a71062b195901e40e9018e93f14aa265ff8513 Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Mon, 19 Aug 2024 16:16:39 +0200 Subject: [PATCH 13/16] handle invalid timezones Australia/ACT and Europe/Kiev - fixes #342 --- .../Provider/Australia/AustralianCapitalTerritory.php | 8 +++++++- src/Yasumi/Provider/Ukraine.php | 11 ++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php index e14dabe78..a3a0f0c27 100644 --- a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php +++ b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php @@ -33,7 +33,13 @@ class AustralianCapitalTerritory extends Australia */ public const ID = 'AU-ACT'; - public string $timezone = 'Australia/ACT'; + /** + * This was "Australia/ACT" in the past, which is only a link to Australia/Sydney. + * In recent versions of PHP "Australia/ACT" was removed, so this is no longer the link version. + * + * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + */ + public string $timezone = 'Australia/Sydney'; /** * Initialize holidays for Australian Capital Territory (Australia). diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 2c37405f3..7e272f533 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -48,7 +48,16 @@ class Ukraine extends AbstractProvider */ public function initialize(): void { - $this->timezone = 'Europe/Kiev'; + // the name of the timezone changed at some point and some systems support both names, + // while others only support the old or the new one -> try out, which version is actually working + try { + new \DateTimeZone('Europe/Kiev'); + $this->timezone = 'Europe/Kiev'; + } catch (\Exception $e) { + // this is an DateInvalidTimeZoneException only since 8.3 + // see https://www.php.net/manual/en/datetimezone.construct.php + $this->timezone = 'Europe/Kyiv'; + } // Add common holidays // New Years Day will not be substituted to an monday if it's on a weekend! From 964abcf1568e526e234da29bf5bccb0ef601f4af Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Mon, 19 Aug 2024 19:30:17 +0200 Subject: [PATCH 14/16] simplification --- .../Provider/Australia/AustralianCapitalTerritory.php | 6 ++---- src/Yasumi/Provider/Ukraine.php | 8 +++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php index a3a0f0c27..bfd36e0e5 100644 --- a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php +++ b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php @@ -34,10 +34,8 @@ class AustralianCapitalTerritory extends Australia public const ID = 'AU-ACT'; /** - * This was "Australia/ACT" in the past, which is only a link to Australia/Sydney. - * In recent versions of PHP "Australia/ACT" was removed, so this is no longer the link version. - * - * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + * This was "Australia/ACT" in the past, which is a TZ link to "Australia/Sydney". + * Recent builds of PHP removed "Australia/ACT", so this was changed as well. */ public string $timezone = 'Australia/Sydney'; diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 7e272f533..517373210 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -51,12 +51,10 @@ public function initialize(): void // the name of the timezone changed at some point and some systems support both names, // while others only support the old or the new one -> try out, which version is actually working try { - new \DateTimeZone('Europe/Kiev'); - $this->timezone = 'Europe/Kiev'; - } catch (\Exception $e) { - // this is an DateInvalidTimeZoneException only since 8.3 - // see https://www.php.net/manual/en/datetimezone.construct.php + new \DateTimeZone('Europe/Kyiv'); $this->timezone = 'Europe/Kyiv'; + } catch (\Exception $e) { // DateInvalidTimeZoneException since 8.3 + $this->timezone = 'Europe/Kiev'; } // Add common holidays From 95a7ae8bf9fc692223e030132b2e6acb1636c4e6 Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Wed, 21 Aug 2024 10:08:39 +0200 Subject: [PATCH 15/16] use try&catch to identify available timezone --- .../Australia/AustralianCapitalTerritory.php | 16 ++++++++++------ src/Yasumi/Provider/Ukraine.php | 3 ++- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php index bfd36e0e5..c34251b83 100644 --- a/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php +++ b/src/Yasumi/Provider/Australia/AustralianCapitalTerritory.php @@ -33,12 +33,6 @@ class AustralianCapitalTerritory extends Australia */ public const ID = 'AU-ACT'; - /** - * This was "Australia/ACT" in the past, which is a TZ link to "Australia/Sydney". - * Recent builds of PHP removed "Australia/ACT", so this was changed as well. - */ - public string $timezone = 'Australia/Sydney'; - /** * Initialize holidays for Australian Capital Territory (Australia). * @@ -48,6 +42,16 @@ class AustralianCapitalTerritory extends Australia */ public function initialize(): void { + // This was "Australia/ACT" in the past, which is a TZ link to "Australia/Sydney". + // Recent builds of PHP removed "Australia/ACT", so we have to figure out which one is available on the system + try { + new \DateTimeZone('Australia/Sydney'); + $this->timezone = 'Australia/Sydney'; + } catch (\Exception $e) { // @phpstan-ignore-line + // DateInvalidTimeZoneException since 8.3 + $this->timezone = 'Australia/ACT'; + } + parent::initialize(); $this->addHoliday($this->easterSunday($this->year, $this->timezone, $this->locale)); diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 517373210..a98381e44 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -53,7 +53,8 @@ public function initialize(): void try { new \DateTimeZone('Europe/Kyiv'); $this->timezone = 'Europe/Kyiv'; - } catch (\Exception $e) { // DateInvalidTimeZoneException since 8.3 + } catch (\Exception $e) { // @phpstan-ignore-line + // DateInvalidTimeZoneException since 8.3 $this->timezone = 'Europe/Kiev'; } From 42a3b3570056b4cfce3a9159c5bab6b4fd9e08fb Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Fri, 20 Sep 2024 17:59:27 +0200 Subject: [PATCH 16/16] handle invalid/changed timezones --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ea7c792d4..6c5fbe8f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,12 +14,15 @@ changes. ### Changed -- Holiday calculation methods in providers are now protected instead of private +- Holiday calculation methods in providers are now protected instead of private to allow use in [custom providers](https://www.yasumi.dev/docs/cookbook/custom_provider/). [\#331](https://github.com/azuyalabs/yasumi/issues/331) ### Fixed +- Handle invalid/changed timezones Australia/ACT and Europe/Kiev [\#343](https://github.com/azuyalabs/yasumi/pull/343) + ([Kevin Papst](https://github.com/kevinpapst)) + ### Removed ## [2.7.0] - 2024-01-02