From 2b7d2bcdd06d128de501d573ec6dc99893bb1123 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 16 Jan 2019 15:48:21 +0900 Subject: [PATCH 001/133] Refactored the Netherlands Holiday provider by moving the calculation of individual holidays to private methods. This will reduce the complexity of the initialize method. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Netherlands.php | 153 ++++++++++++++++++++++------ 1 file changed, 121 insertions(+), 32 deletions(-) diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 2c301b997..44975b09a 100755 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -73,9 +73,27 @@ public function initialize(): void $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale)); - /** - * Commemoration Day and Liberation Day. Instituted after WWII in 1947. - */ + // Calculate other holidays + $this->calculateCarnival(); + $this->calculateWinterTime(); + $this->calculateSummerTime(); + $this->calculateStNicholasDay(); + $this->calculateHalloween(); + $this->calculatePrincesDay(); + $this->calculateQueensday(); + $this->calculateKingsday(); + $this->calculateCommemorationLiberationDay(); + } + + /** + * Commemoration Day and Liberation Day. + * + * Instituted after WWII in 1947. + * + * @throws \Exception + */ + private function calculateCommemorationLiberationDay(): void + { if ($this->year >= 1947) { $this->addHoliday(new Holiday( 'commemorationDay', @@ -92,13 +110,18 @@ public function initialize(): void Holiday::TYPE_OBSERVANCE )); } + } - /** - * Kings Day. - * - * King's Day is celebrated from 2014 onwards on April 27th. If this happens to be on a Sunday, it will be - * celebrated the day before instead. - */ + /** + * Kings Day. + * + * King's Day is celebrated from 2014 onwards on April 27th. If this happens to be on a Sunday, it will be + * celebrated the day before instead. + * + * @throws \Exception + */ + private function calculateKingsday(): void + { if ($this->year >= 2014) { $date = new DateTime("$this->year-4-27", new DateTimeZone($this->timezone)); @@ -113,14 +136,19 @@ public function initialize(): void $this->locale )); } + } - /** - * Queen's Day. - * - * Queen's Day was celebrated between 1891 and 1948 (inclusive) on August 31. Between 1949 and 2013 (inclusive) it - * was celebrated April 30. If these dates are on a Sunday, Queen's Day was celebrated one day later until 1980 - * (on the following Monday), starting 1980 one day earlier (on the preceding Saturday). - */ + /** + * Queen's Day. + * + * Queen's Day was celebrated between 1891 and 1948 (inclusive) on August 31. Between 1949 and 2013 (inclusive) it + * was celebrated April 30. If these dates are on a Sunday, Queen's Day was celebrated one day later until 1980 + * (on the following Monday), starting 1980 one day earlier (on the preceding Saturday). + * + * @throws \Exception + */ + private function calculateQueensday(): void + { if ($this->year >= 1891 && $this->year <= 2013) { $date = new DateTime("$this->year-4-30", new DateTimeZone($this->timezone)); if ($this->year <= 1948) { @@ -139,13 +167,18 @@ public function initialize(): void $this->locale )); } + } - /** - * Prince's Day. - * - * Prinsjesdag (English: Prince's Day) is the day on which the reigning monarch of the Netherlands addresses a joint - * session of the Dutch Senate and House of Representatives. - */ + /** + * Prince's Day. + * + * Prinsjesdag (English: Prince's Day) is the day on which the reigning monarch of the Netherlands addresses a joint + * session of the Dutch Senate and House of Representatives. + * + * @throws \Exception + */ + private function calculatePrincesDay(): void + { $this->addHoliday(new Holiday( 'princesDay', ['en_US' => 'Prince\'s Day', 'nl_NL' => 'Prinsjesdag'], @@ -153,10 +186,22 @@ public function initialize(): void $this->locale, Holiday::TYPE_OTHER )); + } - /** - * Halloween - */ + /** + * Halloween + * + * Halloween or Hallowe'en (a contraction of Hallows' Even or Hallows' Evening), is a celebration observed in + * several countries on 31 October, the eve of the Western Christian feast of All Hallows' Day. + * It begins the three-day observance of Allhallowtide, the time in the liturgical year dedicated to remembering the + * dead, including saints (hallows), martyrs, and all the faithful departed. + * + * @link https://en.wikipedia.org/wiki/Halloween + * + * @throws \Exception + */ + private function calculateHalloween(): void + { $this->addHoliday(new Holiday( 'halloween', ['en_US' => 'Halloween', 'nl_NL' => 'Halloween'], @@ -164,7 +209,22 @@ public function initialize(): void $this->locale, Holiday::TYPE_OBSERVANCE )); + } + /** + * St. Nicholas' Day + * + * The feast of Sinterklaas celebrates the name day of Saint Nicholas on 6 December. + * The feast is celebrated annually with the giving of gifts on St. Nicholas' Eve (5 December) in the Netherlands + * and on the morning of 6 December, Saint Nicholas Day, in Belgium, Luxembourg and northern France + * (French Flanders, Lorraine and Artois). + * + * @link https://en.wikipedia.org/wiki/Sinterklaas + * + * @throws \Exception + */ + private function calculateStNicholasDay(): void + { /** * St. Nicholas' Day */ @@ -175,24 +235,53 @@ public function initialize(): void $this->locale, Holiday::TYPE_OBSERVANCE )); + } + /** + * Summer Time. + * + * The beginning of summer time. Summer time is also known as day lights saving time. + * + * @see \Yasumi\Provider\CommonHolidays::summerTime() + * + * @throws \Exception + */ + private function calculateSummerTime(): void + { $summerTime = $this->summerTime($this->year, $this->timezone, $this->locale); if ($summerTime !== null) { $this->addHoliday($summerTime); } + } + /** + * Winter Time. + * + * The beginning of winter time. Winter time is also known as standard time. + * + * @see \Yasumi\Provider\CommonHolidays::winterTime() + * + * @throws \Exception + */ + private function calculateWinterTime(): void + { $winterTime = $this->winterTime($this->year, $this->timezone, $this->locale); if ($winterTime !== null) { $this->addHoliday($winterTime); } + } - /** - * Carnival. - * - * Carnival (Dutch: Carnaval) is originally an European Pagan spring festival, with an emphasis on role-reversal - * and suspension of social norms. The feast became assimilated by the Catholic Church and was celebrated in the - * three days preceding Ash Wednesday and Lent. - */ + /** + * Carnival. + * + * Carnival (Dutch: Carnaval) is originally an European Pagan spring festival, with an emphasis on role-reversal + * and suspension of social norms. The feast became assimilated by the Catholic Church and was celebrated in the + * three days preceding Ash Wednesday and Lent. + * + * @throws \Exception + */ + private function calculateCarnival(): void + { $easter = $this->calculateEaster($this->year, $this->timezone); $carnivalDay1 = clone $easter; $this->addHoliday(new Holiday( From 5d3cb76c33adb035532d0d4b88e610d3133e858c Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Fri, 18 Jan 2019 01:26:52 +0100 Subject: [PATCH 002/133] Remove duplicate definition of newYearsDay (#125) --- src/Yasumi/Provider/Germany.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Yasumi/Provider/Germany.php b/src/Yasumi/Provider/Germany.php index cde6e1b94..ce0c0ff23 100644 --- a/src/Yasumi/Provider/Germany.php +++ b/src/Yasumi/Provider/Germany.php @@ -50,7 +50,6 @@ 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->newYearsDay($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->pentecostMonday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale)); From 34302dc92ceb08af60cfb1e35e57dfb505e2b917 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Sun, 20 Jan 2019 03:12:13 +0100 Subject: [PATCH 003/133] Fix comment about weekend in India (#126) --- src/Yasumi/Provider/AbstractProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 8ac7e3305..d4e670146 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -66,7 +66,7 @@ abstract class AbstractProvider implements ProviderInterface, Countable, Iterato // Friday 'IR' => [5], // Iran, Islamic Republic of - // Friday + // Sunday 'IN' => [0], // India ]; From f1a4892c5cdebe058cf5f1fe5fa7e9024649d489 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 23 Jan 2019 09:37:37 +0900 Subject: [PATCH 004/133] Changed visibility of internal class functions to 'private'. These are to be used within the class only and should not be public. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Australia.php | 8 ++++---- src/Yasumi/Provider/Australia/ACT.php | 12 ++++++------ src/Yasumi/Provider/Australia/NSW.php | 8 ++++---- src/Yasumi/Provider/Australia/NT.php | 8 ++++---- src/Yasumi/Provider/Australia/Queensland.php | 4 ++-- .../Provider/Australia/Queensland/Brisbane.php | 2 +- src/Yasumi/Provider/Australia/SA.php | 10 +++++----- src/Yasumi/Provider/Australia/Tasmania.php | 6 +++--- .../Provider/Australia/Tasmania/CentralNorth.php | 2 +- .../Provider/Australia/Tasmania/FlindersIsland.php | 2 +- .../Provider/Australia/Tasmania/KingIsland.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/Northeast.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/Northwest.php | 2 +- .../Australia/Tasmania/Northwest/CircularHead.php | 2 +- src/Yasumi/Provider/Australia/Tasmania/South.php | 2 +- .../Provider/Australia/Tasmania/South/Southeast.php | 2 +- src/Yasumi/Provider/Australia/Victoria.php | 12 ++++++------ src/Yasumi/Provider/Australia/WA.php | 6 +++--- 18 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index 11d3c1a11..26e01e11b 100755 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -70,7 +70,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateAustraliaDay(): void + private function calculateAustraliaDay(): void { $date = new DateTime("$this->year-01-26", new DateTimeZone($this->timezone)); @@ -122,7 +122,7 @@ public function calculateHoliday( * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateNewYearHolidays(): void + private function calculateNewYearHolidays(): void { $newyearsday = new DateTime("$this->year-01-01", new DateTimeZone($this->timezone)); $this->calculateHoliday('newYearsDay', ['en_AU' => 'New Year\'s Day'], $newyearsday, false, false); @@ -154,7 +154,7 @@ public function calculateNewYearHolidays(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateAnzacDay(): void + private function calculateAnzacDay(): void { if ($this->year < 1921) { return; @@ -187,7 +187,7 @@ public function calculateAnzacDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateChristmasDay(): void + private function calculateChristmasDay(): void { $christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone)); $boxingDay = new DateTime("$this->year-12-26", new DateTimeZone($this->timezone)); diff --git a/src/Yasumi/Provider/Australia/ACT.php b/src/Yasumi/Provider/Australia/ACT.php index bd50aa21b..8a804c297 100644 --- a/src/Yasumi/Provider/Australia/ACT.php +++ b/src/Yasumi/Provider/Australia/ACT.php @@ -56,7 +56,7 @@ public function initialize(): void * * @throws \Exception */ - public function calculateCanberraDay(): void + private function calculateCanberraDay(): void { if ($this->year < 2007) { $date = new DateTime("third monday of march $this->year", new DateTimeZone($this->timezone)); @@ -71,7 +71,7 @@ public function calculateCanberraDay(): void * * @throws \Exception */ - public function calculateReconciliationDay(): void + private function calculateReconciliationDay(): void { if ($this->year < 2018) { return; @@ -90,7 +90,7 @@ public function calculateReconciliationDay(): void * * @throws \Exception */ - public function calculateLabourDay(): void + private function calculateLabourDay(): void { $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); @@ -118,7 +118,7 @@ public function calculateLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday + private function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday { return new Holiday( 'easterSaturday', @@ -150,7 +150,7 @@ public function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_ * @throws \InvalidArgumentException * @throws \Exception */ - public function easterSunday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday + private function easterSunday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday { return new Holiday( 'easter', @@ -176,7 +176,7 @@ public function easterSunday($year, $timezone, $locale, $type = Holiday::TYPE_OF * @throws \InvalidArgumentException * @throws \Exception */ - public function calculateQueensBirthday(): void + private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', diff --git a/src/Yasumi/Provider/Australia/NSW.php b/src/Yasumi/Provider/Australia/NSW.php index 73c7efedd..8fafbf2f4 100644 --- a/src/Yasumi/Provider/Australia/NSW.php +++ b/src/Yasumi/Provider/Australia/NSW.php @@ -55,7 +55,7 @@ public function initialize(): void * * @throws \Exception */ - public function calculateLabourDay(): void + private function calculateLabourDay(): void { $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); @@ -83,7 +83,7 @@ public function calculateLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday + private function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday { return new Holiday( 'easterSaturday', @@ -109,7 +109,7 @@ public function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_ * @throws \InvalidArgumentException * @throws \Exception */ - public function calculateQueensBirthday(): void + private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', @@ -126,7 +126,7 @@ public function calculateQueensBirthday(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function calculateBankHoliday(): void + private function calculateBankHoliday(): void { $this->calculateHoliday( 'bankHoliday', diff --git a/src/Yasumi/Provider/Australia/NT.php b/src/Yasumi/Provider/Australia/NT.php index effa3dc97..7374f631b 100644 --- a/src/Yasumi/Provider/Australia/NT.php +++ b/src/Yasumi/Provider/Australia/NT.php @@ -54,7 +54,7 @@ public function initialize(): void * * @throws \Exception */ - public function calculateMayDay(): void + private function calculateMayDay(): void { $date = new DateTime("first monday of may $this->year", new DateTimeZone($this->timezone)); @@ -69,7 +69,7 @@ public function calculateMayDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function calculatePicnicDay(): void + private function calculatePicnicDay(): void { $this->calculateHoliday( 'picnicDay', @@ -101,7 +101,7 @@ public function calculatePicnicDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday + private function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday { return new Holiday( 'easterSaturday', @@ -127,7 +127,7 @@ public function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_ * @throws \InvalidArgumentException * @throws \Exception */ - public function calculateQueensBirthday(): void + private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index 713dddfa5..46ba1351c 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -51,7 +51,7 @@ public function initialize(): void * * @throws \Exception */ - public function calculateLabourDay(): void + private function calculateLabourDay(): void { if ($this->year === 2013 || $this->year === 2014 || $this->year === 2015) { $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); @@ -77,7 +77,7 @@ public function calculateLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function calculateQueensBirthday(): void + private function calculateQueensBirthday(): void { if ($this->year < 2012 || $this->year === 2013 || $this->year === 2014 || $this->year === 2015) { $this->calculateHoliday( diff --git a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php index de0cb863c..bb68208a1 100644 --- a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php +++ b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php @@ -64,7 +64,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculatePeoplesDay(): void + private function calculatePeoplesDay(): void { $date = new DateTime('first friday of august ' . $this->year, new DateTimeZone($this->timezone)); if ($date->format('d') < 5) { diff --git a/src/Yasumi/Provider/Australia/SA.php b/src/Yasumi/Provider/Australia/SA.php index 1cdabcb34..0de3640ee 100644 --- a/src/Yasumi/Provider/Australia/SA.php +++ b/src/Yasumi/Provider/Australia/SA.php @@ -62,7 +62,7 @@ public function initialize(): void * * @throws \Exception */ - public function calculateProclamationDay(): void + private function calculateProclamationDay(): void { $christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone)); $this->calculateHoliday('christmasDay', ['en_AU' => 'Christmas Day'], $christmasDay, false, false); @@ -95,7 +95,7 @@ public function calculateProclamationDay(): void * * @throws \Exception */ - public function calculateLabourDay(): void + private function calculateLabourDay(): void { $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); @@ -110,7 +110,7 @@ public function calculateLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function calculateAdelaideCupDay(): void + private function calculateAdelaideCupDay(): void { if ($this->year >= 1973) { if ($this->year < 2006) { @@ -154,7 +154,7 @@ public function calculateAdelaideCupDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday + private function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday { return new Holiday( 'easterSaturday', @@ -180,7 +180,7 @@ public function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_ * @throws \InvalidArgumentException * @throws \Exception */ - public function calculateQueensBirthday(): void + private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index 6e055a598..7c5d287dc 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -52,7 +52,7 @@ public function initialize(): void * * @throws \Exception */ - public function calculateEightHoursDay(): void + private function calculateEightHoursDay(): void { $date = new DateTime("second monday of march $this->year", new DateTimeZone($this->timezone)); @@ -74,7 +74,7 @@ public function calculateEightHoursDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function calculateQueensBirthday(): void + private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', @@ -93,7 +93,7 @@ public function calculateQueensBirthday(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function calculateRecreationDay(): void + private function calculateRecreationDay(): void { $this->calculateHoliday( 'recreationDay', diff --git a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php index a060a16c9..4c4b35ba5 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php +++ b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php @@ -49,7 +49,7 @@ public function initialize(): void * * @throws \Exception */ - public function calculateDevonportShow(): void + private function calculateDevonportShow(): void { $date = new DateTime($this->year . '-12-02', new DateTimeZone($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 5bcf55cbe..429d173e9 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php @@ -50,7 +50,7 @@ public function initialize(): void * * @throws \Exception */ - public function calculateFlindersIslandShow(): void + private function calculateFlindersIslandShow(): void { $date = new DateTime('third saturday of october ' . $this->year, new DateTimeZone($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 040ad4625..d1c3e3a7e 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php @@ -48,7 +48,7 @@ public function initialize(): void * * @throws \Exception */ - public function calculateKingIslandShow(): void + private function calculateKingIslandShow(): void { $this->calculateHoliday( 'kingIslandShow', diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php index 354c9b372..a1d748bc3 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php @@ -50,7 +50,7 @@ public function initialize(): void * * @throws \Exception */ - public function calculateLauncestonShow(): void + private function calculateLauncestonShow(): void { $date = new DateTime('second saturday of october ' . $this->year, new DateTimeZone($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 893576365..59300888c 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php @@ -50,7 +50,7 @@ public function initialize(): void * * @throws \Exception */ - public function calculateBurnieShow(): void + private function calculateBurnieShow(): void { $date = new DateTime('first saturday of october ' . $this->year, new DateTimeZone($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 6f36f8ab7..43e6460a6 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php @@ -50,7 +50,7 @@ public function initialize(): void * * @throws \Exception */ - public function calculateAGFEST(): void + private function calculateAGFEST(): void { $date = new DateTime('first thursday of may ' . $this->year, new DateTimeZone($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 cbf1977b4..2f93dab9d 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South.php @@ -50,7 +50,7 @@ public function initialize(): void * * @throws \Exception */ - public function calculateHobartShow(): void + private function calculateHobartShow(): void { $date = new DateTime('fourth saturday of october ' . $this->year, new DateTimeZone($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 9f2014159..a457e76f8 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php @@ -51,7 +51,7 @@ public function initialize(): void * * @throws \Exception */ - public function calculateHobartRegatta(): void + private function calculateHobartRegatta(): void { $this->calculateHoliday( 'hobartRegatta', diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index 7c2a87af1..8df350c41 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -56,7 +56,7 @@ public function initialize(): void * * @throws \Exception */ - public function calculateLabourDay(): void + private function calculateLabourDay(): void { $date = new DateTime("second monday of march $this->year", new DateTimeZone($this->timezone)); @@ -68,7 +68,7 @@ public function calculateLabourDay(): void * * @throws \Exception */ - public function calculateMelbourneCupDay(): void + private function calculateMelbourneCupDay(): void { $date = new DateTime('first Tuesday of November' . " $this->year", new DateTimeZone($this->timezone)); @@ -80,7 +80,7 @@ public function calculateMelbourneCupDay(): void * * @throws \Exception */ - public function calculateAFLGrandFinalDay(): void + private function calculateAFLGrandFinalDay(): void { switch ($this->year) { case 2015: @@ -124,7 +124,7 @@ public function calculateAFLGrandFinalDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function calculateQueensBirthday(): void + private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', @@ -156,7 +156,7 @@ public function calculateQueensBirthday(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday + private function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday { return new Holiday( 'easterSaturday', @@ -188,7 +188,7 @@ public function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_ * @throws \InvalidArgumentException * @throws \Exception */ - public function easterSunday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday + private function easterSunday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday { return new Holiday( 'easter', diff --git a/src/Yasumi/Provider/Australia/WA.php b/src/Yasumi/Provider/Australia/WA.php index de7dd89b6..e7454da72 100644 --- a/src/Yasumi/Provider/Australia/WA.php +++ b/src/Yasumi/Provider/Australia/WA.php @@ -52,7 +52,7 @@ public function initialize(): void * * @throws \Exception */ - public function calculateLabourDay(): void + private function calculateLabourDay(): void { $date = new DateTime("first monday of march $this->year", new DateTimeZone($this->timezone)); @@ -67,7 +67,7 @@ public function calculateLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function calculateWesternAustraliaDay(): void + private function calculateWesternAustraliaDay(): void { $this->calculateHoliday( 'westernAustraliaDay', @@ -93,7 +93,7 @@ public function calculateWesternAustraliaDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - public function calculateQueensBirthday(): void + private function calculateQueensBirthday(): void { if ($this->year === 2011) { $this->calculateHoliday( From 13dd203fb9356cfaae58ce8f3bb994f2def38d0e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 23 Jan 2019 09:43:21 +0900 Subject: [PATCH 005/133] Changed visibility of internal class functions to 'private'. These are to be used within the class only and should not be public. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Austria.php | 2 +- src/Yasumi/Provider/CzechRepublic.php | 10 +++++----- src/Yasumi/Provider/Denmark.php | 4 ++-- src/Yasumi/Provider/Finland.php | 4 ++-- src/Yasumi/Provider/France.php | 2 +- src/Yasumi/Provider/Germany.php | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Yasumi/Provider/Austria.php b/src/Yasumi/Provider/Austria.php index aaccc065d..6477d1ebb 100644 --- a/src/Yasumi/Provider/Austria.php +++ b/src/Yasumi/Provider/Austria.php @@ -78,7 +78,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateNationalDay(): void + private function calculateNationalDay(): void { if ($this->year < 1955) { return; diff --git a/src/Yasumi/Provider/CzechRepublic.php b/src/Yasumi/Provider/CzechRepublic.php index 40c489242..dfd85ed13 100644 --- a/src/Yasumi/Provider/CzechRepublic.php +++ b/src/Yasumi/Provider/CzechRepublic.php @@ -80,7 +80,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateSaintsCyrilAndMethodiusDay(): void + private function calculateSaintsCyrilAndMethodiusDay(): void { $this->addHoliday(new Holiday( 'saintsCyrilAndMethodiusDay', @@ -105,7 +105,7 @@ public function calculateSaintsCyrilAndMethodiusDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateJanHusDay(): void + private function calculateJanHusDay(): void { $this->addHoliday(new Holiday( 'janHusDay', @@ -133,7 +133,7 @@ public function calculateJanHusDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateCzechStatehoodDay(): void + private function calculateCzechStatehoodDay(): void { $this->addHoliday(new Holiday( 'czechStateHoodDay', @@ -153,7 +153,7 @@ public function calculateCzechStatehoodDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateIndependentCzechoslovakStateDay(): void + private function calculateIndependentCzechoslovakStateDay(): void { $this->addHoliday(new Holiday('independentCzechoslovakStateDay', [ 'cs_CZ' => 'Den vzniku samostatného československého státu', @@ -171,7 +171,7 @@ public function calculateIndependentCzechoslovakStateDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateStruggleForFreedomAndDemocracyDay(): void + private function calculateStruggleForFreedomAndDemocracyDay(): void { $this->addHoliday(new Holiday( 'struggleForFreedomAndDemocracyDay', diff --git a/src/Yasumi/Provider/Denmark.php b/src/Yasumi/Provider/Denmark.php index c1146fbcc..f2db16260 100644 --- a/src/Yasumi/Provider/Denmark.php +++ b/src/Yasumi/Provider/Denmark.php @@ -88,7 +88,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateGreatPrayerDay(): void + private function calculateGreatPrayerDay(): void { $easter = $this->calculateEaster($this->year, $this->timezone)->format('Y-m-d'); @@ -118,7 +118,7 @@ public function calculateGreatPrayerDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateConstitutionDay(): void + private function calculateConstitutionDay(): void { if ($this->year >= 1849) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Finland.php b/src/Yasumi/Provider/Finland.php index 4ecaa0b84..b58b3d14f 100644 --- a/src/Yasumi/Provider/Finland.php +++ b/src/Yasumi/Provider/Finland.php @@ -82,7 +82,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateStJohnsDay(): void + private function calculateStJohnsDay(): void { $translation = ['fi_FI' => 'Juhannuspäivä']; $shortName = 'stJohnsDay'; @@ -159,7 +159,7 @@ private function calculateAllSaintsDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateIndependenceDay(): void + private 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 ed3603238..adf84e201 100755 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -82,7 +82,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateBastilleDay(): void + private function calculateBastilleDay(): void { if ($this->year >= 1790) { $this->addHoliday(new Holiday('bastilleDay', [ diff --git a/src/Yasumi/Provider/Germany.php b/src/Yasumi/Provider/Germany.php index ce0c0ff23..24fd56bd4 100644 --- a/src/Yasumi/Provider/Germany.php +++ b/src/Yasumi/Provider/Germany.php @@ -79,7 +79,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateGermanUnityDay(): void + private function calculateGermanUnityDay(): void { if ($this->year >= 1990) { $this->addHoliday(new Holiday( From d7b5e9274923bbb9bc3cd989bce350918224f327 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 23 Jan 2019 10:07:22 +0900 Subject: [PATCH 006/133] Changed visibility of internal class functions to 'private'. These are to be used within the class only and should not be public. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Greece.php | 12 ++++++------ src/Yasumi/Provider/Ireland.php | 16 ++++++++-------- src/Yasumi/Provider/Italy.php | 4 ++-- 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 | 12 ++++++------ 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index d0ce2521c..14ec3b972 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -79,7 +79,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateThreeHolyHierarchs(): void + private function calculateThreeHolyHierarchs(): void { $this->addHoliday(new Holiday( 'threeHolyHierarchs', @@ -104,7 +104,7 @@ public function calculateThreeHolyHierarchs(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateCleanMonday(): void + private function calculateCleanMonday(): void { $this->addHoliday(new Holiday( 'cleanMonday', @@ -124,7 +124,7 @@ public function calculateCleanMonday(): void * * @throws \Exception */ - public function calculateEaster($year, $timezone): DateTime + private function calculateEaster($year, $timezone): DateTime { return $this->calculateOrthodoxEaster($year, $timezone); } @@ -142,7 +142,7 @@ public function calculateEaster($year, $timezone): DateTime * @throws \Exception */ - public function calculateIndependenceDay(): void + private function calculateIndependenceDay(): void { if ($this->year >= 1821) { $this->addHoliday(new Holiday( @@ -166,7 +166,7 @@ public function calculateIndependenceDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateOhiDay(): void + private function calculateOhiDay(): void { if ($this->year >= 1940) { $this->addHoliday(new Holiday( @@ -190,7 +190,7 @@ public function calculateOhiDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculatePolytechnio(): void + private 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 739a64e8f..c15f971db 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -91,7 +91,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateNewYearsDay(): void + private function calculateNewYearsDay(): void { if ($this->year < 1974) { return; @@ -124,7 +124,7 @@ public function calculateNewYearsDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculatePentecostMonday(): void + private function calculatePentecostMonday(): void { if ($this->year > 1973) { return; @@ -147,7 +147,7 @@ public function calculatePentecostMonday(): void * @throws \Exception * @throws \Exception */ - public function calculateChristmasDay(): void + private function calculateChristmasDay(): void { $holiday = new Holiday( 'christmasDay', @@ -184,7 +184,7 @@ public function calculateChristmasDay(): void * @throws \Exception * @throws \Exception */ - public function calculateStStephensDay(): void + private function calculateStStephensDay(): void { $holiday = new Holiday( 'stStephensDay', @@ -223,7 +223,7 @@ public function calculateStStephensDay(): void * @throws \Exception * @throws \Exception */ - public function calculateStPatricksDay(): void + private function calculateStPatricksDay(): void { if ($this->year < 1903) { return; @@ -265,7 +265,7 @@ public function calculateStPatricksDay(): void * @throws \Exception * @throws \Exception */ - public function calculateMayDay(): void + private function calculateMayDay(): void { if ($this->year < 1994) { return; @@ -293,7 +293,7 @@ public function calculateMayDay(): void * @throws \Exception * @throws \Exception */ - public function calculateJuneHoliday(): void + private function calculateJuneHoliday(): void { if ($this->year < 1974) { return; @@ -320,7 +320,7 @@ public function calculateJuneHoliday(): void * @throws \Exception * @throws \Exception */ - public function calculateOctoberHoliday(): void + private function calculateOctoberHoliday(): void { if ($this->year < 1977) { return; diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index 537019937..9469f64ba 100755 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -77,7 +77,7 @@ public function initialize(): void * @throws \Exception * @throws \Exception */ - public function calculateLiberationDay(): void + private function calculateLiberationDay(): void { if ($this->year >= 1949) { $this->addHoliday(new Holiday( @@ -105,7 +105,7 @@ public function calculateLiberationDay(): void * @throws \Exception * @throws \Exception */ - public function calculateRepublicDay(): void + private function calculateRepublicDay(): void { if ($this->year >= 1946) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index a70280234..3cfb08228 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -71,7 +71,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateNewYearHolidays(): void + private function calculateNewYearHolidays(): void { $newYearsDay = new DateTime("$this->year-01-01", new DateTimeZone($this->timezone)); $dayAfterNewYearsDay = new DateTime("$this->year-01-02", new DateTimeZone($this->timezone)); @@ -111,7 +111,7 @@ public function calculateNewYearHolidays(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateWaitangiDay(): void + private function calculateWaitangiDay(): void { if ($this->year < 1974) { return; @@ -141,7 +141,7 @@ public function calculateWaitangiDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateAnzacDay(): void + private function calculateAnzacDay(): void { if ($this->year < 1921) { return; @@ -174,7 +174,7 @@ public function calculateAnzacDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateQueensBirthday(): void + private function calculateQueensBirthday(): void { if ($this->year < 1952) { return; @@ -207,7 +207,7 @@ public function calculateQueensBirthday(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateLabourDay(): void + private function calculateLabourDay(): void { if ($this->year < 1900) { return; @@ -236,7 +236,7 @@ public function calculateLabourDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateChristmasHolidays(): void + private function calculateChristmasHolidays(): void { $christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone)); $boxingDay = new DateTime("$this->year-12-26", new DateTimeZone($this->timezone)); diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index 03b42364e..a556746c2 100644 --- a/src/Yasumi/Provider/Norway.php +++ b/src/Yasumi/Provider/Norway.php @@ -78,7 +78,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateConstitutionDay(): void + private 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 4801f45a5..0112286d9 100755 --- a/src/Yasumi/Provider/Poland.php +++ b/src/Yasumi/Provider/Poland.php @@ -77,7 +77,7 @@ public function initialize(): void * @throws \Exception */ - public function calculateIndependenceDay(): void + private function calculateIndependenceDay(): void { if ($this->year < 1918) { return; @@ -105,7 +105,7 @@ public function calculateIndependenceDay(): void * @throws \Exception */ - public function calculateConstitutionDay(): void + private function calculateConstitutionDay(): void { if ($this->year < 1791) { return; diff --git a/src/Yasumi/Provider/Portugal.php b/src/Yasumi/Provider/Portugal.php index 77294a0aa..d722ee208 100644 --- a/src/Yasumi/Provider/Portugal.php +++ b/src/Yasumi/Provider/Portugal.php @@ -81,7 +81,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateCarnationRevolutionDay(): void + private function calculateCarnationRevolutionDay(): void { if ($this->year >= 1974) { $this->addHoliday(new Holiday( @@ -103,7 +103,7 @@ public function calculateCarnationRevolutionDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateCorpusChristi(): void + private function calculateCorpusChristi(): void { if ($this->year <= 2013 || $this->year >= 2016) { $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale)); @@ -128,7 +128,7 @@ public function calculateCorpusChristi(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculatePortugalDay(): void + private function calculatePortugalDay(): void { if ($this->year <= 1932 || $this->year >= 1974) { $this->addHoliday(new Holiday( @@ -160,7 +160,7 @@ public function calculatePortugalDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculatePortugueseRepublicDay(): void + private function calculatePortugueseRepublicDay(): void { if ($this->year >= 1910) { $this->addHoliday(new Holiday( @@ -181,7 +181,7 @@ public function calculatePortugueseRepublicDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateAllSaintsDay(): void + private function calculateAllSaintsDay(): void { if ($this->year <= 2013 || $this->year >= 2016) { $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); @@ -213,7 +213,7 @@ public function calculateAllSaintsDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateRestorationOfIndependenceDay(): void + private 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 <= 2013) || $this->year >= 2016) { diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index 460702433..975626eec 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -84,7 +84,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateDayAfterNewYearsDay(): void + private function calculateDayAfterNewYearsDay(): void { $this->addHoliday(new Holiday('dayAfterNewYearsDay', [ 'en_US' => 'Day after New Year\'s Day', @@ -107,7 +107,7 @@ public function calculateDayAfterNewYearsDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateUnitedPrincipalitiesDay(): void + private function calculateUnitedPrincipalitiesDay(): void { // The law is official since 21.12.2014. if ($this->year > 2014) { @@ -130,7 +130,7 @@ public function calculateUnitedPrincipalitiesDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateStAndrewDay(): void + private function calculateStAndrewDay(): void { if ($this->year >= 2012) { $this->addHoliday(new Holiday('stAndrewDay', [ @@ -156,7 +156,7 @@ public function calculateStAndrewDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateNationalDay(): void + private function calculateNationalDay(): void { $national_day = null; @@ -192,7 +192,7 @@ public function calculateNationalDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateConstantinBrancusiDay(): void + private function calculateConstantinBrancusiDay(): void { if ($this->year >= 2016) { $this->addHoliday(new Holiday( @@ -221,7 +221,7 @@ public function calculateConstantinBrancusiDay(): void * @throws \Exception * @throws \Exception */ - public function calculateChildrensDay(): void + private function calculateChildrensDay(): void { if ($this->year >= 1950 && $this->year <= 2016) { $this->addHoliday(new Holiday( From 22609ce0fa3a643fdeaa237d0834be3fd1538e44 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 23 Jan 2019 10:12:28 +0900 Subject: [PATCH 007/133] Changed visibility of internal class functions to 'private'. These are to be used within the class only and should not be public. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Slovakia.php | 10 +++++----- src/Yasumi/Provider/SouthAfrica.php | 18 +++++++++--------- src/Yasumi/Provider/Spain.php | 4 ++-- src/Yasumi/Provider/Sweden.php | 6 +++--- src/Yasumi/Provider/Switzerland.php | 2 +- src/Yasumi/Provider/Ukraine.php | 14 +++++++------- src/Yasumi/Provider/UnitedKingdom.php | 4 ++-- 7 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index 1d85b7776..76a8bf6d3 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -116,7 +116,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateSaintsCyrilAndMethodiusDay(): void + private function calculateSaintsCyrilAndMethodiusDay(): void { $this->addHoliday(new Holiday( 'saintsCyrilAndMethodiusDay', @@ -141,7 +141,7 @@ public function calculateSaintsCyrilAndMethodiusDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateSlovakNationalUprisingDay(): void + private function calculateSlovakNationalUprisingDay(): void { $this->addHoliday(new Holiday( 'slovakNationalUprisingDay', @@ -165,7 +165,7 @@ public function calculateSlovakNationalUprisingDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateSlovakConstitutionDay(): void + private function calculateSlovakConstitutionDay(): void { $this->addHoliday(new Holiday( 'slovakConstitutionDay', @@ -193,7 +193,7 @@ public function calculateSlovakConstitutionDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateOurLadyOfSorrowsDay(): void + private function calculateOurLadyOfSorrowsDay(): void { $this->addHoliday(new Holiday('ourLadyOfSorrowsDay', [ 'sk_SK' => 'Sviatok Sedembolestnej Panny Márie', @@ -211,7 +211,7 @@ public function calculateOurLadyOfSorrowsDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateStruggleForFreedomAndDemocracyDay(): void + private function calculateStruggleForFreedomAndDemocracyDay(): void { $this->addHoliday(new Holiday( 'struggleForFreedomAndDemocracyDay', diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index 0be7ab47d..430033f47 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -92,7 +92,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateHumanRightsDay(): void + private function calculateHumanRightsDay(): void { $this->addHoliday(new Holiday( 'humanRightsDay', @@ -114,7 +114,7 @@ public function calculateHumanRightsDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateFamilyDay(): void + private function calculateFamilyDay(): void { $this->addHoliday(new Holiday( 'familyDay', @@ -137,7 +137,7 @@ public function calculateFamilyDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateFreedomDay(): void + private function calculateFreedomDay(): void { $this->addHoliday(new Holiday( 'freedomDay', @@ -164,7 +164,7 @@ public function calculateFreedomDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateYouthDay(): void + private function calculateYouthDay(): void { $this->addHoliday(new Holiday( 'youthDay', @@ -187,7 +187,7 @@ public function calculateYouthDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculate2016MunicipalElectionsDay(): void + private function calculate2016MunicipalElectionsDay(): void { if ($this->year !== 2016) { return; @@ -216,7 +216,7 @@ public function calculate2016MunicipalElectionsDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateNationalWomensDay(): void + private function calculateNationalWomensDay(): void { $this->addHoliday(new Holiday( 'nationalWomensDay', @@ -241,7 +241,7 @@ public function calculateNationalWomensDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateHeritageDay(): void + private function calculateHeritageDay(): void { $this->addHoliday(new Holiday( 'heritageDay', @@ -268,7 +268,7 @@ public function calculateHeritageDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateDayOfReconciliation(): void + private function calculateDayOfReconciliation(): void { $this->addHoliday(new Holiday( 'reconciliationDay', @@ -294,7 +294,7 @@ public function calculateDayOfReconciliation(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateSubstituteDayOfGoodwill(): void + private function calculateSubstituteDayOfGoodwill(): void { if ($this->year !== 2016) { return; diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index 27154b754..995b35f89 100755 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -76,7 +76,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateNationalDay(): void + private function calculateNationalDay(): void { if ($this->year >= 1981) { $this->addHoliday(new Holiday( @@ -102,7 +102,7 @@ public function calculateNationalDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateConstitutionDay(): void + private function calculateConstitutionDay(): void { if ($this->year >= 1978) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index f8a6a1401..9af61bf66 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -82,7 +82,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateStJohnsDay(): void + private function calculateStJohnsDay(): void { $date = new DateTime("$this->year-6-20", new DateTimeZone($this->timezone)); // Default date @@ -118,7 +118,7 @@ public function calculateStJohnsDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateAllSaintsDay(): void + private function calculateAllSaintsDay(): void { $date = new DateTime("$this->year-10-31", new DateTimeZone($this->timezone)); @@ -147,7 +147,7 @@ public function calculateAllSaintsDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateNationalDay(): void + private function calculateNationalDay(): void { if ($this->year < 1916) { return; diff --git a/src/Yasumi/Provider/Switzerland.php b/src/Yasumi/Provider/Switzerland.php index ba43389c1..cf15ce923 100644 --- a/src/Yasumi/Provider/Switzerland.php +++ b/src/Yasumi/Provider/Switzerland.php @@ -60,7 +60,7 @@ public function initialize(): void * @throws \Exception * @throws \Exception */ - public function calculateNationalDay(): void + private function calculateNationalDay(): void { $translations = [ 'en_US' => 'National Day', diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 22608a876..d4e59acf0 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -70,7 +70,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateChristmasDay(): void + private function calculateChristmasDay(): void { $this->addHoliday(new Holiday( 'christmasDay', @@ -93,7 +93,7 @@ public function calculateChristmasDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateInternationalWomensDay(): void + private function calculateInternationalWomensDay(): void { $this->addHoliday(new Holiday( 'internationalWomensDay', @@ -113,7 +113,7 @@ public function calculateInternationalWomensDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateSecondInternationalWorkersDay(): void + private function calculateSecondInternationalWorkersDay(): void { $this->addHoliday(new Holiday('secondInternationalWorkersDay', [ 'uk_UA' => 'День міжнародної солідарності трудящих', @@ -137,7 +137,7 @@ public function calculateSecondInternationalWorkersDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateVictoryDay(): void + private function calculateVictoryDay(): void { $this->addHoliday(new Holiday( 'victoryDay', @@ -159,7 +159,7 @@ public function calculateVictoryDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateConstitutionDay(): void + private function calculateConstitutionDay(): void { if ($this->year < 1996) { return; @@ -187,7 +187,7 @@ public function calculateConstitutionDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateIndependenceDay(): void + private function calculateIndependenceDay(): void { if ($this->year < 1991) { return; @@ -216,7 +216,7 @@ public function calculateIndependenceDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateDefenderOfUkraineDay(): void + private function calculateDefenderOfUkraineDay(): void { if ($this->year < 2015) { return; diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 68aea9c30..e314ecb89 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -72,7 +72,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateNewYearsDay(): void + private function calculateNewYearsDay(): void { // Before 1871 it was not an observed or statutory holiday if ($this->year < 1871) { @@ -213,7 +213,7 @@ private function calculateSummerBankHoliday(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateChristmasHolidays(): void + private function calculateChristmasHolidays(): void { $christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone)); $boxingDay = new DateTime("$this->year-12-26", new DateTimeZone($this->timezone)); From 326e8ecfd5a7162d0a999ebfbe2f86368cc56e08 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Wed, 23 Jan 2019 10:18:47 +0900 Subject: [PATCH 008/133] Changed visibility of internal class functions to 'private'. These are to be used within the class only and should not be public. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Germany/Saxony.php | 2 +- 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 +- src/Yasumi/Provider/Spain/CastillaLaMancha.php | 2 +- src/Yasumi/Provider/Spain/Catalonia.php | 2 +- src/Yasumi/Provider/Spain/Ceuta.php | 2 +- src/Yasumi/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 +- src/Yasumi/Provider/Spain/ValencianCommunity.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 | 2 +- src/Yasumi/Provider/Switzerland/Obwalden.php | 2 +- src/Yasumi/Provider/Switzerland/Ticino.php | 2 +- 23 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/Yasumi/Provider/Germany/Saxony.php b/src/Yasumi/Provider/Germany/Saxony.php index 8f06ba753..309d1dc4d 100755 --- a/src/Yasumi/Provider/Germany/Saxony.php +++ b/src/Yasumi/Provider/Germany/Saxony.php @@ -85,7 +85,7 @@ private function calculateReformationDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateRepentanceAndPrayerDay(): void + private function calculateRepentanceAndPrayerDay(): void { if ($this->year >= 1995) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/Andalusia.php b/src/Yasumi/Provider/Spain/Andalusia.php index 393d06d95..05dc8e7cf 100755 --- a/src/Yasumi/Provider/Spain/Andalusia.php +++ b/src/Yasumi/Provider/Spain/Andalusia.php @@ -71,7 +71,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateAndalusiaDay(): void + private 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 51d93e1ec..0ca453912 100755 --- a/src/Yasumi/Provider/Spain/Asturias.php +++ b/src/Yasumi/Provider/Spain/Asturias.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateAsturiasDay(): void + private 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 24c2d491b..8b3d6cc8b 100755 --- a/src/Yasumi/Provider/Spain/BalearicIslands.php +++ b/src/Yasumi/Provider/Spain/BalearicIslands.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateBalearicIslandsDay(): void + private 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 0ab4d9e36..cce2f5491 100755 --- a/src/Yasumi/Provider/Spain/BasqueCountry.php +++ b/src/Yasumi/Provider/Spain/BasqueCountry.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateBasqueCountryDay(): void + private function calculateBasqueCountryDay(): void { if ($this->year >= 2011 && $this->year <= 2013) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Spain/CanaryIslands.php b/src/Yasumi/Provider/Spain/CanaryIslands.php index 78b237648..1787a08c1 100755 --- a/src/Yasumi/Provider/Spain/CanaryIslands.php +++ b/src/Yasumi/Provider/Spain/CanaryIslands.php @@ -72,7 +72,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateCanaryIslandsDay(): void + private 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 c58b5ff82..c28104b2d 100755 --- a/src/Yasumi/Provider/Spain/Cantabria.php +++ b/src/Yasumi/Provider/Spain/Cantabria.php @@ -76,7 +76,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateCantabriaDay(): void + private 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 4f1126acb..028924726 100755 --- a/src/Yasumi/Provider/Spain/CastileAndLeon.php +++ b/src/Yasumi/Provider/Spain/CastileAndLeon.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateCastileAndLeonDay(): void + private 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 bca90b1de..7f97419ab 100755 --- a/src/Yasumi/Provider/Spain/CastillaLaMancha.php +++ b/src/Yasumi/Provider/Spain/CastillaLaMancha.php @@ -76,7 +76,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateCastillaLaManchaDay(): void + private 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 d0c4d1bb3..69552d85c 100755 --- a/src/Yasumi/Provider/Spain/Catalonia.php +++ b/src/Yasumi/Provider/Spain/Catalonia.php @@ -76,7 +76,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateNationalDayOfCatalonia(): void + private 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 a2d99f594..be615ceb9 100755 --- a/src/Yasumi/Provider/Spain/Ceuta.php +++ b/src/Yasumi/Provider/Spain/Ceuta.php @@ -70,7 +70,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateDayOfCeuta(): void + private 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 ffae26b49..b10c6dc9b 100755 --- a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php +++ b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php @@ -77,7 +77,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateDosdeMayoUprisingDay(): void + private 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 2a47a2405..93beb95fe 100755 --- a/src/Yasumi/Provider/Spain/Extremadura.php +++ b/src/Yasumi/Provider/Spain/Extremadura.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateDayOfExtremadura(): void + private 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 383a47695..5bb1254ff 100755 --- a/src/Yasumi/Provider/Spain/Galicia.php +++ b/src/Yasumi/Provider/Spain/Galicia.php @@ -74,7 +74,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateGalicianLiteratureDay(): void + private function calculateGalicianLiteratureDay(): void { if ($this->year >= 1991) { $this->addHoliday(new Holiday('galicianLiteratureDay', [ @@ -102,7 +102,7 @@ public function calculateGalicianLiteratureDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateStJamesDay(): void + private 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 36bd6e973..6e84bdb56 100755 --- a/src/Yasumi/Provider/Spain/LaRioja.php +++ b/src/Yasumi/Provider/Spain/LaRioja.php @@ -70,7 +70,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateLaRiojaDay(): void + private 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 2962015d9..38b7f4c10 100755 --- a/src/Yasumi/Provider/Spain/RegionOfMurcia.php +++ b/src/Yasumi/Provider/Spain/RegionOfMurcia.php @@ -71,7 +71,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateDayOfMurcia(): void + private 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 c5a0b1582..35bacf0ed 100755 --- a/src/Yasumi/Provider/Spain/ValencianCommunity.php +++ b/src/Yasumi/Provider/Spain/ValencianCommunity.php @@ -78,7 +78,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateValencianCommunityDay(): void + private function calculateValencianCommunityDay(): void { if ($this->year >= 1239) { $this->addHoliday(new Holiday('valencianCommunityDay', [ diff --git a/src/Yasumi/Provider/Switzerland/Geneva.php b/src/Yasumi/Provider/Switzerland/Geneva.php index eb0d600bc..649df8db7 100644 --- a/src/Yasumi/Provider/Switzerland/Geneva.php +++ b/src/Yasumi/Provider/Switzerland/Geneva.php @@ -70,7 +70,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateJeuneGenevois(): void + private function calculateJeuneGenevois(): void { // Find first Sunday of September $date = new DateTime('First Sunday of ' . $this->year . '-09', new DateTimeZone($this->timezone)); @@ -105,7 +105,7 @@ public function calculateJeuneGenevois(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateRestaurationGenevoise(): void + private 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 57ca3f79b..34b88626f 100644 --- a/src/Yasumi/Provider/Switzerland/Glarus.php +++ b/src/Yasumi/Provider/Switzerland/Glarus.php @@ -72,7 +72,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateNafelserFahrt(): void + private function calculateNafelserFahrt(): void { if ($this->year >= 1389) { $date = new DateTime('First Thursday of ' . $this->year . '-04', new DateTimeZone($this->timezone)); diff --git a/src/Yasumi/Provider/Switzerland/Jura.php b/src/Yasumi/Provider/Switzerland/Jura.php index ed2cf2975..bbc1df93c 100644 --- a/src/Yasumi/Provider/Switzerland/Jura.php +++ b/src/Yasumi/Provider/Switzerland/Jura.php @@ -75,7 +75,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculatePlebisciteJurassien(): void + private 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 51e0fd2d8..4bfe307f4 100644 --- a/src/Yasumi/Provider/Switzerland/Neuchatel.php +++ b/src/Yasumi/Provider/Switzerland/Neuchatel.php @@ -73,7 +73,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateInstaurationRepublique(): void + private function calculateInstaurationRepublique(): void { if ($this->year > 1848) { $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/Switzerland/Obwalden.php b/src/Yasumi/Provider/Switzerland/Obwalden.php index b6c4423e8..796a0b85b 100644 --- a/src/Yasumi/Provider/Switzerland/Obwalden.php +++ b/src/Yasumi/Provider/Switzerland/Obwalden.php @@ -77,7 +77,7 @@ public function initialize(): void * @throws \Exception * @throws \Exception */ - public function calculateBruderKlausenFest(): void + private 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 ea4ab8650..5c4024988 100644 --- a/src/Yasumi/Provider/Switzerland/Ticino.php +++ b/src/Yasumi/Provider/Switzerland/Ticino.php @@ -82,7 +82,7 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - public function calculateStPeterPaul(): void + private function calculateStPeterPaul(): void { $this->addHoliday(new Holiday( 'stPeterPaul', From 1ab84bf864db5e384cd3cc1657f0d78ef50432d4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 11 Feb 2019 11:31:11 +0900 Subject: [PATCH 009/133] Fixed deprecation warning. Composer 2.0 requires package names to not contain any upper case characters. Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 29538c08c..4861c571d 100755 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^2.14", "fzaninotto/faker": "~1.8", - "mikey179/vfsStream": "~1.6", + "mikey179/vfsstream": "~1.6", "phpunit/phpunit": "~7.5" }, "autoload": { From ebead790476750c57ef9fc1aa121d36cd1e0182c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 11 Feb 2019 11:37:43 +0900 Subject: [PATCH 010/133] Formatting fixes. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Brazil.php | 20 ++++++++++---------- src/Yasumi/Yasumi.php | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index 278e3f973..40d2a4de9 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -66,20 +66,20 @@ public function initialize(): void $carnavalMonday = clone $easter; $this->addHoliday(new Holiday( - 'carnavalMonday', - ['pt_BR' => 'Segunda-feira de Carnaval'], - $carnavalMonday->sub(new DateInterval('P48D')), - $this->locale, - Holiday::TYPE_OBSERVANCE + 'carnavalMonday', + ['pt_BR' => 'Segunda-feira de Carnaval'], + $carnavalMonday->sub(new DateInterval('P48D')), + $this->locale, + Holiday::TYPE_OBSERVANCE )); $carnavalTuesday = clone $easter; $this->addHoliday(new Holiday( - 'carnavalTuesday', - ['pt_BR' => 'Terça-feira de Carnaval'], - $carnavalTuesday->sub(new DateInterval('P47D')), - $this->locale, - Holiday::TYPE_OBSERVANCE + 'carnavalTuesday', + ['pt_BR' => 'Terça-feira de Carnaval'], + $carnavalTuesday->sub(new DateInterval('P47D')), + $this->locale, + Holiday::TYPE_OBSERVANCE )); } diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index a9f9b9955..fbc1a833c 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -229,7 +229,7 @@ public static function getProviders(): array foreach ($filesIterator as $file) { if ($file->isDir() || $file->getExtension() !== 'php' || \in_array( $file->getBasename('.php'), - self::$ignoredProvider, + self::$ignoredProvider, true )) { continue; From bf2471565ce9d096199fbfffac9fcff46cfa84d4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 11 Feb 2019 12:18:16 +0900 Subject: [PATCH 011/133] Adjusted tests for the 'next' and 'previous' methods to avoid actually exceeding the year boundaries. Signed-off-by: Sacha Telgenhof --- tests/Base/YasumiTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index 09ca624d3..90aed8147 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -172,14 +172,14 @@ public function testNext(): void { $country = 'Japan'; $name = 'childrensDay'; - $year = Factory::create()->numberBetween(1949, self::YEAR_UPPER_BOUND); + $year = Factory::create()->numberBetween(1949, self::YEAR_UPPER_BOUND - 1); $holidays = Yasumi::create($country, $year); $this->assertHoliday( $country, $name, - (($year < self::YEAR_UPPER_BOUND) ? $year + 1 : self::YEAR_UPPER_BOUND), + $year + 1, $holidays->next($name) ); } @@ -194,7 +194,7 @@ public function testNextWithBlankName(): void { $holidays = Yasumi::create( 'Netherlands', - Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND) + Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND - 1) ); $holidays->next(null); } @@ -231,7 +231,7 @@ public function testPreviousWithBlankName(): void { $holidays = Yasumi::create( 'Netherlands', - Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND) + Factory::create()->numberBetween(self::YEAR_LOWER_BOUND + 1, self::YEAR_UPPER_BOUND) ); $holidays->previous(null); } From 1a88c0b2cf30b069ac2383421cd9379f386e4848 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Sun, 17 Feb 2019 13:02:40 +0100 Subject: [PATCH 012/133] Do not capitalize paasdag/pinksterdag/kerstdag (#128) Dutch holidays are written in lowercase in case of a compound word with reference to that holiday. --- CHANGELOG.md | 1 + src/Yasumi/data/translations/easter.php | 4 ++-- src/Yasumi/data/translations/easterMonday.php | 2 +- src/Yasumi/data/translations/pentecost.php | 4 ++-- src/Yasumi/data/translations/pentecostMonday.php | 2 +- src/Yasumi/data/translations/secondChristmasDay.php | 4 ++-- tests/Base/TranslationsTest.php | 2 +- tests/Belgium/EasterTest.php | 2 +- tests/Belgium/PentecostTest.php | 2 +- tests/Netherlands/EasterMondayTest.php | 2 +- tests/Netherlands/EasterTest.php | 2 +- tests/Netherlands/PentecostTest.php | 2 +- tests/Netherlands/pentecostMondayTest.php | 2 +- tests/Netherlands/secondChristmasdayTest.php | 2 +- 14 files changed, 17 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24ebb2705..32b3af0f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ### Added ### Changed +- Changed Dutch spelling for Easter/Pentecost/Christmas. [\#128](https://github.com/azuyalabs/yasumi/issues/128) ([c960657](https://github.com/c960657)) ### Fixed diff --git a/src/Yasumi/data/translations/easter.php b/src/Yasumi/data/translations/easter.php index 1c1ba739a..d9fc59fc1 100644 --- a/src/Yasumi/data/translations/easter.php +++ b/src/Yasumi/data/translations/easter.php @@ -33,8 +33,8 @@ 'lt_LT' => 'Velykos', 'lv_LV' => 'Lieldienas', 'nb_NO' => 'Første påskedag', - 'nl_BE' => 'Eerste Paasdag', - 'nl_NL' => 'Eerste Paasdag', + 'nl_BE' => 'Eerste paasdag', + 'nl_NL' => 'Eerste paasdag', 'pl_PL' => 'Wielkanoc', 'pt_BR' => 'Páscoa', 'pt_PT' => 'Páscoa', diff --git a/src/Yasumi/data/translations/easterMonday.php b/src/Yasumi/data/translations/easterMonday.php index 45cf0e624..6c2d6a2b5 100644 --- a/src/Yasumi/data/translations/easterMonday.php +++ b/src/Yasumi/data/translations/easterMonday.php @@ -38,7 +38,7 @@ 'lv_LV' => 'Otrās Lieldienas', 'nb_NO' => 'Andre påskedag', 'nl_BE' => 'Paasmaandag', - 'nl_NL' => 'Tweede Paasdag', + 'nl_NL' => 'Tweede paasdag', 'pl_PL' => 'Poniedziałek Wielkanocny', 'ro_RO' => 'A doua zi de Paște', 'sk_SK' => 'Veľkonočný pondelok', diff --git a/src/Yasumi/data/translations/pentecost.php b/src/Yasumi/data/translations/pentecost.php index 630db0ed4..2f81476c8 100755 --- a/src/Yasumi/data/translations/pentecost.php +++ b/src/Yasumi/data/translations/pentecost.php @@ -27,8 +27,8 @@ 'hu_HU' => 'Pünkösd', 'it_CH' => 'Pentecoste', 'nb_NO' => 'Første pinsedag', - 'nl_BE' => 'Eerste Pinksterdag', - 'nl_NL' => 'Eerste Pinksterdag', + 'nl_BE' => 'Eerste pinksterdag', + 'nl_NL' => 'Eerste pinksterdag', 'pl_PL' => 'Zielone Świątki', 'ro_RO' => 'Rusaliile', 'ru_UA' => 'Троица', diff --git a/src/Yasumi/data/translations/pentecostMonday.php b/src/Yasumi/data/translations/pentecostMonday.php index 1390391db..7f00ab9d2 100755 --- a/src/Yasumi/data/translations/pentecostMonday.php +++ b/src/Yasumi/data/translations/pentecostMonday.php @@ -27,6 +27,6 @@ 'it_CH' => 'Lunedi di Pentecoste', 'nb_NO' => 'Andre pinsedag', 'nl_BE' => 'Pinkstermaandag', - 'nl_NL' => 'Tweede Pinksterdag', + 'nl_NL' => 'Tweede pinksterdag', 'ro_RO' => 'A doua zi de Rusalii', ]; diff --git a/src/Yasumi/data/translations/secondChristmasDay.php b/src/Yasumi/data/translations/secondChristmasDay.php index d7c9af1b3..8dc5764b8 100755 --- a/src/Yasumi/data/translations/secondChristmasDay.php +++ b/src/Yasumi/data/translations/secondChristmasDay.php @@ -28,8 +28,8 @@ 'lt_LT' => 'Kalėdos (antra diena)', 'lv_LV' => 'Otrie Ziemassvētki', 'nb_NO' => 'Andre juledag', - 'nl_BE' => 'Tweede Kerstdag', - 'nl_NL' => 'Tweede Kerstdag', + 'nl_BE' => 'Tweede kerstdag', + 'nl_NL' => 'Tweede kerstdag', 'pl_PL' => 'drugi dzień Bożego Narodzenia', 'ro_RO' => 'A doua zi de Crăciun', 'sk_SK' => 'Druhý sviatok vianočný', diff --git a/tests/Base/TranslationsTest.php b/tests/Base/TranslationsTest.php index e5b3cc7ca..b7559fa08 100644 --- a/tests/Base/TranslationsTest.php +++ b/tests/Base/TranslationsTest.php @@ -78,7 +78,7 @@ public function testAddMultipleTranslations(): void $secondLocale = 'nl_NL'; $secondShortName = 'easter'; - $secondTranslation = 'Eerste Paasdag'; + $secondTranslation = 'Eerste paasdag'; $translations->addTranslation($secondShortName, $secondLocale, $secondTranslation); diff --git a/tests/Belgium/EasterTest.php b/tests/Belgium/EasterTest.php index ab53a22ab..c4dbf9b84 100644 --- a/tests/Belgium/EasterTest.php +++ b/tests/Belgium/EasterTest.php @@ -53,7 +53,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Eerste Paasdag'] + [self::LOCALE => 'Eerste paasdag'] ); } diff --git a/tests/Belgium/PentecostTest.php b/tests/Belgium/PentecostTest.php index aa551f897..440752067 100644 --- a/tests/Belgium/PentecostTest.php +++ b/tests/Belgium/PentecostTest.php @@ -53,7 +53,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Eerste Pinksterdag'] + [self::LOCALE => 'Eerste pinksterdag'] ); } diff --git a/tests/Netherlands/EasterMondayTest.php b/tests/Netherlands/EasterMondayTest.php index d12746fc8..9f018dd85 100644 --- a/tests/Netherlands/EasterMondayTest.php +++ b/tests/Netherlands/EasterMondayTest.php @@ -53,7 +53,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Tweede Paasdag'] + [self::LOCALE => 'Tweede paasdag'] ); } diff --git a/tests/Netherlands/EasterTest.php b/tests/Netherlands/EasterTest.php index 32c9d1a37..9c612ff05 100644 --- a/tests/Netherlands/EasterTest.php +++ b/tests/Netherlands/EasterTest.php @@ -53,7 +53,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Eerste Paasdag'] + [self::LOCALE => 'Eerste paasdag'] ); } diff --git a/tests/Netherlands/PentecostTest.php b/tests/Netherlands/PentecostTest.php index aa8d08517..b0eec6e8e 100644 --- a/tests/Netherlands/PentecostTest.php +++ b/tests/Netherlands/PentecostTest.php @@ -53,7 +53,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Eerste Pinksterdag'] + [self::LOCALE => 'Eerste pinksterdag'] ); } diff --git a/tests/Netherlands/pentecostMondayTest.php b/tests/Netherlands/pentecostMondayTest.php index 8d3bd7797..8a1e10fb8 100644 --- a/tests/Netherlands/pentecostMondayTest.php +++ b/tests/Netherlands/pentecostMondayTest.php @@ -53,7 +53,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Tweede Pinksterdag'] + [self::LOCALE => 'Tweede pinksterdag'] ); } diff --git a/tests/Netherlands/secondChristmasdayTest.php b/tests/Netherlands/secondChristmasdayTest.php index 4371d8a18..bbcbaee8a 100644 --- a/tests/Netherlands/secondChristmasdayTest.php +++ b/tests/Netherlands/secondChristmasdayTest.php @@ -62,7 +62,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Tweede Kerstdag'] + [self::LOCALE => 'Tweede kerstdag'] ); } From 1820b5601723e6fd244d1b9bbe2c87d9c7d1d40c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 24 Feb 2019 14:13:54 +0900 Subject: [PATCH 013/133] Update README.md with contribution section. --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 0e34142c5..6e74e50c3 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,14 @@ Blog ---- Checkout the [blog](https://azuyalabs.github.io/yasumi/blog/) section on documentation site regularly for latest updates. Keeping you informed about any news, releases, etc. in a handy blog post format! +## Contributing + +Contributions are encouraged and welcome; I am always happy to get feedback or pull requests on Github :) Create [Github Issues](https://github.com/azuyalabs/yasumi/issues) for bugs and new features and comment on the ones you are interested in. + +If you enjoy what I am making, an extra cup of coffee is very much appreciated :). Your support helps me to put more time into Open-Source Software projects like this. + +Buy Me A Coffee + License ------- From 575b95d8076ee05dcfe89b0fec11d8bde891e520 Mon Sep 17 00:00:00 2001 From: jagers Date: Wed, 6 Mar 2019 15:35:54 -0800 Subject: [PATCH 014/133] Consider all USA holidays for substitutions This PR changes the USA Provider to check all holidays for potential substitute holidays, not just New Year's Day, Independence Day, and Christmas Day. --- src/Yasumi/Provider/USA.php | 40 ++++++++++++++--------------------- tests/USA/VeteransDayTest.php | 32 ++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 24 deletions(-) diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 5d353a5d6..7b0682a96 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -270,33 +270,25 @@ private function calculateSubstituteHolidays(): void // Loop through all defined holidays while ($datesIterator->valid()) { + // Substitute holiday is on a Monday in case the holiday falls on a Sunday + if (0 === (int)$datesIterator->current()->format('w')) { + $substituteHoliday = clone $datesIterator->current(); + $substituteHoliday->add(new DateInterval('P1D')); + } - // Only process New Year's Day, Independence Day, or Christmas Day - if (\in_array( - $datesIterator->current()->shortName, - ['newYearsDay', 'independenceDay', 'christmasDay'], - true - )) { - - // Substitute holiday is on a Monday in case the holiday falls on a Sunday - if (0 === (int)$datesIterator->current()->format('w')) { - $substituteHoliday = clone $datesIterator->current(); - $substituteHoliday->add(new DateInterval('P1D')); - } - - // Substitute holiday is on a Friday in case the holiday falls on a Saturday - if (6 === (int)$datesIterator->current()->format('w')) { - $substituteHoliday = clone $datesIterator->current(); - $substituteHoliday->sub(new DateInterval('P1D')); - } + // Substitute holiday is on a Friday in case the holiday falls on a Saturday + if (6 === (int)$datesIterator->current()->format('w')) { + $substituteHoliday = clone $datesIterator->current(); + $substituteHoliday->sub(new DateInterval('P1D')); + } - // Add substitute holiday - if (null !== $substituteHoliday) { - $this->addHoliday(new Holiday('substituteHoliday:' . $substituteHoliday->shortName, [ - 'en_US' => $substituteHoliday->getName() . ' observed', - ], $substituteHoliday, $this->locale)); - } + // Add substitute holiday + if (null !== $substituteHoliday) { + $this->addHoliday(new Holiday('substituteHoliday:' . $substituteHoliday->shortName, [ + 'en_US' => $substituteHoliday->getName() . ' observed', + ], $substituteHoliday, $this->locale)); } + $datesIterator->next(); } } diff --git a/tests/USA/VeteransDayTest.php b/tests/USA/VeteransDayTest.php index 0f8dcac34..fda3edb72 100644 --- a/tests/USA/VeteransDayTest.php +++ b/tests/USA/VeteransDayTest.php @@ -49,6 +49,38 @@ public function testVeteransDayOnAfter1919() ); } + /** + * Tests Veterans Day on or after 1919 when substituted on Monday (when Veterans Day falls on Sunday) + * @throws \Exception + * @throws \ReflectionException + */ + public function testVeteransDayOnAfter1919SubstitutedMonday() + { + $year = 2018; + $this->assertHoliday( + self::REGION, + 'substituteHoliday:veteransDay', + $year, + new DateTime("$year-11-12", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests Veterans Day on or after 1919 when substituted on Friday (when Veterans Day falls on Saturday) + * @throws \Exception + * @throws \ReflectionException + */ + public function testVeteransDayOnAfter1919SubstitutedFriday() + { + $year = 2017; + $this->assertHoliday( + self::REGION, + 'substituteHoliday:veteransDay', + $year, + new DateTime("$year-11-10", new DateTimeZone(self::TIMEZONE)) + ); + } + /** * Tests Veterans Day before 1919. Veterans Day was established in 1919 on November 11. * @throws \ReflectionException From 117e7fc78e13e53c830a5dbb9ee393b93025be93 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 7 Mar 2019 08:53:03 +0900 Subject: [PATCH 015/133] Updated the CHANGELOG to reflect the latest (unreleased) changes. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32b3af0f6..f1d81eff0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,13 +6,22 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ## [Unreleased] ### Added +- Added International Women's Day as official holidy since 2019 in Berlin (Germany). [#133](https://github.com/azuyalabs/yasumi/pull/133) ([huehnerhose](https://github.com/huehnerhose)) ### Changed - Changed Dutch spelling for Easter/Pentecost/Christmas. [\#128](https://github.com/azuyalabs/yasumi/issues/128) ([c960657](https://github.com/c960657)) +- Refactored the Netherlands Holiday provider by moving the calculation of individual holidays to private methods. This will reduce the complexity of the initialize method. +- Changed visibility of internal class functions to 'private'. These are to be used within the class only and should not be public. ### Fixed +- Changed the USA Provider to check all holidays for potential substitute holidays, not just New Year's Day, Independence Day, and Christmas Day. [\#140](https://github.com/azuyalabs/yasumi/pull/140) ([jagers](https://github.com/jagers)) +- Adjusted tests for the 'next' and 'previous' methods to avoid actually exceeding the year boundaries. +- Fixed deprecation warning for the package mikey179/vfStream. Composer 2.0 requires package names to not contain any upper case characters. [\#135](https://github.com/azuyalabs/yasumi/pull/135) ([IceShack](https://github.com/IceShack)) +- Fix comment about weekend in India [\#126](https://github.com/azuyalabs/yasumi/pull/126) ([c960657](https://github.com/c960657)) ### Removed +- Removed duplicate definition of newYearsDay [\#125](https://github.com/azuyalabs/yasumi/pull/125) ([c960657](https://github.com/c960657)) + ## [2.0.0] - 2019-01-11 @@ -25,7 +34,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Added Reformation Day as offical holiday since 2018 in Schleswig-Holstein (Germany). [#106](https://github.com/azuyalabs/yasumi/pull/106) ([HenningCash](https://github.com/HenningCash)) - Added Reformation Day as offical holiday since 2018 in Hamburg (Germany). [#108](https://github.com/azuyalabs/yasumi/pull/108) ([HenningCash](https://github.com/HenningCash)) - Added Reformation Day as offical holiday since 2018 in Bremen (Germany). [#116](https://github.com/azuyalabs/yasumi/issues/116) ([TalonTR](https://github.com/TalonTR)) -- Added International Women's Day as official holidy since 2019 in Berlin (Germany). [#133](https://github.com/azuyalabs/yasumi/pull/133) ([huehnerhose](https://github.com/huehnerhose)) - The (observed) holidays Lukkeloven, Constitution Day, New Year's Eve and Labour Day, as well as summertime and wintertime are included for Denmark [\#104](https://github.com/azuyalabs/yasumi/pull/104) ([c960657](https://github.com/c960657)) ### Changed From 3294616dfd2c2ca7ffeb3c44e20c9e6dcb352b3e Mon Sep 17 00:00:00 2001 From: "Yoshihisa.Hamada" Date: Thu, 7 Mar 2019 08:55:57 +0900 Subject: [PATCH 016/133] Japanese Health And Sports Day will be renamed to Sports Day from 2020. (#129) --- src/Yasumi/Provider/Japan.php | 13 +++++--- tests/Japan/JapanTest.php | 2 +- ...AndSportsDayTest.php => SportsDayTest.php} | 33 ++++++++++++++----- 3 files changed, 35 insertions(+), 13 deletions(-) rename tests/Japan/{HealthAndSportsDayTest.php => SportsDayTest.php} (79%) diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index d8345bde9..41043d849 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -102,7 +102,7 @@ public function initialize(): void $this->calculateMarineDay(); $this->calculateMountainDay(); $this->calculateRespectForTheAgeDay(); - $this->calculateHealthAndSportsDay(); + $this->calculateSportsDay(); $this->calculateAutumnalEquinoxDay(); $this->calculateSubstituteHolidays(); $this->calculateBridgeHolidays(); @@ -432,7 +432,7 @@ private function calculateRespectForTheAgeDay(): void * @throws \Exception * @throws \Exception */ - private function calculateHealthAndSportsDay(): void + private function calculateSportsDay(): void { $date = null; if ($this->year === 2020) { @@ -443,10 +443,15 @@ private function calculateHealthAndSportsDay(): void $date = new DateTime("$this->year-10-10", new DateTimeZone($this->timezone)); } + $holiday_name =['en_US' => 'Health And Sports Day', 'ja_JP' => '体育の日']; + if ($this->year >= 2020) { + $holiday_name =['en_US' => 'Sports Day', 'ja_JP' => 'スポーツの日']; + } + if (null !== $date) { $this->addHoliday(new Holiday( - 'healthandSportsDay', - ['en_US' => 'Health And Sports Day', 'ja_JP' => '体育の日'], + 'sportsDay', + $holiday_name, $date, $this->locale )); diff --git a/tests/Japan/JapanTest.php b/tests/Japan/JapanTest.php index b69b815f0..ee36ec04f 100644 --- a/tests/Japan/JapanTest.php +++ b/tests/Japan/JapanTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'mountainDay', 'respectfortheAgedDay', 'autumnalEquinoxDay', - 'healthandSportsDay', + 'sportsDay', 'cultureDay', 'laborThanksgivingDay', 'emperorsBirthday', diff --git a/tests/Japan/HealthAndSportsDayTest.php b/tests/Japan/SportsDayTest.php similarity index 79% rename from tests/Japan/HealthAndSportsDayTest.php rename to tests/Japan/SportsDayTest.php index f51521afa..a948842c8 100644 --- a/tests/Japan/HealthAndSportsDayTest.php +++ b/tests/Japan/SportsDayTest.php @@ -20,12 +20,12 @@ /** * Class for testing Health And Sports Day in Japan. */ -class HealthAndSportsDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +class SportsDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday */ - public const HOLIDAY = 'healthandSportsDay'; + public const HOLIDAY = 'sportsDay'; /** * The year in which the holiday was first established @@ -37,7 +37,7 @@ class HealthAndSportsDayTest extends JapanBaseTestCase implements YasumiTestCase * @throws \Exception * @throws \ReflectionException */ - public function testHealthAndSportsDayIn2020() + public function testSportsDayIn2020() { $year = 2020; $this->assertHoliday( @@ -54,7 +54,7 @@ public function testHealthAndSportsDayIn2020() * @throws \Exception * @throws \ReflectionException */ - public function testHealthAndSportsDayOnAfter2000() + public function testSportsDayOnAfter2000() { $year = $this->generateRandomYear(2001); $this->assertHoliday( @@ -71,7 +71,7 @@ public function testHealthAndSportsDayOnAfter2000() * @throws \Exception * @throws \ReflectionException */ - public function testHealthAndSportsDayBetween1996And2000() + public function testSportsDayBetween1996And2000() { $year = 1997; $this->assertHoliday( @@ -88,7 +88,7 @@ public function testHealthAndSportsDayBetween1996And2000() * @throws \Exception * @throws \ReflectionException */ - public function testHealthAndSportsDayBetween1996And2000SubstitutedNextWorkingDay() + public function testSportsDayBetween1996And2000SubstitutedNextWorkingDay() { $year = 1999; $this->assertHoliday( @@ -104,7 +104,7 @@ public function testHealthAndSportsDayBetween1996And2000SubstitutedNextWorkingDa * 2000 it was changed to be the second monday of October. * @throws \ReflectionException */ - public function testHealthAndSportsDayBefore1996() + public function testSportsDayBefore1996() { $this->assertNotHoliday( self::REGION, @@ -115,6 +115,7 @@ public function testHealthAndSportsDayBefore1996() /** * Tests the translated name of the holiday defined in this test. + * 1996-2019:Health And Sports Day * @throws \ReflectionException */ public function testTranslation(): void @@ -122,11 +123,27 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2019), [self::LOCALE => '体育の日'] ); } + /** + * Tests the translated name of the holiday defined in this test. + * 2020 - :Sports Day + * @throws \ReflectionException + */ + public function testTranslationFrom2020(): void + { + $year =2020; + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear($year), + [self::LOCALE => 'スポーツの日'] + ); + } + /** * Tests type of the holiday defined in this test. * @throws \ReflectionException From 87810f67b074eb924e1240d609423d223e0e3341 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 7 Mar 2019 09:29:29 +0900 Subject: [PATCH 017/133] Updated the CHANGELOG to reflect the latest (unreleased) changes. Some textual changes. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1d81eff0..079d3deab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,21 +6,22 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ## [Unreleased] ### Added -- Added International Women's Day as official holidy since 2019 in Berlin (Germany). [#133](https://github.com/azuyalabs/yasumi/pull/133) ([huehnerhose](https://github.com/huehnerhose)) +- International Women's Day is an official holiday since 2019 in Berlin (Germany). [#133](https://github.com/azuyalabs/yasumi/pull/133) ([huehnerhose](https://github.com/huehnerhose)) ### Changed -- Changed Dutch spelling for Easter/Pentecost/Christmas. [\#128](https://github.com/azuyalabs/yasumi/issues/128) ([c960657](https://github.com/c960657)) +- Japanese Health And Sports Day will be renamed to Sports Day from 2020. [\#129](https://github.com/azuyalabs/yasumi/issues/129) ([cookie-maker](https://github.com/cookie-maker)) +- Dutch spelling for Easter/Pentecost/Christmas to use lower case. [\#128](https://github.com/azuyalabs/yasumi/issues/128) ([c960657](https://github.com/c960657)) - Refactored the Netherlands Holiday provider by moving the calculation of individual holidays to private methods. This will reduce the complexity of the initialize method. -- Changed visibility of internal class functions to 'private'. These are to be used within the class only and should not be public. +- Visibility of internal class functions to 'private'. These are to be used within the class only and should not be public. ### Fixed - Changed the USA Provider to check all holidays for potential substitute holidays, not just New Year's Day, Independence Day, and Christmas Day. [\#140](https://github.com/azuyalabs/yasumi/pull/140) ([jagers](https://github.com/jagers)) - Adjusted tests for the 'next' and 'previous' methods to avoid actually exceeding the year boundaries. -- Fixed deprecation warning for the package mikey179/vfStream. Composer 2.0 requires package names to not contain any upper case characters. [\#135](https://github.com/azuyalabs/yasumi/pull/135) ([IceShack](https://github.com/IceShack)) -- Fix comment about weekend in India [\#126](https://github.com/azuyalabs/yasumi/pull/126) ([c960657](https://github.com/c960657)) +- Deprecation warning for the package mikey179/vfStream. Composer 2.0 requires package names to not contain any upper case characters. [\#135](https://github.com/azuyalabs/yasumi/pull/135) ([IceShack](https://github.com/IceShack)) +- Incorrect comment about weekends in India [\#126](https://github.com/azuyalabs/yasumi/pull/126) ([c960657](https://github.com/c960657)) ### Removed -- Removed duplicate definition of newYearsDay [\#125](https://github.com/azuyalabs/yasumi/pull/125) ([c960657](https://github.com/c960657)) +- Duplicate definition of newYearsDay [\#125](https://github.com/azuyalabs/yasumi/pull/125) ([c960657](https://github.com/c960657)) From 2e95813e783bca69d7019d1890a7126b4056c08a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 7 Mar 2019 10:42:01 +0900 Subject: [PATCH 018/133] Tests for Bremen, Lower Saxony and Schleswig Holstein (Germany) also celebrated Reformation Day in 2017. The unit tests were failing as it didn't account for that. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 1 + tests/Germany/Bremen/ReformationDayTest.php | 2 +- tests/Germany/LowerSaxony/ReformationDayTest.php | 2 +- tests/Germany/SchleswigHolstein/ReformationDayTest.php | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 079d3deab..1217bbb49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Visibility of internal class functions to 'private'. These are to be used within the class only and should not be public. ### Fixed +- Tests for Bremen, Lower Saxony and Schleswig Holstein (Germany) also celebrated Reformation Day in 2017. The unit tests were failing as it didn't account for that. - Changed the USA Provider to check all holidays for potential substitute holidays, not just New Year's Day, Independence Day, and Christmas Day. [\#140](https://github.com/azuyalabs/yasumi/pull/140) ([jagers](https://github.com/jagers)) - Adjusted tests for the 'next' and 'previous' methods to avoid actually exceeding the year boundaries. - Deprecation warning for the package mikey179/vfStream. Composer 2.0 requires package names to not contain any upper case characters. [\#135](https://github.com/azuyalabs/yasumi/pull/135) ([IceShack](https://github.com/IceShack)) diff --git a/tests/Germany/Bremen/ReformationDayTest.php b/tests/Germany/Bremen/ReformationDayTest.php index 0e1ab75c2..5bd240ced 100644 --- a/tests/Germany/Bremen/ReformationDayTest.php +++ b/tests/Germany/Bremen/ReformationDayTest.php @@ -74,7 +74,7 @@ public function testHolidayBeforeEstablishment() $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 2) ); } diff --git a/tests/Germany/LowerSaxony/ReformationDayTest.php b/tests/Germany/LowerSaxony/ReformationDayTest.php index bdac6f83d..ccc477cf8 100644 --- a/tests/Germany/LowerSaxony/ReformationDayTest.php +++ b/tests/Germany/LowerSaxony/ReformationDayTest.php @@ -74,7 +74,7 @@ public function testHolidayBeforeEstablishment() $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 2) ); } diff --git a/tests/Germany/SchleswigHolstein/ReformationDayTest.php b/tests/Germany/SchleswigHolstein/ReformationDayTest.php index 8f91536c4..aa3030d18 100644 --- a/tests/Germany/SchleswigHolstein/ReformationDayTest.php +++ b/tests/Germany/SchleswigHolstein/ReformationDayTest.php @@ -74,7 +74,7 @@ public function testHolidayBeforeEstablishment() $this->assertNotHoliday( self::REGION, self::HOLIDAY, - $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 2) ); } From 025843ae2bcd677b4bb022fb0da3237f1cef867a Mon Sep 17 00:00:00 2001 From: "Yoshihisa.Hamada" Date: Thu, 7 Mar 2019 10:44:03 +0900 Subject: [PATCH 019/133] The Japanese Emperor will abdicate the throne on May 1st 2019. (#130) The Japanese Emperor will abdicate the throne on May 1st 2019. Change Emperors Birthday to Feb 23th. Add Coronation Day And Enthronement Proclamation Ceremony. --- src/Yasumi/Provider/Japan.php | 57 +++++++++- tests/Japan/CoronationDayTest.php | 105 ++++++++++++++++++ tests/Japan/EmperorsBirthdayTest.php | 55 ++++++++- .../EnthronementProclamationCeremonyTest.php | 104 +++++++++++++++++ tests/Japan/JapanTest.php | 30 ++++- 5 files changed, 342 insertions(+), 9 deletions(-) create mode 100644 tests/Japan/CoronationDayTest.php create mode 100644 tests/Japan/EnthronementProclamationCeremonyTest.php diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 41043d849..f9d2198ec 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -106,6 +106,8 @@ public function initialize(): void $this->calculateAutumnalEquinoxDay(); $this->calculateSubstituteHolidays(); $this->calculateBridgeHolidays(); + $this->calculateCoronationDay(); + $this->calculateEnthronementProclamationCeremony(); } /** @@ -210,18 +212,65 @@ private function calculateLaborThanksgivingDay(): void } /** - * Emperors Birthday. The Emperors Birthday is on December 23rd and celebrated as such since 1989. - * Prior to the death of Emperor Hirohito in 1989, this holiday was celebrated on April 29. See also "Shōwa Day". + * Emperors Birthday. + * The Emperors Birthday is on April 29rd and celebrated as such since 1949 to 1988. + * December 23rd and celebrated as such since 1989 to 2018. + * February 23rd and celebrated as such since 2020.(Coronation Day of the new Emperor, May 1, 2019) * * @throws \Exception */ private function calculateEmporersBirthday(): void { - if ($this->year >= 1989) { + $emporersBirthday = false; + if ($this->year >=2020) { + $emporersBirthday = "$this->year-2-23"; + } elseif ($this->year >= 1989 && $this->year <2019) { + $emporersBirthday = "$this->year-12-23"; + } elseif ($this->year >= 1949 && $this->year <1988) { + $emporersBirthday = "$this->year-4-29"; + } + + if ($emporersBirthday) { $this->addHoliday(new Holiday( 'emperorsBirthday', ['en_US' => 'Emperors Birthday', 'ja_JP' => '天皇誕生日'], - new DateTime("$this->year-12-23", new DateTimeZone($this->timezone)), + new DateTime($emporersBirthday, new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Coronation Day. Coronation Day is The new Emperor Coronation. + * This holiday is only 2019. + * + * @throws \Exception + */ + private function calculateCoronationDay(): void + { + if ($this->year == 2019) { + $this->addHoliday(new Holiday( + 'coronationDay', + ['en_US' => 'Coronation Day', 'ja_JP' => '即位の日'], + new DateTime("$this->year-5-1", new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Enthronement Proclamation Ceremony. Enthronement Proclamation Ceremony is The New Emperor enthronement ceremony. + * This holiday only 2019. + * + * @throws \Exception + */ + private function calculateEnthronementProclamationCeremony(): void + { + if ($this->year == 2019) { + $this->addHoliday(new Holiday( + 'enthronementProclamationCeremony', + ['en_US' => 'Enthronement Proclamation Ceremony', 'ja_JP' => '即位礼正殿の儀'], + new DateTime("$this->year-10-22", new DateTimeZone($this->timezone)), $this->locale )); } diff --git a/tests/Japan/CoronationDayTest.php b/tests/Japan/CoronationDayTest.php new file mode 100644 index 000000000..c591688a4 --- /dev/null +++ b/tests/Japan/CoronationDayTest.php @@ -0,0 +1,105 @@ + + */ + +namespace Yasumi\tests\Japan; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class testing the Emperors Coronation day in Japan. + */ +class CoronationDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'coronationDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 2019; + + /** + * + * + * + * @throws \Exception + * @throws \ReflectionException + */ + public function testEmperorsCoronationDay() + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 2019, + new DateTime("2019-5-1", new DateTimeZone(self::TIMEZONE)) + ); + } + + + /** + * @throws \ReflectionException + */ + public function testEmperorsBirthdayBefore2019() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * @throws \ReflectionException + */ + public function testEmperorsBirthdayAfter2020() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR + 1) + ); + } + + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + 2019, + [self::LOCALE => '即位の日'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + 2019, + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/Japan/EmperorsBirthdayTest.php b/tests/Japan/EmperorsBirthdayTest.php index f64220dc9..678d7dc71 100644 --- a/tests/Japan/EmperorsBirthdayTest.php +++ b/tests/Japan/EmperorsBirthdayTest.php @@ -30,10 +30,28 @@ class EmperorsBirthdayTest extends JapanBaseTestCase implements YasumiTestCaseIn /** * The year in which the holiday was first established */ - public const ESTABLISHMENT_YEAR = 1989; + public const ESTABLISHMENT_YEAR = 1949; + // public const ESTABLISHMENT_YEAR = 1989; /** - * Tests the Emperors Birthday after 1989. The Emperors Birthday is on December 23rd and celebrated as such since + * Tests the Emperors Birthday after 1949 to 1988. The Emperors Birthday is on April 28rd and celebrated as such since + * 1949. + * @throws \Exception + * @throws \ReflectionException + */ + public function testEmperorsBirthdayOnAfter1949() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1988); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-4-29", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the Emperors Birthday after 1989 to 2018. The Emperors Birthday is on December 23rd and celebrated as such since * 1989. Prior to the death of Emperor Hirohito in 1989, this holiday was celebrated on April 29. See also "Shōwa * Day". * @throws \Exception @@ -41,7 +59,7 @@ class EmperorsBirthdayTest extends JapanBaseTestCase implements YasumiTestCaseIn */ public function testEmperorsBirthdayOnAfter1989() { - $year = 3012; + $year = $this->generateRandomYear(1989, 2018); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -50,6 +68,23 @@ public function testEmperorsBirthdayOnAfter1989() ); } + /** + * Tests the Emperors Birthday after 2020. The Emperors Birthday is on February 23rd and celebrated as such since + * 2020. + * @throws \Exception + * @throws \ReflectionException + */ + public function testEmperorsBirthdayOnAfter2020() + { + $year = $this->generateRandomYear(2020); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-2-23", new DateTimeZone(self::TIMEZONE)) + ); + } + /** * Tests the Emperors Birthday after 1989 substituted next working day (when the Emperors Birthday falls on a * Sunday) @@ -82,6 +117,20 @@ public function testEmperorsBirthdayBefore1989() ); } + /** + * Tests the Emperors Birthday at 2019. + * + * @throws \ReflectionException + */ + public function testEmperorsBirthdayAt2019() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + 2019 + ); + } + /** * Tests the translated name of the holiday defined in this test. * @throws \ReflectionException diff --git a/tests/Japan/EnthronementProclamationCeremonyTest.php b/tests/Japan/EnthronementProclamationCeremonyTest.php new file mode 100644 index 000000000..36f03d0ae --- /dev/null +++ b/tests/Japan/EnthronementProclamationCeremonyTest.php @@ -0,0 +1,104 @@ + + */ + +namespace Yasumi\tests\Japan; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class testing the Emperors Coronation day in Japan. + */ +class EnthronementProclamationCeremonyTest extends JapanBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'enthronementProclamationCeremony'; + + /** + * The year in which the holiday was first established + */ + public const IMPLEMENT_YEAR = 2019; + + /** + * + * + * + * @throws \Exception + * @throws \ReflectionException + */ + public function testEmperorsCoronationDay() + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 2019, + new DateTime("2019-10-22", new DateTimeZone(self::TIMEZONE)) + ); + } + + + /** + * @throws \ReflectionException + */ + public function testEmperorsBirthdayBefore2019() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::IMPLEMENT_YEAR - 1) + ); + } + + /** + * @throws \ReflectionException + */ + public function testEmperorsBirthdayAfter2020() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::IMPLEMENT_YEAR + 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + 2019, + [self::LOCALE => '即位礼正殿の儀'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + 2019, + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/Japan/JapanTest.php b/tests/Japan/JapanTest.php index ee36ec04f..a73d86f97 100644 --- a/tests/Japan/JapanTest.php +++ b/tests/Japan/JapanTest.php @@ -47,10 +47,36 @@ public function testOfficialHolidays(): void 'cultureDay', 'laborThanksgivingDay', 'emperorsBirthday', - ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } + /** + * Tests if all official holidays in Japan At 2019 are defined by the provider class + * @throws \ReflectionException + */ + public function testOfficialHolidaysAt2019(): void + { + $this->assertDefinedHolidays([ + 'newYearsDay', + 'comingOfAgeDay', + 'nationalFoundationDay', + 'vernalEquinoxDay', + 'showaDay', + 'constitutionMemorialDay', + 'greeneryDay', + 'childrensDay', + 'marineDay', + 'mountainDay', + 'respectfortheAgedDay', + 'autumnalEquinoxDay', + 'sportsDay', + 'cultureDay', + 'laborThanksgivingDay', + 'coronationDay', + 'enthronementProclamationCeremony', + ], self::REGION, 2019, Holiday::TYPE_OFFICIAL); + } + /** * Tests if all observed holidays in Japan are defined by the provider class * @throws \ReflectionException @@ -92,6 +118,6 @@ public function testOtherHolidays(): void */ protected function setUp() { - $this->year = $this->generateRandomYear(2016, 2150); + $this->year = $this->generateRandomYear(2020, 2150); } } From 7fd0bddf54d6c158489b3129fc5264ea2e506921 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 7 Mar 2019 11:08:42 +0900 Subject: [PATCH 020/133] Updated the CHANGELOG to reflect the latest (unreleased) changes. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1217bbb49..d1e666793 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ## [Unreleased] ### Added +- As the Japanese Emperor will abdicate the throne on May 1st 2019, the holiday of the Emporers Birthday will change to February 23rd from 2020 (No holiday in 2019). In addition, Coronation Day and the Enthronement Proclamation Ceremony will be extra holidays in 2019. [\#130](https://github.com/azuyalabs/yasumi/pull/130) ([cookie-maker](https://github.com/cookie-maker)) - International Women's Day is an official holiday since 2019 in Berlin (Germany). [#133](https://github.com/azuyalabs/yasumi/pull/133) ([huehnerhose](https://github.com/huehnerhose)) ### Changed From 49eff531c486bf2e73276024ce16bd1e7e38de75 Mon Sep 17 00:00:00 2001 From: "Yoshihisa.Hamada" Date: Thu, 28 Mar 2019 22:48:05 +0900 Subject: [PATCH 021/133] Bug Fixed "bridge day" at Japan. (#141) "Bridge day" has 2 days in 2019 (Apr 30th & May 2nd). --- src/Yasumi/Provider/Japan.php | 6 ++++-- tests/Japan/PublicBridgeDayTest.php | 16 +++++++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index f9d2198ec..efb189edc 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -105,9 +105,9 @@ public function initialize(): void $this->calculateSportsDay(); $this->calculateAutumnalEquinoxDay(); $this->calculateSubstituteHolidays(); - $this->calculateBridgeHolidays(); $this->calculateCoronationDay(); $this->calculateEnthronementProclamationCeremony(); + $this->calculateBridgeHolidays(); } /** @@ -607,6 +607,7 @@ private function calculateBridgeHolidays(): void // Get initial list of holidays and iterator $datesIterator = $this->getIterator(); + $counter=1; // Loop through all defined holidays while ($datesIterator->valid()) { $previous = $datesIterator->current(); @@ -622,10 +623,11 @@ private function calculateBridgeHolidays(): void $bridgeDate = clone $previous; $bridgeDate->add(new DateInterval('P1D')); - $this->addHoliday(new Holiday('bridgeDay', [ + $this->addHoliday(new Holiday('bridgeDay'.$counter, [ 'en_US' => 'Bridge Public holiday', 'ja_JP' => '国民の休日', ], $bridgeDate, $this->locale)); + $counter++; } } } diff --git a/tests/Japan/PublicBridgeDayTest.php b/tests/Japan/PublicBridgeDayTest.php index bdc963bf5..09ab09c31 100644 --- a/tests/Japan/PublicBridgeDayTest.php +++ b/tests/Japan/PublicBridgeDayTest.php @@ -40,9 +40,15 @@ public function testPublicBridgeDay() { $this->assertHoliday( self::REGION, - self::HOLIDAY, + self::HOLIDAY.'1', $this->year, - new DateTime("$this->year-9-22", new DateTimeZone(self::TIMEZONE)) + new DateTime("$this->year-4-30", new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY.'2', + $this->year, + new DateTime("$this->year-5-2", new DateTimeZone(self::TIMEZONE)) ); } @@ -52,7 +58,7 @@ public function testPublicBridgeDay() */ public function testTranslation(): void { - $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY, $this->year, [self::LOCALE => '国民の休日']); + $this->assertTranslatedHolidayName(self::REGION, self::HOLIDAY.'1', $this->year, [self::LOCALE => '国民の休日']); } /** @@ -61,7 +67,7 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->year, Holiday::TYPE_OFFICIAL); + $this->assertHolidayType(self::REGION, self::HOLIDAY.'1', $this->year, Holiday::TYPE_OFFICIAL); } /** @@ -69,6 +75,6 @@ public function testHolidayType(): void */ protected function setUp() { - $this->year = 2015; + $this->year = 2019; } } From aa32c0f9ba794de186dbe9b76bd8f71a5f50c722 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Oude Koehorst Date: Fri, 29 Mar 2019 09:11:05 +0900 Subject: [PATCH 022/133] Using a more strict type comparison. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Japan.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index efb189edc..b7d86d51b 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -248,7 +248,7 @@ private function calculateEmporersBirthday(): void */ private function calculateCoronationDay(): void { - if ($this->year == 2019) { + if (2019 === $this->year) { $this->addHoliday(new Holiday( 'coronationDay', ['en_US' => 'Coronation Day', 'ja_JP' => '即位の日'], @@ -266,7 +266,7 @@ private function calculateCoronationDay(): void */ private function calculateEnthronementProclamationCeremony(): void { - if ($this->year == 2019) { + if (2019 === $this->year) { $this->addHoliday(new Holiday( 'enthronementProclamationCeremony', ['en_US' => 'Enthronement Proclamation Ceremony', 'ja_JP' => '即位礼正殿の儀'], From 687b43a7561ce0c1d580ccab94a317a851dad74b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Oude Koehorst Date: Fri, 29 Mar 2019 09:15:59 +0900 Subject: [PATCH 023/133] Removed the unused function for International Women's Day as this has been moved to the Common Holiday class. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Ukraine.php | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 924e194de..9f1d2684c 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -80,29 +80,6 @@ private function calculateChristmasDay(): void )); } - /** - * International Women's Day. - * - * International Women's Day (IWD), originally called International Working Women's Day, is celebrated on March 8 - * every year. - * - * @link https://en.wikipedia.org/wiki/International_Women%27s_Day - * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException - * @throws \Exception - */ - private function calculateInternationalWomensDay(): void - { - $this->addHoliday(new Holiday( - 'internationalWomensDay', - ['uk_UA' => 'Міжнародний жіночий день', 'ru_UA' => 'Международный женский день'], - new \DateTime("$this->year-03-08", new \DateTimeZone($this->timezone)), - $this->locale - )); - } - /** * International Workers' Day. * From 67cece2246b83337376e2063e4d4480ffb9893d6 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Oude Koehorst Date: Fri, 29 Mar 2019 09:22:59 +0900 Subject: [PATCH 024/133] Replaced unnecessary double quotes by single quotes. Signed-off-by: Sacha Telgenhof --- tests/Japan/CoronationDayTest.php | 2 +- tests/Japan/EnthronementProclamationCeremonyTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Japan/CoronationDayTest.php b/tests/Japan/CoronationDayTest.php index c591688a4..e249d1fdc 100644 --- a/tests/Japan/CoronationDayTest.php +++ b/tests/Japan/CoronationDayTest.php @@ -45,7 +45,7 @@ public function testEmperorsCoronationDay() self::REGION, self::HOLIDAY, 2019, - new DateTime("2019-5-1", new DateTimeZone(self::TIMEZONE)) + new DateTime('2019-5-1', new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/Japan/EnthronementProclamationCeremonyTest.php b/tests/Japan/EnthronementProclamationCeremonyTest.php index 36f03d0ae..0dd9e37a8 100644 --- a/tests/Japan/EnthronementProclamationCeremonyTest.php +++ b/tests/Japan/EnthronementProclamationCeremonyTest.php @@ -45,7 +45,7 @@ public function testEmperorsCoronationDay() self::REGION, self::HOLIDAY, 2019, - new DateTime("2019-10-22", new DateTimeZone(self::TIMEZONE)) + new DateTime('2019-10-22', new DateTimeZone(self::TIMEZONE)) ); } From a0e9823731d990cb47794aa36f78ab6cf644d158 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Oude Koehorst Date: Fri, 29 Mar 2019 09:29:38 +0900 Subject: [PATCH 025/133] Resorted translations. Signed-off-by: Sacha Telgenhof --- src/Yasumi/data/translations/internationalWomensDay.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/data/translations/internationalWomensDay.php b/src/Yasumi/data/translations/internationalWomensDay.php index 56267a472..74bff677b 100755 --- a/src/Yasumi/data/translations/internationalWomensDay.php +++ b/src/Yasumi/data/translations/internationalWomensDay.php @@ -15,6 +15,6 @@ 'de_DE' => 'Internationaler Frauentag', 'en_US' => 'International Women\'s Day', 'ru_RU' => 'Международный женский день', - 'uk_UA' => 'Міжнародний жіночий день', 'ru_UA' => 'Международный женский день', + 'uk_UA' => 'Міжнародний жіночий день', ]; From bed2c78b5e4a2ce85149c59d12ce6494d634faeb Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Oude Koehorst Date: Fri, 29 Mar 2019 09:50:23 +0900 Subject: [PATCH 026/133] Small correction to the test of the Emperor's Birthday (Japan) between 1949 and 1988. It is not celebrated in 1988 (similar to 2019). Signed-off-by: Sacha Telgenhof --- tests/Japan/EmperorsBirthdayTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Japan/EmperorsBirthdayTest.php b/tests/Japan/EmperorsBirthdayTest.php index 678d7dc71..ea1c487c0 100644 --- a/tests/Japan/EmperorsBirthdayTest.php +++ b/tests/Japan/EmperorsBirthdayTest.php @@ -41,7 +41,7 @@ class EmperorsBirthdayTest extends JapanBaseTestCase implements YasumiTestCaseIn */ public function testEmperorsBirthdayOnAfter1949() { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1988); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1987); $this->assertHoliday( self::REGION, self::HOLIDAY, From 8c684d26c9a61055c935f2efee06062eaa23f622 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Oude Koehorst Date: Fri, 29 Mar 2019 09:54:27 +0900 Subject: [PATCH 027/133] Small correction to the test of New Year's day in the United Kingdom. It has been identified as a Bank Holiday only since 1975 (not since 1974). Signed-off-by: Sacha Telgenhof --- tests/UnitedKingdom/NewYearsDayTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/UnitedKingdom/NewYearsDayTest.php b/tests/UnitedKingdom/NewYearsDayTest.php index 725172893..d2650e2b5 100644 --- a/tests/UnitedKingdom/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NewYearsDayTest.php @@ -119,7 +119,7 @@ public function testHolidayType(): void $this->assertHolidayType( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ADJUSTMENT_YEAR), + $this->generateRandomYear(self::ADJUSTMENT_YEAR + 1), Holiday::TYPE_BANK ); } From 69b50ec9ebe5c27b7eed3fc94fca27121865b992 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Oude Koehorst Date: Fri, 29 Mar 2019 11:54:18 +0900 Subject: [PATCH 028/133] Updated the changelog capturing all v2.1 release changes. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1e666793..742c728e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,28 +5,40 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ## [Unreleased] +### Added + +### Changed + +### Fixed + +### Removed + + +## [2.1.0] - 2019-03-29 + ### Added - As the Japanese Emperor will abdicate the throne on May 1st 2019, the holiday of the Emporers Birthday will change to February 23rd from 2020 (No holiday in 2019). In addition, Coronation Day and the Enthronement Proclamation Ceremony will be extra holidays in 2019. [\#130](https://github.com/azuyalabs/yasumi/pull/130) ([cookie-maker](https://github.com/cookie-maker)) - International Women's Day is an official holiday since 2019 in Berlin (Germany). [#133](https://github.com/azuyalabs/yasumi/pull/133) ([huehnerhose](https://github.com/huehnerhose)) ### Changed -- Japanese Health And Sports Day will be renamed to Sports Day from 2020. [\#129](https://github.com/azuyalabs/yasumi/issues/129) ([cookie-maker](https://github.com/cookie-maker)) -- Dutch spelling for Easter/Pentecost/Christmas to use lower case. [\#128](https://github.com/azuyalabs/yasumi/issues/128) ([c960657](https://github.com/c960657)) +- Japanese Health And Sports Day will be renamed to Sports Day from 2020. [\#129](https://github.com/azuyalabs/yasumi/pull/129) ([cookie-maker](https://github.com/cookie-maker)) +- Dutch spelling for Easter/Pentecost/Christmas to use lower case. [\#128](https://github.com/azuyalabs/yasumi/pull/128) ([c960657](https://github.com/c960657)) - Refactored the Netherlands Holiday provider by moving the calculation of individual holidays to private methods. This will reduce the complexity of the initialize method. - Visibility of internal class functions to 'private'. These are to be used within the class only and should not be public. ### Fixed +- "Bridge Day" for Japan takes two days in 2019. Currently the code only allows for 1 bridge day at a maximum. [\#141](https://github.com/azuyalabs/yasumi/pull/141) ([cookie-maker](https://github.com/cookie-maker)) - Tests for Bremen, Lower Saxony and Schleswig Holstein (Germany) also celebrated Reformation Day in 2017. The unit tests were failing as it didn't account for that. - Changed the USA Provider to check all holidays for potential substitute holidays, not just New Year's Day, Independence Day, and Christmas Day. [\#140](https://github.com/azuyalabs/yasumi/pull/140) ([jagers](https://github.com/jagers)) - Adjusted tests for the 'next' and 'previous' methods to avoid actually exceeding the year boundaries. - Deprecation warning for the package mikey179/vfStream. Composer 2.0 requires package names to not contain any upper case characters. [\#135](https://github.com/azuyalabs/yasumi/pull/135) ([IceShack](https://github.com/IceShack)) - Incorrect comment about weekends in India [\#126](https://github.com/azuyalabs/yasumi/pull/126) ([c960657](https://github.com/c960657)) - +- Correction to the test of New Year's day in the United Kingdom. It has been identified as a Bank Holiday only since 1975 (not from 1974). + ### Removed - Duplicate definition of newYearsDay [\#125](https://github.com/azuyalabs/yasumi/pull/125) ([c960657](https://github.com/c960657)) - ## [2.0.0] - 2019-01-11 ### Added From 6eaad09fd38493b6c3e3c60e55836d21678f8651 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Oude Koehorst Date: Fri, 29 Mar 2019 11:55:02 +0900 Subject: [PATCH 029/133] Fixed typo. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 742c728e0..54e045d1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,10 +45,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - New filter to select holidays that happen on a given date [\#119](https://github.com/azuyalabs/yasumi/pull/119) ([cruxicheiros](https://github.com/cruxicheiros)) - Holiday Providers for all Australian states and territories. [\#112](https://github.com/azuyalabs/yasumi/pull/112) ([Milamber33](https://github.com/Milamber33)) - Holiday Provider for Bosnia. [\#94](https://github.com/azuyalabs/yasumi/pull/94) ([TheAdnan](https://github.com/TheAdnan)) -- Added Reformation Day as offical holiday since 2018 in Lower Saxony (Germany). [#115](https://github.com/azuyalabs/yasumi/issues/115) ([Taxcamp](https://github.com/Taxcamp)) -- Added Reformation Day as offical holiday since 2018 in Schleswig-Holstein (Germany). [#106](https://github.com/azuyalabs/yasumi/pull/106) ([HenningCash](https://github.com/HenningCash)) -- Added Reformation Day as offical holiday since 2018 in Hamburg (Germany). [#108](https://github.com/azuyalabs/yasumi/pull/108) ([HenningCash](https://github.com/HenningCash)) -- Added Reformation Day as offical holiday since 2018 in Bremen (Germany). [#116](https://github.com/azuyalabs/yasumi/issues/116) ([TalonTR](https://github.com/TalonTR)) +- Added Reformation Day as official holiday since 2018 in Lower Saxony (Germany). [#115](https://github.com/azuyalabs/yasumi/issues/115) ([Taxcamp](https://github.com/Taxcamp)) +- Added Reformation Day as official holiday since 2018 in Schleswig-Holstein (Germany). [#106](https://github.com/azuyalabs/yasumi/pull/106) ([HenningCash](https://github.com/HenningCash)) +- Added Reformation Day as official holiday since 2018 in Hamburg (Germany). [#108](https://github.com/azuyalabs/yasumi/pull/108) ([HenningCash](https://github.com/HenningCash)) +- Added Reformation Day as official holiday since 2018 in Bremen (Germany). [#116](https://github.com/azuyalabs/yasumi/issues/116) ([TalonTR](https://github.com/TalonTR)) - The (observed) holidays Lukkeloven, Constitution Day, New Year's Eve and Labour Day, as well as summertime and wintertime are included for Denmark [\#104](https://github.com/azuyalabs/yasumi/pull/104) ([c960657](https://github.com/c960657)) ### Changed From 56c693c291644a0a6e1fdcfcc627bd462ae010ad Mon Sep 17 00:00:00 2001 From: pioc92 Date: Fri, 17 May 2019 12:48:11 +0200 Subject: [PATCH 030/133] Update pentecost.php (#145) Add pentecost fr_FR translation --- src/Yasumi/data/translations/pentecost.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Yasumi/data/translations/pentecost.php b/src/Yasumi/data/translations/pentecost.php index 2f81476c8..29bd99ac0 100755 --- a/src/Yasumi/data/translations/pentecost.php +++ b/src/Yasumi/data/translations/pentecost.php @@ -23,6 +23,7 @@ 'fi_FI' => 'Helluntaipäivä', 'fr_BE' => 'Pentecôte', 'fr_CH' => 'Pentecôte', + 'fr_FR' => 'Pentecôte', 'ga_IE' => 'Domhnach Cincíse', 'hu_HU' => 'Pünkösd', 'it_CH' => 'Pentecoste', From e7a4e0233358ac0ab0e5a1913160da2f6295cb15 Mon Sep 17 00:00:00 2001 From: blood72 Date: Thu, 23 May 2019 19:38:09 +0900 Subject: [PATCH 031/133] Provider for holidays in South Korea (#156) * support Korean translations * add provider for holidays in South Korea * add tests for holidays in South Korea * fix Hangul Day test logic --- phpunit.xml | 5 + src/Yasumi/Provider/SouthKorea.php | 518 ++++++++++++++++++ src/Yasumi/data/translations/christmasDay.php | 1 + src/Yasumi/data/translations/christmasEve.php | 1 + .../data/translations/dayAfterNewYearsDay.php | 1 + .../translations/internationalWomensDay.php | 1 + .../translations/internationalWorkersDay.php | 1 + src/Yasumi/data/translations/labourDay.php | 1 + src/Yasumi/data/translations/newYearsDay.php | 1 + src/Yasumi/data/translations/newYearsEve.php | 1 + .../data/translations/secondChristmasDay.php | 1 + src/Yasumi/data/translations/summerTime.php | 1 + .../data/translations/valentinesDay.php | 1 + tests/SouthKorea/ArborDayTest.php | 124 +++++ tests/SouthKorea/ArmedForcesDayTest.php | 110 ++++ tests/SouthKorea/BuddhasBirthdayTest.php | 101 ++++ tests/SouthKorea/ChildrensDayTest.php | 141 +++++ tests/SouthKorea/ChristmasDayTest.php | 92 ++++ tests/SouthKorea/ChuseokTest.php | 207 +++++++ tests/SouthKorea/ConstitutionDayTest.php | 110 ++++ tests/SouthKorea/GaecheonjeolTest.php | 92 ++++ tests/SouthKorea/HangulDayTest.php | 106 ++++ .../IndependenceMovementDayTest.php | 92 ++++ tests/SouthKorea/LiberationDayTest.php | 92 ++++ tests/SouthKorea/MemorialDayTest.php | 92 ++++ tests/SouthKorea/NewYearsDayTest.php | 153 ++++++ tests/SouthKorea/SeollalTest.php | 173 ++++++ tests/SouthKorea/SouthKoreaBaseTestCase.php | 40 ++ tests/SouthKorea/SouthKoreaTest.php | 134 +++++ 29 files changed, 2393 insertions(+) create mode 100644 src/Yasumi/Provider/SouthKorea.php create mode 100644 tests/SouthKorea/ArborDayTest.php create mode 100644 tests/SouthKorea/ArmedForcesDayTest.php create mode 100644 tests/SouthKorea/BuddhasBirthdayTest.php create mode 100644 tests/SouthKorea/ChildrensDayTest.php create mode 100644 tests/SouthKorea/ChristmasDayTest.php create mode 100644 tests/SouthKorea/ChuseokTest.php create mode 100644 tests/SouthKorea/ConstitutionDayTest.php create mode 100644 tests/SouthKorea/GaecheonjeolTest.php create mode 100644 tests/SouthKorea/HangulDayTest.php create mode 100644 tests/SouthKorea/IndependenceMovementDayTest.php create mode 100644 tests/SouthKorea/LiberationDayTest.php create mode 100644 tests/SouthKorea/MemorialDayTest.php create mode 100644 tests/SouthKorea/NewYearsDayTest.php create mode 100644 tests/SouthKorea/SeollalTest.php create mode 100644 tests/SouthKorea/SouthKoreaBaseTestCase.php create mode 100644 tests/SouthKorea/SouthKoreaTest.php diff --git a/phpunit.xml b/phpunit.xml index 158eff6e8..2952d83e9 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -173,6 +173,11 @@ ./tests/SouthAfrica + + + ./tests/SouthKorea + + ./tests/Spain diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php new file mode 100644 index 000000000..647e8383c --- /dev/null +++ b/src/Yasumi/Provider/SouthKorea.php @@ -0,0 +1,518 @@ + + */ + +namespace Yasumi\Provider; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; + +/** + * Provider for all holidays in the South Korea except for election day and temporary public holiday. + * + * @link https://en.wikipedia.org/wiki/Public_holidays_in_South_Korea + */ +class SouthKorea extends AbstractProvider +{ + use CommonHolidays, ChristianHolidays; + + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'KR'; + + /** + * Dates in Gregorian calendar of Seollal, Buddha's Birthday, and Chuseok (~ 2050) + * + * The Korean calendar is derived from the Chinese calendar. Although not being an official calendar, the + * traditional Korean calendar is still maintained by the government. The current version is based on China's + * Shixian calendar, which was in turn developed by Jesuit scholars. However, because the Korean calendar is now + * based on the moon's shape seen from Korea, occasionally the calendar diverges from the traditional Chinese + * calendar by one day, even though the underlying rule is the same. + * @link https://en.wikipedia.org/wiki/Korean_calendar + * + * To convert from lunar calendar to Gregorian calendar, lunar observation is necessary. + * There is no perfect formula, and as it moves away from the current date, the error becomes bigger. + * Korea Astronomy and Space Science Institute (KASI) is supporting the converter until 2050. + * For more information, please refer to the paper below. + * 박한얼, 민병희, 안영숙,(2017).한국 음력의 운용과 계산법 연구.천문학논총,32(3),407-420. + * @link https://www.kasi.re.kr/kor/research/paper/20170259 - Korea Astronomy and Space Science Institute + */ + public const LUNAR_HOLIDAY = [ + 'seollal' => [ + 1985 => '1985-2-20', 1986 => '1986-2-9', 1987 => '1987-1-29', 1988 => '1988-2-18', 1989 => '1989-2-6', + 1990 => '1990-1-27', 1991 => '1991-2-15', 1992 => '1992-2-4', 1993 => '1993-1-23', 1994 => '1994-2-10', + 1995 => '1995-1-31', 1996 => '1996-2-19', 1997 => '1997-2-8', 1998 => '1998-1-28', 1999 => '1999-2-16', + 2000 => '2000-2-5', 2001 => '2001-1-24', 2002 => '2002-2-12', 2003 => '2003-2-1', 2004 => '2004-1-22', + 2005 => '2005-2-9', 2006 => '2006-1-29', 2007 => '2007-2-18', 2008 => '2008-2-7', 2009 => '2009-1-26', + 2010 => '2010-2-14', 2011 => '2011-2-3', 2012 => '2012-1-23', 2013 => '2013-2-10', 2014 => '2014-1-31', + 2015 => '2015-2-19', 2016 => '2016-2-8', 2017 => '2017-1-28', 2018 => '2018-2-16', 2019 => '2019-2-5', + 2020 => '2020-1-25', 2021 => '2021-2-12', 2022 => '2022-2-1', 2023 => '2023-1-22', 2024 => '2024-2-10', + 2025 => '2025-1-29', 2026 => '2026-2-17', 2027 => '2027-2-7', 2028 => '2028-1-27', 2029 => '2029-2-13', + 2030 => '2030-2-3', 2031 => '2031-1-23', 2032 => '2032-2-11', 2033 => '2033-1-31', 2034 => '2034-2-19', + 2035 => '2035-2-8', 2036 => '2036-1-28', 2037 => '2037-2-15', 2038 => '2038-2-4', 2039 => '2037-1-24', + 2040 => '2040-2-12', 2041 => '2041-2-1', 2042 => '2042-1-22', 2043 => '2043-2-10', 2044 => '2044-1-30', + 2045 => '2045-2-17', 2046 => '2046-2-6', 2047 => '2047-1-26', 2048 => '2048-2-14', 2049 => '2049-2-2', + 2050 => '2050-1-23', + ], + 'buddhasBirthday' => [ + 1975 => '1975-5-18', 1976 => '1976-5-6', 1977 => '1977-5-25', 1978 => '1978-5-14', 1979 => '1979-5-3', + 1980 => '1980-5-21', 1981 => '1981-5-11', 1982 => '1982-5-1', 1983 => '1983-5-20', 1984 => '1984-5-8', + 1985 => '1985-5-27', 1986 => '1986-5-16', 1987 => '1987-5-5', 1988 => '1988-5-23', 1989 => '1989-5-12', + 1990 => '1990-5-2', 1991 => '1991-5-21', 1992 => '1992-5-10', 1993 => '1993-5-28', 1994 => '1994-5-18', + 1995 => '1995-5-7', 1996 => '1996-5-24', 1997 => '1997-5-14', 1998 => '1998-5-3', 1999 => '1999-5-22', + 2000 => '2000-5-11', 2001 => '2001-4-30', 2002 => '2002-5-19', 2003 => '2003-5-8', 2004 => '2004-5-26', + 2005 => '2005-5-15', 2006 => '2006-5-5', 2007 => '2007-5-24', 2008 => '2008-5-12', 2009 => '2009-5-2', + 2010 => '2010-5-21', 2011 => '2011-5-10', 2012 => '2012-5-28', 2013 => '2013-5-17', 2014 => '2014-5-6', + 2015 => '2015-5-25', 2016 => '2016-5-14', 2017 => '2017-5-3', 2018 => '2018-5-22', 2019 => '2019-5-12', + 2020 => '2020-4-30', 2021 => '2021-5-19', 2022 => '2022-5-8', 2023 => '2023-5-27', 2024 => '2024-5-15', + 2025 => '2025-5-5', 2026 => '2026-5-24', 2027 => '2027-5-13', 2028 => '2028-5-2', 2029 => '2029-5-20', + 2030 => '2030-5-9', 2031 => '2031-5-28', 2032 => '2032-5-16', 2033 => '2033-5-6', 2034 => '2034-5-25', + 2035 => '2035-5-15', 2036 => '2036-5-3', 2037 => '2037-5-22', 2038 => '2038-5-11', 2039 => '2039-4-30', + 2040 => '2040-5-18', 2041 => '2041-5-7', 2042 => '2042-5-26', 2043 => '2043-5-16', 2044 => '2044-5-5', + 2045 => '2045-5-24', 2046 => '2046-5-13', 2047 => '2047-5-2', 2048 => '2048-5-20', 2049 => '2049-5-9', + 2050 => '2050-5-28', + ], + 'chuseok' => [ + 1949 => '1949-10-6', 1950 => '1950-9-26', 1951 => '1951-9-15', 1952 => '1952-10-3', 1953 => '1953-9-22', + 1954 => '1954-9-11', 1955 => '1955-9-30', 1956 => '1956-9-19', 1957 => '1957-9-8', 1958 => '1958-9-27', + 1959 => '1959-9-17', 1960 => '1960-10-5', 1961 => '1961-9-24', 1962 => '1962-9-13', 1963 => '1963-10-2', + 1964 => '1964-9-20', 1965 => '1965-9-10', 1966 => '1966-9-29', 1967 => '1967-9-18', 1968 => '1968-10-6', + 1969 => '1969-9-26', 1970 => '1970-9-15', 1971 => '1971-10-3', 1972 => '1972-9-22', 1973 => '1973-9-11', + 1974 => '1974-9-30', 1975 => '1975-9-20', 1976 => '1976-9-8', 1977 => '1977-9-27', 1978 => '1978-9-17', + 1979 => '1979-10-5', 1980 => '1980-9-23', 1981 => '1981-9-12', 1982 => '1982-10-1', 1983 => '1983-9-21', + 1984 => '1984-9-10', 1985 => '1985-9-29', 1986 => '1986-9-18', 1987 => '1987-10-7', 1988 => '1988-9-25', + 1989 => '1989-9-14', 1990 => '1990-10-3', 1991 => '1991-9-22', 1992 => '1992-9-11', 1993 => '1993-9-30', + 1994 => '1994-9-20', 1995 => '1950-9-9', 1996 => '1996-9-27', 1997 => '1997-9-16', 1998 => '1998-10-5', + 1999 => '1999-9-24', 2000 => '2000-9-12', 2001 => '2001-10-1', 2002 => '2002-9-21', 2003 => '2003-9-11', + 2004 => '2004-9-28', 2005 => '2005-9-18', 2006 => '2006-10-6', 2007 => '2007-9-25', 2008 => '2008-9-14', + 2009 => '2009-10-3', 2010 => '2010-9-22', 2011 => '2011-9-12', 2012 => '2012-9-30', 2013 => '2013-9-19', + 2014 => '2014-9-8', 2015 => '2015-9-27', 2016 => '2016-9-15', 2017 => '2017-10-4', 2018 => '2018-9-24', + 2019 => '2019-9-13', 2020 => '2020-10-1', 2021 => '2021-9-21', 2022 => '2022-9-10', 2023 => '2023-9-29', + 2024 => '2024-9-17', 2025 => '2025-10-6', 2026 => '2026-9-25', 2027 => '2027-9-15', 2028 => '2028-10-3', + 2029 => '2029-9-22', 2030 => '2030-9-12', 2031 => '2031-10-1', 2032 => '2032-9-19', 2033 => '2033-9-8', + 2034 => '2034-9-27', 2035 => '2035-9-16', 2036 => '2036-10-4', 2037 => '2037-9-24', 2038 => '2038-9-13', + 2039 => '2039-10-2', 2040 => '2040-9-21', 2041 => '2041-9-10', 2042 => '2042-9-28', 2043 => '2043-9-17', + 2044 => '2044-10-5', 2045 => '2045-9-25', 2046 => '2046-9-15', 2047 => '2047-10-4', 2048 => '2048-9-22', + 2049 => '2049-9-11', 2050 => '2050-9-30', + ], + ]; + + /** + * Initialize holidays for South Korea. + * + * @throws \Yasumi\Exception\InvalidDateException + * @throws \InvalidArgumentException + * @throws \Yasumi\Exception\UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + $this->timezone = 'Asia/Seoul'; + + // Add common holidays + $this->calculateNewYearsDay(); + if ($this->year >= 1949) { + $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale)); + } + + // Calculate lunar holidays + $this->calculateSeollal(); + $this->calculateBuddhasBirthday(); + $this->calculateChuseok(); + + // Calculate other holidays + $this->calculateIndependenceMovementDay(); + $this->calculateArborDay(); + $this->calculateChildrensDay(); + $this->calculateMemorialDay(); + $this->calculateConstitutionDay(); + $this->calculateLiberationDay(); + $this->calculateArmedForcesDay(); + $this->calculateNationalFoundationDay(); + $this->calculateHangulDay(); + $this->calculateSubstituteHolidays(); + } + + /** + * New Year's Day. New Year's Day is held on January 1st and established since 1950. + * From the enactment of the First Law to 1998, there was a two or three-day break in the New Year. + * + * @link https://en.wikipedia.org/wiki/New_Year%27s_Day#East_Asian + * + * @throws \Exception + */ + public function calculateNewYearsDay(): void + { + if ($this->year >= 1950) { + $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale)); + if ($this->year <= 1998) { + $this->addHoliday(new Holiday( + 'dayAfterNewYearsDay', + [], + new DateTime("$this->year-1-2", new DateTimeZone($this->timezone)), + $this->locale + )); + } + if ($this->year <= 1990) { + $this->addHoliday(new Holiday( + 'twoDaysLaterNewYearsDay', + ['en_US' => 'Two Days Later New Year\'s Day', 'ko_KR' => '새해 연휴'], + new DateTime("$this->year-1-3", new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + } + + /** + * Seollal (Korean New Year's Day). + * Seollal is held on the 1st day of the 1st lunar month and was established from 1985. + * + * @link https://en.wikipedia.org/wiki/Korean_New_Year + * + * @throws \Exception + */ + public function calculateSeollal() + { + if ($this->year >= 1985 and isset(self::LUNAR_HOLIDAY['seollal'][$this->year])) { + $seollal = new DateTime(self::LUNAR_HOLIDAY['seollal'][$this->year], new DateTimeZone($this->timezone)); + $this->addHoliday(new Holiday( + 'seollal', + ['en_US' => 'Seollal', 'ko_KR' => '설날'], + $seollal, + $this->locale + )); + if ($this->year > 1989) { + $dayBeforeSeollal = clone $seollal; + $dayBeforeSeollal->sub(new DateInterval('P1D')); + $this->addHoliday(new Holiday( + 'dayBeforeSeollal', + ['en_US' => 'Day before Seollal', 'ko_KR' => '설날 연휴'], + $dayBeforeSeollal, + $this->locale + )); + $dayAfterSeollal = clone $seollal; + $dayAfterSeollal->add(new DateInterval('P1D')); + $this->addHoliday(new Holiday( + 'dayAfterSeollal', + ['en_US' => 'Day after Seollal', 'ko_KR' => '설날 연휴'], + $dayAfterSeollal, + $this->locale + )); + } + } + } + + /** + * Independence Movement Day. Independence Movement Day is held on March 1st and was established from 1949. + * + * @link https://en.wikipedia.org/wiki/Independence_Movement_Day + * + * @throws \Exception + */ + public function calculateIndependenceMovementDay() + { + if ($this->year >= 1949) { + $this->addHoliday(new Holiday( + 'independenceMovementDay', + ['en_US' => 'Independence Movement Day', 'ko_KR' => '삼일절'], + new DateTime("$this->year-3-1", new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Sikmogil (Arbor Day). Sikmogil is held on May 5th and established since 1949. + * + * @link https://en.wikipedia.org/wiki/Sikmogil + * + * @throws \Exception + */ + public function calculateArborDay(): void + { + if ($this->year >= 1949 && $this->year < 1960 || $this->year > 1960 && $this->year < 2006) { + $this->addHoliday(new Holiday( + 'arborDay', + ['en_US' => 'Arbor Day', 'ko_KR' => '식목일'], + new DateTime("$this->year-4-5", new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Children's Day. Children's Day is held on May 5th and established since 1970. + * + * @link https://en.wikipedia.org/wiki/Children%27s_Day#South_Korea + * + * @throws \Exception + */ + public function calculateChildrensDay(): void + { + if ($this->year >= 1970) { + $this->addHoliday(new Holiday( + 'childrensDay', + ['en_US' => 'Children\'s Day', 'ko_KR' => '어린이날'], + new DateTime("$this->year-5-5", new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Buddha's Birthday is held on the 8th day of the 4th lunar month and was established since 1975. + * + * @link https://en.wikipedia.org/wiki/Buddha%27s_Birthday + * + * @throws \Exception + */ + public function calculateBuddhasBirthday() + { + if ($this->year >= 1975 and isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year])) { + $this->addHoliday(new Holiday( + 'buddhasBirthday', + ['en_US' => 'Buddha\'s Birthday', 'ko_KR' => '부처님오신날'], + new DateTime(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year], new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Memorial Day. Memorial Day is held on June 6th and established since 1956. + * + * @link https://en.wikipedia.org/wiki/Memorial_Day_(South_Korea) + * + * @throws \Exception + */ + public function calculateMemorialDay(): void + { + if ($this->year >= 1966) { + $this->addHoliday(new Holiday( + 'memorialDay', + ['en_US' => 'Memorial Day', 'ko_KR' => '현충일'], + new DateTime("$this->year-6-6", new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Constitution Day. + * + * Constitution Day is held on July 17th and established since 1949. + * Officially, it is a strict national holiday, but government offices and banks work normally after 2008. + * + * @link https://en.wikipedia.org/wiki/Constitution_Day_(South_Korea) + * + * @throws \Exception + */ + public function calculateConstitutionDay(): void + { + if ($this->year >= 1949 && $this->year < 2008) { + $this->addHoliday(new Holiday( + 'constitutionDay', + ['en_US' => 'Constitution Day', 'ko_KR' => '제헌절'], + new DateTime("$this->year-7-17", new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Liberation Day. Liberation Day is held on August 15th and established since 1949. + * + * @link https://en.wikipedia.org/wiki/National_Liberation_Day_of_Korea + * + * @throws \Exception + */ + public function calculateLiberationDay(): void + { + if ($this->year >= 1949) { + $this->addHoliday(new Holiday( + 'liberationDay', + ['en_US' => 'Liberation Day', 'ko_KR' => '광복절'], + new DateTime("$this->year-8-15", new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Chuseok (Korean Thanksgiving Day). + * + * Chuseok, one of the biggest holidays in Korea, is a major harvest festival and a three-day holiday celebrated on + * the 15th day of the 8th month of the lunar calendar on the full moon. + * + * @link https://en.wikipedia.org/wiki/Chuseok + * + * @throws \Exception + */ + public function calculateChuseok() + { + if ($this->year >= 1949 and isset(self::LUNAR_HOLIDAY['chuseok'][$this->year])) { + // Chuseok + $chuseok = new Holiday( + 'chuseok', + ['en_US' => 'Chuseok', 'ko_KR' => '추석'], + new DateTime(self::LUNAR_HOLIDAY['chuseok'][$this->year], new DateTimeZone($this->timezone)), + $this->locale + ); + $this->addHoliday($chuseok); + + // Day after Chuseok + if ($this->year >= 1986) { + $this->addHoliday(new Holiday( + 'dayAfterChuseok', + ['en_US' => 'Day after Chuseok', 'ko_KR' => '추석 연휴'], + (clone $chuseok)->add(new DateInterval('P1D')), + $this->locale + )); + } + + // Day before Chuseok + if ($this->year >= 1989) { + $this->addHoliday(new Holiday( + 'dayBeforeChuseok', + ['en_US' => 'Day before Chuseok', 'ko_KR' => '추석 연휴'], + (clone $chuseok)->sub(new DateInterval('P1D')), + $this->locale + )); + } + } + } + + /** + * Armed Forces Day. Armed Forces Day is held on October 1st and established since 1956. + * + * @link https://en.wikipedia.org/wiki/Armed_Forces_Day_(South_Korea) + * + * @throws \Exception + */ + public function calculateArmedForcesDay(): void + { + if ($this->year >= 1956 && $this->year <= 1990) { + $this->addHoliday(new Holiday( + 'armedForcesDay', + ['en_US' => 'Armed Forces Day', 'ko_KR' => '국군의 날'], + new DateTime("$this->year-10-1", new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Gaecheonjeol (National Foundation Day). Gaecheonjeol is held on October 3rd and established since 1949. + * + * @link https://en.wikipedia.org/wiki/Gaecheonjeol + * + * @throws \Exception + */ + public function calculateNationalFoundationDay(): void + { + if ($this->year >= 1949) { + $this->addHoliday(new Holiday( + 'nationalFoundationDay', + ['en_US' => 'National Foundation Day', 'ko_KR' => '개천절'], + new DateTime("$this->year-10-3", new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Hangul Day. Hangul Day is held on October 9th and established since 1949. + * + * @link https://en.wikipedia.org/wiki/Hangul_Day + * + * @throws \Exception + */ + public function calculateHangulDay(): void + { + if ($this->year >= 1949 && $this->year <= 1990 || $this->year > 2012) { + $this->addHoliday(new Holiday( + 'hangulDay', + ['en_US' => 'Hangul Day', 'ko_KR' => '한글날'], + new DateTime("$this->year-10-9", new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Substitute Holidays. + * related statutes: Article 3 Alternative Statutory Holidays of the Regulations on Holidays of Government Offices + * + * Since 2014, it has been applied only on Seollal, Chuseok and Children's Day. + * Due to the lunar calendar, public holidays can overlap even if it's not a Sunday. + * When public holidays fall each other, the first non-public holiday after the holiday become as a public holiday. + * As an exception, Children's Day also applies on Saturday. + * + * @throws \Exception + */ + public function calculateSubstituteHolidays(): void + { + if ($this->year > 2013) { + // Initialize holidays variable + $holidays = $this->getHolidays(); + $acceptedHolidays = [ + 'dayBeforeSeollal', 'seollal', 'dayAfterSeollal', + 'dayBeforeChuseok', 'chuseok', 'dayAfterChuseok', + 'childrensDay', + ]; + + // Loop through all holidays + foreach ($holidays as $shortName => $date) { + // Get list of holiday dates except this + $holidayDates = \array_map(function ($holiday) use ($shortName) { + return $holiday->shortName === $shortName ? false : (string)$holiday; + }, $holidays); + + // Only process accepted holidays and conditions + if (\in_array($shortName, $acceptedHolidays, true) + && ( + 0 === (int)$date->format('w') + || \in_array($date, $holidayDates, false) + || 6 === (int)$date->format('w') && $shortName === 'childrensDay' + ) + ) { + $substitute = clone $date; + + // Find next week day (not being another holiday) + while (0 === (int)$substitute->format('w') + || 6 === (int)$substitute->format('w') && $shortName === 'childrensDay' + || \in_array($substitute, $holidayDates, false)) { + $substitute->add(new DateInterval('P1D')); + continue; + } + + // Add a new holiday that is substituting the original holiday + $holiday = new Holiday("substituteHoliday:$substitute->shortName", [ + 'en_US' => $substitute->translations['en_US'] . ' Observed', + 'ko_KR' => '대체공휴일', + ], $substitute, $this->locale); + + // Add a new holiday that is substituting the original holiday + $this->addHoliday($holiday); + + // Add substitute holiday to the list + $holidays[] = $holiday; + } + } + } + } +} diff --git a/src/Yasumi/data/translations/christmasDay.php b/src/Yasumi/data/translations/christmasDay.php index db2c3c616..3e7da6ce4 100755 --- a/src/Yasumi/data/translations/christmasDay.php +++ b/src/Yasumi/data/translations/christmasDay.php @@ -35,6 +35,7 @@ 'hu_HU' => 'Karácsony', 'it_CH' => 'Natale', 'it_IT' => 'Natale', + 'ko_KR' => '기독탄신일', 'lt_LT' => 'Šv. Kalėdos', 'lv_LV' => 'Ziemassvētki', 'nb_NO' => 'Første juledag', diff --git a/src/Yasumi/data/translations/christmasEve.php b/src/Yasumi/data/translations/christmasEve.php index 4583a1143..8615c58c6 100755 --- a/src/Yasumi/data/translations/christmasEve.php +++ b/src/Yasumi/data/translations/christmasEve.php @@ -21,6 +21,7 @@ 'fr_BE' => 'Réveillon de Noël', 'fr_CH' => 'Réveillon de Noël', 'it_CH' => 'Vigilia di Natale', + 'ko_KR' => '크리스마스 이브', 'lt_LT' => 'Šv. Kūčios', 'lv_LV' => 'Ziemassvētku vakars', 'pt_PT' => 'Véspera de Natal', diff --git a/src/Yasumi/data/translations/dayAfterNewYearsDay.php b/src/Yasumi/data/translations/dayAfterNewYearsDay.php index ece5d9031..0a827e96d 100644 --- a/src/Yasumi/data/translations/dayAfterNewYearsDay.php +++ b/src/Yasumi/data/translations/dayAfterNewYearsDay.php @@ -14,4 +14,5 @@ return [ 'en_NZ' => 'Day after New Year\'s Day', 'en_US' => 'Day after New Year\'s Day', + 'ko_KR' => '새해 연휴', ]; diff --git a/src/Yasumi/data/translations/internationalWomensDay.php b/src/Yasumi/data/translations/internationalWomensDay.php index 74bff677b..9511db9ed 100755 --- a/src/Yasumi/data/translations/internationalWomensDay.php +++ b/src/Yasumi/data/translations/internationalWomensDay.php @@ -14,6 +14,7 @@ return [ 'de_DE' => 'Internationaler Frauentag', 'en_US' => 'International Women\'s Day', + 'ko_KR' => '국제 여성의 날', 'ru_RU' => 'Международный женский день', 'ru_UA' => 'Международный женский день', 'uk_UA' => 'Міжнародний жіночий день', diff --git a/src/Yasumi/data/translations/internationalWorkersDay.php b/src/Yasumi/data/translations/internationalWorkersDay.php index cea79b49d..3ddadc70a 100755 --- a/src/Yasumi/data/translations/internationalWorkersDay.php +++ b/src/Yasumi/data/translations/internationalWorkersDay.php @@ -32,6 +32,7 @@ 'it_CH' => 'Festa dei lavoratori', 'it_IT' => 'Festa del Lavoro', 'ja_JP' => '労働の日', + 'ko_KR' => '노동절', 'lt_LT' => 'Tarptautinė darbo diena', 'lv_LV' => 'Darba svētki', 'nb_NO' => 'Arbeidernes dag', diff --git a/src/Yasumi/data/translations/labourDay.php b/src/Yasumi/data/translations/labourDay.php index 50ebce393..bc2103ecb 100644 --- a/src/Yasumi/data/translations/labourDay.php +++ b/src/Yasumi/data/translations/labourDay.php @@ -16,6 +16,7 @@ 'en_NZ' => 'Labour Day', 'en_US' => 'Labour Day', 'ja_JP' => '労働の日', + 'ko_KR' => '노동절', 'nl_BE' => 'Dag van de arbeid', 'nl_NL' => 'Dag van de arbeid', 'sk_SK' => 'Sviatok práce', diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php index 77f3fbf7b..8e1cafdc7 100755 --- a/src/Yasumi/data/translations/newYearsDay.php +++ b/src/Yasumi/data/translations/newYearsDay.php @@ -38,6 +38,7 @@ 'it_CH' => 'Capodanno', 'it_IT' => 'Capodanno', 'ja_JP' => '元日', + 'ko_KR' => '새해', 'lt_LT' => 'Naujųjų metų diena', 'lv_LV' => 'Jaunais Gads', 'nb_NO' => 'Første nyttårsdag', diff --git a/src/Yasumi/data/translations/newYearsEve.php b/src/Yasumi/data/translations/newYearsEve.php index d080aa58a..0a6a6133c 100755 --- a/src/Yasumi/data/translations/newYearsEve.php +++ b/src/Yasumi/data/translations/newYearsEve.php @@ -14,5 +14,6 @@ return [ 'da_DK' => 'Nytårsaften', 'en_US' => 'New Year\'s Eve', + 'ko_KR' => '신년전야', 'lv_LV' => 'Vecgada vakars', ]; diff --git a/src/Yasumi/data/translations/secondChristmasDay.php b/src/Yasumi/data/translations/secondChristmasDay.php index 8dc5764b8..a3d8a9a94 100755 --- a/src/Yasumi/data/translations/secondChristmasDay.php +++ b/src/Yasumi/data/translations/secondChristmasDay.php @@ -25,6 +25,7 @@ 'et_EE' => 'Teine Jõulupüha', 'fi_FI' => '2. joulupäivä', 'hu_HU' => 'Karácsony másnapja', + 'ko_KR' => '성탄절 연휴', 'lt_LT' => 'Kalėdos (antra diena)', 'lv_LV' => 'Otrie Ziemassvētki', 'nb_NO' => 'Andre juledag', diff --git a/src/Yasumi/data/translations/summerTime.php b/src/Yasumi/data/translations/summerTime.php index 4e7cf2428..3ba814638 100644 --- a/src/Yasumi/data/translations/summerTime.php +++ b/src/Yasumi/data/translations/summerTime.php @@ -14,5 +14,6 @@ return [ 'da_DK' => 'Sommertid starter', 'en_US' => 'Summertime', + 'ko_KR' => '서머타임', 'nl_NL' => 'Zomertijd', ]; diff --git a/src/Yasumi/data/translations/valentinesDay.php b/src/Yasumi/data/translations/valentinesDay.php index 31abe86d9..065fbb4f9 100644 --- a/src/Yasumi/data/translations/valentinesDay.php +++ b/src/Yasumi/data/translations/valentinesDay.php @@ -20,6 +20,7 @@ 'fr_CH' => 'Saint-Valentin', 'it_CH' => 'San Valentino', 'ja_JP' => 'バレンタイン·デー', + 'ko_KR' => '발렌타인 데이', 'nl_BE' => 'Valentijnsdag', 'nl_NL' => 'Valentijnsdag', 'pl_PL' => 'Walentynki', diff --git a/tests/SouthKorea/ArborDayTest.php b/tests/SouthKorea/ArborDayTest.php new file mode 100644 index 000000000..b74bbe816 --- /dev/null +++ b/tests/SouthKorea/ArborDayTest.php @@ -0,0 +1,124 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing day after Arbor Day in South Korea. + */ +class ArborDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'arborDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1949; + + /** + * The year in which the holiday was removed + */ + public const REMOVED_YEAR = 2005; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); + if ($year === 1960) { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $year + ); + } else { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-4-5", new DateTimeZone(self::TIMEZONE)) + ); + } + } + + /** + * Tests the holiday defined in this test after removal. + * @throws \ReflectionException + */ + public function testHolidayAfterRemoval() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::REMOVED_YEAR + 1) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); + if ($year !== 1960) { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => '식목일'] + ); + } + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); + if ($year !== 1960) { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $year, + Holiday::TYPE_OFFICIAL + ); + } + } +} diff --git a/tests/SouthKorea/ArmedForcesDayTest.php b/tests/SouthKorea/ArmedForcesDayTest.php new file mode 100644 index 000000000..4458b2cb5 --- /dev/null +++ b/tests/SouthKorea/ArmedForcesDayTest.php @@ -0,0 +1,110 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing day after Armed Forces Day in South Korea. + */ +class ArmedForcesDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'armedForcesDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1956; + + /** + * The year in which the holiday was removed + */ + public const REMOVED_YEAR = 1990; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-10-1", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test after removal. + * @throws \ReflectionException + */ + public function testHolidayAfterRemoval() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::REMOVED_YEAR + 1) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), + [self::LOCALE => '국군의 날'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/SouthKorea/BuddhasBirthdayTest.php b/tests/SouthKorea/BuddhasBirthdayTest.php new file mode 100644 index 000000000..7571d44a1 --- /dev/null +++ b/tests/SouthKorea/BuddhasBirthdayTest.php @@ -0,0 +1,101 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\Provider\SouthKorea; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Buddha's Birthday in South Korea. + */ +class BuddhasBirthdayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'buddhasBirthday'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1975; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); + if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year], new DateTimeZone(self::TIMEZONE)) + ); + } + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); + if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => '부처님오신날'] + ); + } + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); + if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $year, + Holiday::TYPE_OFFICIAL + ); + } + } +} diff --git a/tests/SouthKorea/ChildrensDayTest.php b/tests/SouthKorea/ChildrensDayTest.php new file mode 100644 index 000000000..2388494bf --- /dev/null +++ b/tests/SouthKorea/ChildrensDayTest.php @@ -0,0 +1,141 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Children's Day in South Korea. + */ +class ChildrensDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'childrensDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1970; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testMainHoliday() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-5-5", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the substitute holiday defined in this test (conflict with Buddha's Birthday). + * @throws \Exception + * @throws \ReflectionException + */ + public function testSubstituteHolidayByBuddhasBirthday() + { + foreach ([2025, 2044] as $year) { + $this->assertHoliday( + self::REGION, + 'substituteHoliday:childrensDay', + $year, + new DateTime("$year-5-6", new DateTimeZone(self::TIMEZONE)) + ); + } + } + + /** + * Tests the substitute holiday defined in this test (conflict with Saturday). + * @throws \Exception + * @throws \ReflectionException + */ + public function testSubstituteHolidayBySaturday() + { + $year = 2029; + $this->assertHoliday( + self::REGION, + 'substituteHoliday:childrensDay', + $year, + new DateTime("$year-5-7", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the substitute holiday defined in this test (conflict with Sunday). + * @throws \Exception + * @throws \ReflectionException + */ + public function testSubstituteHolidayBySunday() + { + $year = 2019; + $this->assertHoliday( + self::REGION, + 'substituteHoliday:childrensDay', + $year, + new DateTime("$year-5-6", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => '어린이날'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/SouthKorea/ChristmasDayTest.php b/tests/SouthKorea/ChristmasDayTest.php new file mode 100644 index 000000000..526630edc --- /dev/null +++ b/tests/SouthKorea/ChristmasDayTest.php @@ -0,0 +1,92 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Christmas Day in South Korea. + */ +class ChristmasDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'christmasDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1949; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => '기독탄신일'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/SouthKorea/ChuseokTest.php b/tests/SouthKorea/ChuseokTest.php new file mode 100644 index 000000000..600b70db9 --- /dev/null +++ b/tests/SouthKorea/ChuseokTest.php @@ -0,0 +1,207 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\Provider\SouthKorea; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Chuseok in South Korea. + */ +class ChuseokTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'chuseok'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1949; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); + if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { + $date = new DateTime(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year], new DateTimeZone(self::TIMEZONE)); + + // Chuseok + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + + // Day after Chuseok + if ($year >= 1986) { + $this->assertHoliday( + self::REGION, + 'dayAfterChuseok', + $year, + (clone $date)->add(new DateInterval('P1D')) + ); + } + + // Day before Chuseok + if ($year >= 1989) { + $this->assertHoliday( + self::REGION, + 'dayBeforeChuseok', + $year, + (clone $date)->sub(new DateInterval('P1D')) + ); + } + } + } + + /** + * Tests the substitute holiday defined in this test (conflict with Gaecheonjeol). + * @throws \Exception + * @throws \ReflectionException + */ + public function testSubstituteHolidayByGaecheonjeol() + { + $this->assertHoliday( + self::REGION, + 'substituteHoliday:dayBeforeChuseok', + 2017, + new DateTime("2017-10-6", new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + 'substituteHoliday:chuseok', + 2028, + new DateTime("2028-10-5", new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + 'substituteHoliday:dayAfterChuseok', + 2039, + new DateTime("2039-10-5", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the substitute holiday defined in this test (conflict with Sunday). + * @throws \Exception + * @throws \ReflectionException + */ + public function testSubstituteHolidayBySunday() + { + $this->assertHoliday( + self::REGION, + 'substituteHoliday:dayBeforeChuseok', + 2014, + new DateTime("2014-9-10", new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + 'substituteHoliday:chuseok', + 2039, + new DateTime("2039-10-4", new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + 'substituteHoliday:dayAfterChuseok', + 2022, + new DateTime("2022-9-12", new DateTimeZone(self::TIMEZONE)) + ); + } + + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); + if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => '추석'] + ); + if ($year >= 1986) { + $this->assertTranslatedHolidayName( + self::REGION, + 'dayAfterChuseok', + $year, + [self::LOCALE => '추석 연휴'] + ); + } + if ($year >= 1986) { + $this->assertTranslatedHolidayName( + self::REGION, + 'dayBeforeChuseok', + $year, + [self::LOCALE => '추석 연휴'] + ); + } + } + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); + if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $year, + Holiday::TYPE_OFFICIAL + ); + if ($year >= 1986) { + $this->assertHolidayType( + self::REGION, + 'dayAfterChuseok', + $year, + Holiday::TYPE_OFFICIAL + ); + } + if ($year >= 1989) { + $this->assertHolidayType( + self::REGION, + 'dayBeforeChuseok', + $year, + Holiday::TYPE_OFFICIAL + ); + } + } + } +} diff --git a/tests/SouthKorea/ConstitutionDayTest.php b/tests/SouthKorea/ConstitutionDayTest.php new file mode 100644 index 000000000..339252313 --- /dev/null +++ b/tests/SouthKorea/ConstitutionDayTest.php @@ -0,0 +1,110 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing day after Constitution Day in South Korea. + */ +class ConstitutionDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'constitutionDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1949; + + /** + * The year in which the holiday was removed + */ + public const REMOVED_YEAR = 2007; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-7-17", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test after removal. + * @throws \ReflectionException + */ + public function testHolidayAfterRemoval() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::REMOVED_YEAR + 1) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), + [self::LOCALE => '제헌절'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/SouthKorea/GaecheonjeolTest.php b/tests/SouthKorea/GaecheonjeolTest.php new file mode 100644 index 000000000..728cface9 --- /dev/null +++ b/tests/SouthKorea/GaecheonjeolTest.php @@ -0,0 +1,92 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Gaecheonjeol (National Foundation Day) in South Korea. + */ +class GaecheonjeolTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'nationalFoundationDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1949; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-10-3", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => '개천절'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/SouthKorea/HangulDayTest.php b/tests/SouthKorea/HangulDayTest.php new file mode 100644 index 000000000..17f59cba7 --- /dev/null +++ b/tests/SouthKorea/HangulDayTest.php @@ -0,0 +1,106 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Hangul Day in South Korea. + */ +class HangulDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'hangulDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1949; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + if ($year > 1990 && $year <= 2012) { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $year + ); + } else { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-10-9", new DateTimeZone(self::TIMEZONE)) + ); + } + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + if ($year <= 1990 || $year > 2012) { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => '한글날'] + ); + } + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + if ($year <= 1990 || $year > 2012) { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $year, + Holiday::TYPE_OFFICIAL + ); + } + } +} diff --git a/tests/SouthKorea/IndependenceMovementDayTest.php b/tests/SouthKorea/IndependenceMovementDayTest.php new file mode 100644 index 000000000..b52013b85 --- /dev/null +++ b/tests/SouthKorea/IndependenceMovementDayTest.php @@ -0,0 +1,92 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Independence Movement Day in South Korea. + */ +class IndependenceMovementDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'independenceMovementDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1949; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-3-1", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => '삼일절'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/SouthKorea/LiberationDayTest.php b/tests/SouthKorea/LiberationDayTest.php new file mode 100644 index 000000000..ae398f8b7 --- /dev/null +++ b/tests/SouthKorea/LiberationDayTest.php @@ -0,0 +1,92 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Independence Movement Day in South Korea. + */ +class LiberationDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'liberationDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1949; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-8-15", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => '광복절'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/SouthKorea/MemorialDayTest.php b/tests/SouthKorea/MemorialDayTest.php new file mode 100644 index 000000000..16b2b69b6 --- /dev/null +++ b/tests/SouthKorea/MemorialDayTest.php @@ -0,0 +1,92 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Memorial Day in South Korea. + */ +class MemorialDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'memorialDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1966; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-6-6", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => '현충일'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/SouthKorea/NewYearsDayTest.php b/tests/SouthKorea/NewYearsDayTest.php new file mode 100644 index 000000000..e1b489ea4 --- /dev/null +++ b/tests/SouthKorea/NewYearsDayTest.php @@ -0,0 +1,153 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing New Year's Day in South Korea. + */ +class NewYearsDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'newYearsDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1950; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)); + + // New Year's Day + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + + // Day after New Year's Day + if ($year <= 1998) { + $this->assertHoliday( + self::REGION, + 'dayAfterNewYearsDay', + $year, + (clone $date)->add(new DateInterval('P1D')) + ); + } + + // Two days later New Year's Day + if ($year <= 1990) { + $this->assertHoliday( + self::REGION, + 'twoDaysLaterNewYearsDay', + $year, + (clone $date)->add(new DateInterval('P2D')) + ); + } + } + + /** + * Tests the holiday defined in this test after removal. + * @throws \ReflectionException + */ + public function testHolidayAfterRemoval() + { + $this->assertNotHoliday( + self::REGION, + 'dayAfterNewYearsDay', + $this->generateRandomYear(1999) + ); + $this->assertNotHoliday( + self::REGION, + 'twoDaysLaterNewYearsDay', + $this->generateRandomYear(1991) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => '새해'] + ); + $this->assertTranslatedHolidayName( + self::REGION, + 'dayAfterNewYearsDay', + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1998), + [self::LOCALE => '새해 연휴'] + ); + $this->assertTranslatedHolidayName( + self::REGION, + 'twoDaysLaterNewYearsDay', + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1990), + [self::LOCALE => '새해 연휴'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_OFFICIAL + ); + $this->assertHolidayType( + self::REGION, + 'dayAfterNewYearsDay', + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1998), + Holiday::TYPE_OFFICIAL + ); + $this->assertHolidayType( + self::REGION, + 'twoDaysLaterNewYearsDay', + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1990), + Holiday::TYPE_OFFICIAL + ); + } +} diff --git a/tests/SouthKorea/SeollalTest.php b/tests/SouthKorea/SeollalTest.php new file mode 100644 index 000000000..80b705e4d --- /dev/null +++ b/tests/SouthKorea/SeollalTest.php @@ -0,0 +1,173 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\Provider\SouthKorea; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Seollal (Korean New Year's Day) in South Korea. + */ +class SeollalTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'seollal'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1985; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); + if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { + $date = new DateTime(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year], new DateTimeZone(self::TIMEZONE)); + + // Seollal + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + + if ($year >= 1990) { + // Day before Seollal + $this->assertHoliday( + self::REGION, + 'dayBeforeSeollal', + $year, + (clone $date)->sub(new DateInterval('P1D')) + ); + + // Day after Seollal + $this->assertHoliday( + self::REGION, + 'dayAfterSeollal', + $year, + (clone $date)->add(new DateInterval('P1D')) + ); + } + } + } + + /** + * Tests the substitute holiday defined in this test (conflict with Sunday). + * @throws \Exception + * @throws \ReflectionException + */ + public function testSubstituteHolidayBySunday() + { + $this->assertHoliday( + self::REGION, + 'substituteHoliday:dayBeforeSeollal', + 2016, + new DateTime("2016-2-10", new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + 'substituteHoliday:seollal', + 2034, + new DateTime("2034-2-21", new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + 'substituteHoliday:dayAfterSeollal', + 2024, + new DateTime("2024-2-12", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); + if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $year, + [self::LOCALE => '설날'] + ); + if ($year >= 1990) { + $this->assertHolidayType( + self::REGION, + 'dayBeforeSeollal', + $year, + Holiday::TYPE_OFFICIAL + ); + $this->assertHolidayType( + self::REGION, + 'dayAfterSeollal', + $year, + Holiday::TYPE_OFFICIAL + ); + } + } + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2050); + if (isset(SouthKorea::LUNAR_HOLIDAY[self::HOLIDAY][$year])) { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $year, + Holiday::TYPE_OFFICIAL + ); + if ($year >= 1990) { + $this->assertHolidayType( + self::REGION, + 'dayBeforeSeollal', + $year, + Holiday::TYPE_OFFICIAL + ); + $this->assertHolidayType( + self::REGION, + 'dayAfterSeollal', + $year, + Holiday::TYPE_OFFICIAL + ); + } + } + } +} diff --git a/tests/SouthKorea/SouthKoreaBaseTestCase.php b/tests/SouthKorea/SouthKoreaBaseTestCase.php new file mode 100644 index 000000000..b42d46c4b --- /dev/null +++ b/tests/SouthKorea/SouthKoreaBaseTestCase.php @@ -0,0 +1,40 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use PHPUnit\Framework\TestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the South Korea holiday provider. + */ +abstract class SouthKoreaBaseTestCase extends TestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'SouthKorea'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'Asia/Seoul'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'ko_KR'; +} diff --git a/tests/SouthKorea/SouthKoreaTest.php b/tests/SouthKorea/SouthKoreaTest.php new file mode 100644 index 000000000..96b07ba7e --- /dev/null +++ b/tests/SouthKorea/SouthKoreaTest.php @@ -0,0 +1,134 @@ + + */ + +namespace Yasumi\tests\SouthKorea; + +use Yasumi\Holiday; +use Yasumi\Provider\SouthKorea; + +/** + * Class for testing holidays in South Korea. + */ +class SouthKoreaTest extends SouthKoreaBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in South Korea are defined by the provider class + * @throws \ReflectionException + */ + public function testOfficialHolidays(): void + { + $officialHolidays = []; + if ($this->year >= 1949) { + $officialHolidays[] = 'independenceMovementDay'; + $officialHolidays[] = 'liberationDay'; + $officialHolidays[] = 'nationalFoundationDay'; + $officialHolidays[] = 'christmasDay'; + if ($this->year !== 1960 && $this->year < 2006) { + $officialHolidays[] = 'arborDay'; + } + if ($this->year <= 1990 || $this->year > 2012) { + $officialHolidays[] = 'hangulDay'; + } + if ($this->year < 2008) { + $officialHolidays[] = 'constitutionDay'; + } + } + if ($this->year >= 1950) { + $officialHolidays[] = 'newYearsDay'; + if ($this->year <= 1990) { + $officialHolidays[] = 'twoDaysLaterNewYearsDay'; + } + if ($this->year <= 1998) { + $officialHolidays[] = 'dayAfterNewYearsDay'; + } + } + if ($this->year >= 1956 && $this->year <= 1990) { + $officialHolidays[] = 'armedForcesDay'; + } + if ($this->year >= 1966) { + $officialHolidays[] = 'memorialDay'; + } + + // specific cases (Seollal, Buddha's Birthday and Chuseok) + if ($this->year >= 1949 && isset(SouthKorea::LUNAR_HOLIDAY['chuseok'][$this->year])) { + $officialHolidays[] = 'chuseok'; + if ($this->year >= 1986) { + $officialHolidays[] = 'dayAfterChuseok'; + } + if ($this->year >= 1989) { + $officialHolidays[] = 'dayBeforeChuseok'; + } + } + if ($this->year >= 1975 && isset(SouthKorea::LUNAR_HOLIDAY['buddhasBirthday'][$this->year])) { + $officialHolidays[] = 'buddhasBirthday'; + } + if ($this->year >= 1985 && isset(SouthKorea::LUNAR_HOLIDAY['seollal'][$this->year])) { + $officialHolidays[] = 'seollal'; + if ($this->year > 1989) { + $officialHolidays[] = 'dayBeforeSeollal'; + $officialHolidays[] = 'dayAfterSeollal'; + } + } + + $this->assertDefinedHolidays($officialHolidays, self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in South Korea are defined by the provider class + * @throws \ReflectionException + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in South Korea are defined by the provider class + * @throws \ReflectionException + */ + public function testSeasonalHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_SEASON); + } + + /** + * Tests if all bank holidays in South Korea are defined by the provider class + * @throws \ReflectionException + */ + public function testBankHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_BANK); + } + + /** + * Tests if all other holidays in South Korea are defined by the provider class + * @throws \ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * Initial setup of this Test Case + */ + protected function setUp() + { + $this->year = $this->generateRandomYear(1949, 2050); + } +} From 55e4b25235918ac50c50741e5cb7d3e7bf765698 Mon Sep 17 00:00:00 2001 From: pioc92 Date: Tue, 28 May 2019 04:07:09 +0200 Subject: [PATCH 032/133] Update AssumptionOfMaryTest.php (#155) Change fr_FR locale translation --- src/Yasumi/data/translations/assumptionOfMary.php | 2 +- tests/France/AssumptionOfMaryTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/data/translations/assumptionOfMary.php b/src/Yasumi/data/translations/assumptionOfMary.php index 7b3c4e52d..848e19b77 100755 --- a/src/Yasumi/data/translations/assumptionOfMary.php +++ b/src/Yasumi/data/translations/assumptionOfMary.php @@ -20,7 +20,7 @@ 'es_ES' => 'Asunción de la Virgen María', 'fr_BE' => 'Assomption', 'fr_CH' => 'Assomption', - 'fr_FR' => 'L\'Assomption de Marie', + 'fr_FR' => 'Assomption', 'hr_HR' => 'Velika Gospa', 'it_CH' => 'Assunzione', 'it_IT' => 'Assunzione di Maria Vergine', diff --git a/tests/France/AssumptionOfMaryTest.php b/tests/France/AssumptionOfMaryTest.php index a0910dd37..961b8f679 100644 --- a/tests/France/AssumptionOfMaryTest.php +++ b/tests/France/AssumptionOfMaryTest.php @@ -51,7 +51,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'L\'Assomption de Marie'] + [self::LOCALE => 'Assomption'] ); } From abbe7aebeea7c132918432ef68773c2735a1bfed Mon Sep 17 00:00:00 2001 From: pioc92 Date: Tue, 28 May 2019 04:17:11 +0200 Subject: [PATCH 033/133] Update VictoryInEuropeDayTest.php (#153) Change fr_FR locale translation. --- src/Yasumi/data/translations/victoryInEuropeDay.php | 2 +- tests/France/VictoryInEuropeDayTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/data/translations/victoryInEuropeDay.php b/src/Yasumi/data/translations/victoryInEuropeDay.php index b02aa3dc3..f85548344 100644 --- a/src/Yasumi/data/translations/victoryInEuropeDay.php +++ b/src/Yasumi/data/translations/victoryInEuropeDay.php @@ -14,6 +14,6 @@ return [ 'cs_CZ' => 'Den vítězství', 'en_US' => 'Victory in Europe Day', - 'fr_FR' => 'Fête de la Victoire', + 'fr_FR' => 'Victoire 1945', 'sk_SK' => 'Deň víťazstva nad fašizmom', ]; diff --git a/tests/France/VictoryInEuropeDayTest.php b/tests/France/VictoryInEuropeDayTest.php index a4ab98d11..017034e55 100644 --- a/tests/France/VictoryInEuropeDayTest.php +++ b/tests/France/VictoryInEuropeDayTest.php @@ -71,7 +71,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Fête de la Victoire'] + [self::LOCALE => 'Victoire 1945'] ); } From 0253728d3217bb7e90a144460c18031d1b8bf2f0 Mon Sep 17 00:00:00 2001 From: pioc92 Date: Tue, 28 May 2019 13:48:07 +0200 Subject: [PATCH 034/133] Update ArmisticeDayTest.php (#154) Update locale fr_FR translation. --- src/Yasumi/data/translations/armisticeDay.php | 2 +- tests/France/ArmisticeDayTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/data/translations/armisticeDay.php b/src/Yasumi/data/translations/armisticeDay.php index 3649e008d..6ab487c99 100644 --- a/src/Yasumi/data/translations/armisticeDay.php +++ b/src/Yasumi/data/translations/armisticeDay.php @@ -15,6 +15,6 @@ 'el_GR' => 'Ημέρα Ανακωχής', 'en_US' => 'Armistice Day', 'fr_BE' => 'Armistice', - 'fr_FR' => 'Armistice', + 'fr_FR' => 'Armistice 1918', 'nl_BE' => 'Wapenstilstand', ]; diff --git a/tests/France/ArmisticeDayTest.php b/tests/France/ArmisticeDayTest.php index e6cc7c4b2..2e236b019 100644 --- a/tests/France/ArmisticeDayTest.php +++ b/tests/France/ArmisticeDayTest.php @@ -71,7 +71,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Armistice'] + [self::LOCALE => 'Armistice 1918'] ); } From e24a2abc4803933ef3596240bac61d2258a6dac2 Mon Sep 17 00:00:00 2001 From: pioc92 Date: Tue, 28 May 2019 13:52:52 +0200 Subject: [PATCH 035/133] Update AllSaintsDayTest.php (#152) Changed fr_FR locale translation. --- src/Yasumi/data/translations/allSaintsDay.php | 2 +- tests/France/AllSaintsDayTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Yasumi/data/translations/allSaintsDay.php b/src/Yasumi/data/translations/allSaintsDay.php index 8ec5ec68a..bd3314d1c 100755 --- a/src/Yasumi/data/translations/allSaintsDay.php +++ b/src/Yasumi/data/translations/allSaintsDay.php @@ -21,7 +21,7 @@ 'fi_FI' => 'Pyhäinpäivä', 'fr_BE' => 'La Toussaint', 'fr_CH' => 'Toussaint', - 'fr_FR' => 'La Toussaint', + 'fr_FR' => 'Toussaint', 'hr_HR' => 'Dan svih svetih', 'hu_HU' => 'Mindenszentek', 'it_CH' => 'Ognissanti', diff --git a/tests/France/AllSaintsDayTest.php b/tests/France/AllSaintsDayTest.php index f7baff4bf..ea4270967 100644 --- a/tests/France/AllSaintsDayTest.php +++ b/tests/France/AllSaintsDayTest.php @@ -51,7 +51,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'La Toussaint'] + [self::LOCALE => 'Toussaint'] ); } From 3ccf4bc62c12691ff37043cb55080b1c89b8a3d5 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Tue, 28 May 2019 21:21:27 +0900 Subject: [PATCH 036/133] Create FUNDING.yml --- .github/FUNDING.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..c45bebdb6 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,8 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +custom: https://www.buymeacoffee.com/sachatelgenhof From 4345bd061d3e2838f6da893ff5c1d6c3afb3c033 Mon Sep 17 00:00:00 2001 From: pioc92 Date: Thu, 30 May 2019 02:13:18 +0200 Subject: [PATCH 037/133] Update easter.php (#146) Add easter fr_FR translation --- src/Yasumi/data/translations/easter.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Yasumi/data/translations/easter.php b/src/Yasumi/data/translations/easter.php index d9fc59fc1..2664faaa3 100644 --- a/src/Yasumi/data/translations/easter.php +++ b/src/Yasumi/data/translations/easter.php @@ -25,6 +25,7 @@ 'fi_FI' => 'Pääsiäispäivä', 'fr_BE' => 'Pâques', 'fr_CH' => 'Pâques', + 'fr_FR' => 'Pâques', 'ga_IE' => 'Domhnach Cásca', 'hr_HR' => 'Uskrs', 'hu_HU' => 'Húsvét', From 48bb8c5ca31ba7a9ecc0fab51c1fc1a51e6b0273 Mon Sep 17 00:00:00 2001 From: Quentin Neyrat Date: Sat, 1 Jun 2019 05:26:13 +0200 Subject: [PATCH 038/133] Add new exceptions in Yasumi. (#95) --- src/Yasumi/Exception/InvalidYearException.php | 22 +++++++++++++++++ .../Exception/ProviderNotFoundException.php | 22 +++++++++++++++++ src/Yasumi/Yasumi.php | 24 ++++++++++--------- 3 files changed, 57 insertions(+), 11 deletions(-) create mode 100644 src/Yasumi/Exception/InvalidYearException.php create mode 100644 src/Yasumi/Exception/ProviderNotFoundException.php diff --git a/src/Yasumi/Exception/InvalidYearException.php b/src/Yasumi/Exception/InvalidYearException.php new file mode 100644 index 000000000..d4edfa856 --- /dev/null +++ b/src/Yasumi/Exception/InvalidYearException.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\Exception; + +use InvalidArgumentException; + +/** + * Class InvalidYearException. + */ +class InvalidYearException extends InvalidArgumentException implements Exception +{ +} diff --git a/src/Yasumi/Exception/ProviderNotFoundException.php b/src/Yasumi/Exception/ProviderNotFoundException.php new file mode 100644 index 000000000..5eb090b20 --- /dev/null +++ b/src/Yasumi/Exception/ProviderNotFoundException.php @@ -0,0 +1,22 @@ + + */ + +namespace Yasumi\Exception; + +use InvalidArgumentException; + +/** + * Class ProviderNotFoundException. + */ +class ProviderNotFoundException extends InvalidArgumentException implements Exception +{ +} diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index fbc1a833c..8a74cd76e 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -18,6 +18,8 @@ use RecursiveIteratorIterator; use ReflectionClass; use RuntimeException; +use Yasumi\Exception\InvalidYearException; +use Yasumi\Exception\ProviderNotFoundException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Provider\AbstractProvider; @@ -114,10 +116,10 @@ public static function nextWorkingDay( * @param string $locale The locale to use. If empty we'll use the default locale (en_US) * * @throws \ReflectionException - * @throws RuntimeException If no such holiday provider is found - * @throws InvalidArgumentException if the year parameter is not between 1000 and 9999 - * @throws UnknownLocaleException if the locale parameter is invalid - * @throws InvalidArgumentException if the holiday provider for the given country does not exist + * @throws RuntimeException If no such holiday provider is found + * @throws InvalidYearException if the year parameter is not between 1000 and 9999 + * @throws UnknownLocaleException if the locale parameter is invalid + * @throws ProviderNotFoundException if the holiday provider for the given country does not exist * * @return AbstractProvider An instance of class $class is created and returned */ @@ -131,12 +133,12 @@ public static function create(string $class, int $year = 0, string $locale = sel } if ($class === 'AbstractProvider' || ! \class_exists($providerClass)) { - throw new InvalidArgumentException(\sprintf('Unable to find holiday provider "%s".', $class)); + throw new ProviderNotFoundException(\sprintf('Unable to find holiday provider "%s".', $class)); } // Assert year input if ($year < 1000 || $year > 9999) { - throw new InvalidArgumentException(\sprintf('Year needs to be between 1000 and 9999 (%s given).', $year)); + throw new InvalidYearException(\sprintf('Year needs to be between 1000 and 9999 (%s given).', $year)); } // Load internal locales variable @@ -181,10 +183,10 @@ public static function getAvailableLocales(): array * @param string $locale The locale to use. If empty we'll use the default locale (en_US) * * @throws \ReflectionException - * @throws RuntimeException If no such holiday provider is found - * @throws InvalidArgumentException if the year parameter is not between 1000 and 9999 - * @throws UnknownLocaleException if the locale parameter is invalid - * @throws InvalidArgumentException if the holiday provider for the given ISO3166-2 code does not exist + * @throws RuntimeException If no such holiday provider is found + * @throws InvalidArgumentException if the year parameter is not between 1000 and 9999 + * @throws UnknownLocaleException if the locale parameter is invalid + * @throws ProviderNotFoundException if the holiday provider for the given ISO3166-2 code does not exist * * @return AbstractProvider An instance of class $class is created and returned */ @@ -196,7 +198,7 @@ public static function createByISO3166_2( $availableProviders = self::getProviders(); if (false === isset($availableProviders[$iso3166_2])) { - throw new InvalidArgumentException(\sprintf( + throw new ProviderNotFoundException(\sprintf( 'Unable to find holiday provider by ISO3166-2 "%s".', $iso3166_2 )); From f9c397f97a1a7c460d99831c95f88027952e6976 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Oude Koehorst Date: Sat, 1 Jun 2019 12:31:21 +0900 Subject: [PATCH 039/133] Updated file header (Copyright) and author tags. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Exception/InvalidYearException.php | 6 ++++-- src/Yasumi/Exception/ProviderNotFoundException.php | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Yasumi/Exception/InvalidYearException.php b/src/Yasumi/Exception/InvalidYearException.php index d4edfa856..d78580b58 100644 --- a/src/Yasumi/Exception/InvalidYearException.php +++ b/src/Yasumi/Exception/InvalidYearException.php @@ -2,12 +2,12 @@ /** * This file is part of the Yasumi package. * - * Copyright (c) 2015 - 2018 AzuyaLabs + * Copyright (c) 2015 - 2019 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Quentin Neyrat + * @author Sacha Telgenhof */ namespace Yasumi\Exception; @@ -16,6 +16,8 @@ /** * Class InvalidYearException. + * + * @author Quentin Neyrat */ class InvalidYearException extends InvalidArgumentException implements Exception { diff --git a/src/Yasumi/Exception/ProviderNotFoundException.php b/src/Yasumi/Exception/ProviderNotFoundException.php index 5eb090b20..645c15c1f 100644 --- a/src/Yasumi/Exception/ProviderNotFoundException.php +++ b/src/Yasumi/Exception/ProviderNotFoundException.php @@ -2,12 +2,12 @@ /** * This file is part of the Yasumi package. * - * Copyright (c) 2015 - 2018 AzuyaLabs + * Copyright (c) 2015 - 2019 AzuyaLabs * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * - * @author Quentin Neyrat + * @author Sacha Telgenhof */ namespace Yasumi\Exception; @@ -16,6 +16,8 @@ /** * Class ProviderNotFoundException. + * + * @author Quentin Neyrat */ class ProviderNotFoundException extends InvalidArgumentException implements Exception { From fbf58a2ada3842b0ff288451a54bef19fec81b4d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Oude Koehorst Date: Sat, 1 Jun 2019 12:46:34 +0900 Subject: [PATCH 040/133] Adjusted tests so the recently added Exceptions are tested properly. Signed-off-by: Sacha Telgenhof --- tests/Base/YasumiTest.php | 62 ++++++++++++--------------------------- 1 file changed, 19 insertions(+), 43 deletions(-) diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index 90aed8147..8cf569dc4 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -40,7 +40,7 @@ class YasumiTest extends TestCase /** * Tests that an InvalidArgumentException is thrown in case an invalid year is given. * - * @expectedException InvalidArgumentException + * @expectedException \Yasumi\Exception\InvalidYearException * @throws \ReflectionException */ public function testCreateWithInvalidYear(): void @@ -51,7 +51,7 @@ public function testCreateWithInvalidYear(): void /** * Tests that an InvalidArgumentException is thrown in case an invalid holiday provider is given. * - * @expectedException InvalidArgumentException + * @expectedException \Yasumi\Exception\ProviderNotFoundException * @throws \ReflectionException */ public function testCreateWithInvalidProvider(): void @@ -88,10 +88,8 @@ public function testCreateWithAbstractClassProvider(): void public function testCreateWithAbstractExtension(): void { $class = YasumiExternalProvider::class; - $instance = Yasumi::create( - $class, - Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND) - ); + $instance = Yasumi::create($class, + Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND)); $this->assertInstanceOf($class, $instance); } @@ -103,11 +101,8 @@ public function testCreateWithAbstractExtension(): void */ public function testCreateWithInvalidLocale(): void { - Yasumi::create( - 'Japan', - Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND), - 'wx_YZ' - ); + Yasumi::create('Japan', Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND), + 'wx_YZ'); } /** @@ -116,10 +111,8 @@ public function testCreateWithInvalidLocale(): void */ public function testGetIterator(): void { - $holidays = Yasumi::create( - 'Japan', - Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND) - ); + $holidays = Yasumi::create('Japan', + Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND)); $this->assertInstanceOf(\ArrayIterator::class, $holidays->getIterator()); } @@ -176,12 +169,7 @@ public function testNext(): void $holidays = Yasumi::create($country, $year); - $this->assertHoliday( - $country, - $name, - $year + 1, - $holidays->next($name) - ); + $this->assertHoliday($country, $name, $year + 1, $holidays->next($name)); } /** @@ -192,10 +180,8 @@ public function testNext(): void */ public function testNextWithBlankName(): void { - $holidays = Yasumi::create( - 'Netherlands', - Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND - 1) - ); + $holidays = Yasumi::create('Netherlands', + Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND - 1)); $holidays->next(null); } @@ -213,12 +199,8 @@ public function testPrevious(): void $holidays = Yasumi::create($country, $year); - $this->assertHoliday( - $country, - $name, - (($year > $year_lower_limit) ? $year - 1 : $year_lower_limit), - $holidays->previous($name) - ); + $this->assertHoliday($country, $name, (($year > $year_lower_limit) ? $year - 1 : $year_lower_limit), + $holidays->previous($name)); } /** @@ -229,10 +211,8 @@ public function testPrevious(): void */ public function testPreviousWithBlankName(): void { - $holidays = Yasumi::create( - 'Netherlands', - Factory::create()->numberBetween(self::YEAR_LOWER_BOUND + 1, self::YEAR_UPPER_BOUND) - ); + $holidays = Yasumi::create('Netherlands', + Factory::create()->numberBetween(self::YEAR_LOWER_BOUND + 1, self::YEAR_UPPER_BOUND)); $holidays->previous(null); } @@ -412,10 +392,8 @@ public function testIsHolidayException(): void { $this->expectException(\TypeError::class); - Yasumi::create('Spain', Factory::create()->numberBetween( - self::YEAR_LOWER_BOUND, - self::YEAR_UPPER_BOUND - ))->isHoliday(new \stdClass()); + Yasumi::create('Spain', Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, + self::YEAR_UPPER_BOUND))->isHoliday(new \stdClass()); } /** @@ -487,10 +465,8 @@ public function testIsWorkingDayException(): void { $this->expectException(\TypeError::class); - Yasumi::create('SouthAfrica', Factory::create()->numberBetween( - self::YEAR_LOWER_BOUND, - self::YEAR_UPPER_BOUND - ))->isWorkingDay(new \stdClass()); + Yasumi::create('SouthAfrica', Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, + self::YEAR_UPPER_BOUND))->isWorkingDay(new \stdClass()); } /** From 5b2c9f94b1f57129b5943d7964c4e1abdaf06ded Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Oude Koehorst Date: Sat, 1 Jun 2019 12:47:42 +0900 Subject: [PATCH 041/133] Reformatting. Signed-off-by: Sacha Telgenhof --- tests/Base/YasumiTest.php | 51 +++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index 8cf569dc4..6172dfe91 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -88,8 +88,10 @@ public function testCreateWithAbstractClassProvider(): void public function testCreateWithAbstractExtension(): void { $class = YasumiExternalProvider::class; - $instance = Yasumi::create($class, - Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND)); + $instance = Yasumi::create( + $class, + Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND) + ); $this->assertInstanceOf($class, $instance); } @@ -101,8 +103,11 @@ public function testCreateWithAbstractExtension(): void */ public function testCreateWithInvalidLocale(): void { - Yasumi::create('Japan', Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND), - 'wx_YZ'); + Yasumi::create( + 'Japan', + Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND), + 'wx_YZ' + ); } /** @@ -111,8 +116,10 @@ public function testCreateWithInvalidLocale(): void */ public function testGetIterator(): void { - $holidays = Yasumi::create('Japan', - Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND)); + $holidays = Yasumi::create( + 'Japan', + Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND) + ); $this->assertInstanceOf(\ArrayIterator::class, $holidays->getIterator()); } @@ -180,8 +187,10 @@ public function testNext(): void */ public function testNextWithBlankName(): void { - $holidays = Yasumi::create('Netherlands', - Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND - 1)); + $holidays = Yasumi::create( + 'Netherlands', + Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND - 1) + ); $holidays->next(null); } @@ -199,8 +208,12 @@ public function testPrevious(): void $holidays = Yasumi::create($country, $year); - $this->assertHoliday($country, $name, (($year > $year_lower_limit) ? $year - 1 : $year_lower_limit), - $holidays->previous($name)); + $this->assertHoliday( + $country, + $name, + (($year > $year_lower_limit) ? $year - 1 : $year_lower_limit), + $holidays->previous($name) + ); } /** @@ -211,8 +224,10 @@ public function testPrevious(): void */ public function testPreviousWithBlankName(): void { - $holidays = Yasumi::create('Netherlands', - Factory::create()->numberBetween(self::YEAR_LOWER_BOUND + 1, self::YEAR_UPPER_BOUND)); + $holidays = Yasumi::create( + 'Netherlands', + Factory::create()->numberBetween(self::YEAR_LOWER_BOUND + 1, self::YEAR_UPPER_BOUND) + ); $holidays->previous(null); } @@ -392,8 +407,10 @@ public function testIsHolidayException(): void { $this->expectException(\TypeError::class); - Yasumi::create('Spain', Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, - self::YEAR_UPPER_BOUND))->isHoliday(new \stdClass()); + Yasumi::create('Spain', Factory::create()->numberBetween( + self::YEAR_LOWER_BOUND, + self::YEAR_UPPER_BOUND + ))->isHoliday(new \stdClass()); } /** @@ -465,8 +482,10 @@ public function testIsWorkingDayException(): void { $this->expectException(\TypeError::class); - Yasumi::create('SouthAfrica', Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, - self::YEAR_UPPER_BOUND))->isWorkingDay(new \stdClass()); + Yasumi::create('SouthAfrica', Factory::create()->numberBetween( + self::YEAR_LOWER_BOUND, + self::YEAR_UPPER_BOUND + ))->isWorkingDay(new \stdClass()); } /** From 9e9de5a1ea91a3df6ddc13ededf8d820aff09ca2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Oude Koehorst Date: Sat, 1 Jun 2019 13:23:39 +0900 Subject: [PATCH 042/133] Updated the changelog capturing all recent changes. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54e045d1d..c7a85c99a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,16 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ## [Unreleased] ### Added +- Holiday Provider for South Korea. [\#156](https://github.com/azuyalabs/yasumi/pull/156) ([blood72](https://github.com/blood72)) +- Translation for the Easter holiday for the 'fr_FR' locale [\#146](https://github.com/azuyalabs/yasumi/pull/146) ([pioc92](https://github.com/pioc92)) +- Translation for the Pentecoste holiday for the 'fr_FR' locale [\#145](https://github.com/azuyalabs/yasumi/pull/145) ([pioc92](https://github.com/pioc92)) ### Changed +- Replaced the standard 'InvalidArgumentException' when an invalid year or holiday provider are given by a new exception for each of these two situations separately ('InvalidYearException' and 'ProviderNotFoundException'). This allows you to better distinguish which exception may occur when instantiating the Yasumi class. [\#95](https://github.com/azuyalabs/yasumi/pull/95) ([qneyrat](https://github.com/qneyrat)) +- Updated the translation for the All Saints holiday for the 'fr_FR' locale [\#152](https://github.com/azuyalabs/yasumi/pull/152) ([pioc92](https://github.com/pioc92)) +- Updated the translation for the Armistice holiday for the 'fr_FR' locale [\#154](https://github.com/azuyalabs/yasumi/pull/154) ([pioc92](https://github.com/pioc92)) +- Updated the translation for the Victory in Europe holiday for the 'fr_FR' locale [\#153](https://github.com/azuyalabs/yasumi/pull/153) ([pioc92](https://github.com/pioc92)) +- Updated the translation for the Assumption of Mary holiday for the 'fr_FR' locale [\#155](https://github.com/azuyalabs/yasumi/pull/155) ([pioc92](https://github.com/pioc92)) ### Fixed From 5063c8b89702dde4324f1ba9b0a4fd76b7435228 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 4 Jul 2019 11:16:49 +0900 Subject: [PATCH 043/133] Added return type. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/SouthKorea.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 647e8383c..61e416499 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -185,7 +185,7 @@ public function calculateNewYearsDay(): void * * @throws \Exception */ - public function calculateSeollal() + public function calculateSeollal(): void { if ($this->year >= 1985 and isset(self::LUNAR_HOLIDAY['seollal'][$this->year])) { $seollal = new DateTime(self::LUNAR_HOLIDAY['seollal'][$this->year], new DateTimeZone($this->timezone)); @@ -223,7 +223,7 @@ public function calculateSeollal() * * @throws \Exception */ - public function calculateIndependenceMovementDay() + public function calculateIndependenceMovementDay(): void { if ($this->year >= 1949) { $this->addHoliday(new Holiday( @@ -280,7 +280,7 @@ public function calculateChildrensDay(): void * * @throws \Exception */ - public function calculateBuddhasBirthday() + public function calculateBuddhasBirthday(): void { if ($this->year >= 1975 and isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year])) { $this->addHoliday(new Holiday( @@ -362,7 +362,7 @@ public function calculateLiberationDay(): void * * @throws \Exception */ - public function calculateChuseok() + public function calculateChuseok(): void { if ($this->year >= 1949 and isset(self::LUNAR_HOLIDAY['chuseok'][$this->year])) { // Chuseok From 9a246fe717a30d2fc60d91b4a872bbc2c4747b41 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 4 Jul 2019 11:18:48 +0900 Subject: [PATCH 044/133] Use of '&&' is preferred over 'and'. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/SouthKorea.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 61e416499..49098a56e 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -187,7 +187,7 @@ public function calculateNewYearsDay(): void */ public function calculateSeollal(): void { - if ($this->year >= 1985 and isset(self::LUNAR_HOLIDAY['seollal'][$this->year])) { + if ($this->year >= 1985 && isset(self::LUNAR_HOLIDAY['seollal'][$this->year])) { $seollal = new DateTime(self::LUNAR_HOLIDAY['seollal'][$this->year], new DateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'seollal', @@ -282,7 +282,7 @@ public function calculateChildrensDay(): void */ public function calculateBuddhasBirthday(): void { - if ($this->year >= 1975 and isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year])) { + if ($this->year >= 1975 && isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year])) { $this->addHoliday(new Holiday( 'buddhasBirthday', ['en_US' => 'Buddha\'s Birthday', 'ko_KR' => '부처님오신날'], @@ -364,7 +364,7 @@ public function calculateLiberationDay(): void */ public function calculateChuseok(): void { - if ($this->year >= 1949 and isset(self::LUNAR_HOLIDAY['chuseok'][$this->year])) { + if ($this->year >= 1949 && isset(self::LUNAR_HOLIDAY['chuseok'][$this->year])) { // Chuseok $chuseok = new Holiday( 'chuseok', From d31c196b664ae705c3b22016f2dae3b03a9ecd5f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 4 Jul 2019 11:24:36 +0900 Subject: [PATCH 045/133] Corrected the establishment year to be consistent with the other unit tests and the Holiday Provider's calculation rules. Signed-off-by: Sacha Telgenhof --- tests/SouthKorea/ChuseokTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/SouthKorea/ChuseokTest.php b/tests/SouthKorea/ChuseokTest.php index 600b70db9..31dc37f0a 100644 --- a/tests/SouthKorea/ChuseokTest.php +++ b/tests/SouthKorea/ChuseokTest.php @@ -161,7 +161,7 @@ public function testTranslation(): void [self::LOCALE => '추석 연휴'] ); } - if ($year >= 1986) { + if ($year >= 1989) { $this->assertTranslatedHolidayName( self::REGION, 'dayBeforeChuseok', From 7ee47c5228155f1ebb7ccb6934c1c7fb37417d57 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 4 Jul 2019 11:29:27 +0900 Subject: [PATCH 046/133] Changed some anonymous functions to be static as binding to the class is not needed. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/BankHolidaysFilter.php | 2 +- src/Yasumi/Filters/BetweenFilter.php | 2 +- src/Yasumi/Filters/ObservedHolidaysFilter.php | 2 +- src/Yasumi/Filters/OfficialHolidaysFilter.php | 2 +- src/Yasumi/Filters/OnFilter.php | 2 +- src/Yasumi/Filters/OtherHolidaysFilter.php | 2 +- src/Yasumi/Filters/SeasonalHolidaysFilter.php | 2 +- src/Yasumi/Provider/AbstractProvider.php | 4 ++-- src/Yasumi/Provider/SouthKorea.php | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Yasumi/Filters/BankHolidaysFilter.php b/src/Yasumi/Filters/BankHolidaysFilter.php index edd1bc2f9..d3a30e5ad 100644 --- a/src/Yasumi/Filters/BankHolidaysFilter.php +++ b/src/Yasumi/Filters/BankHolidaysFilter.php @@ -45,7 +45,7 @@ public function count(): int { $days = \array_keys(\iterator_to_array($this)); - \array_walk($days, function (&$day) { + \array_walk($days, static function (&$day) { $day = \str_replace('substituteHoliday:', '', $day); }); diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index 8153c24a9..24633e4d4 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -86,7 +86,7 @@ public function count(): int { $days = \array_keys(\iterator_to_array($this)); - \array_walk($days, function (&$day) { + \array_walk($days, static function (&$day) { $day = \str_replace('substituteHoliday:', '', $day); }); diff --git a/src/Yasumi/Filters/ObservedHolidaysFilter.php b/src/Yasumi/Filters/ObservedHolidaysFilter.php index 58550e700..2ebe0ecad 100644 --- a/src/Yasumi/Filters/ObservedHolidaysFilter.php +++ b/src/Yasumi/Filters/ObservedHolidaysFilter.php @@ -45,7 +45,7 @@ public function count(): int { $days = \array_keys(\iterator_to_array($this)); - \array_walk($days, function (&$day) { + \array_walk($days, static function (&$day) { $day = \str_replace('substituteHoliday:', '', $day); }); diff --git a/src/Yasumi/Filters/OfficialHolidaysFilter.php b/src/Yasumi/Filters/OfficialHolidaysFilter.php index 94e315702..713945045 100644 --- a/src/Yasumi/Filters/OfficialHolidaysFilter.php +++ b/src/Yasumi/Filters/OfficialHolidaysFilter.php @@ -45,7 +45,7 @@ public function count(): int { $days = \array_keys(\iterator_to_array($this)); - \array_walk($days, function (&$day) { + \array_walk($days, static function (&$day) { $day = \str_replace('substituteHoliday:', '', $day); }); diff --git a/src/Yasumi/Filters/OnFilter.php b/src/Yasumi/Filters/OnFilter.php index 41fc4053f..3fdf34cc1 100644 --- a/src/Yasumi/Filters/OnFilter.php +++ b/src/Yasumi/Filters/OnFilter.php @@ -65,7 +65,7 @@ public function count(): int { $days = \array_keys(\iterator_to_array($this)); - \array_walk($days, function (&$day) { + \array_walk($days, static function (&$day) { $day = \str_replace('substituteHoliday:', '', $day); }); diff --git a/src/Yasumi/Filters/OtherHolidaysFilter.php b/src/Yasumi/Filters/OtherHolidaysFilter.php index 1349a23c7..5807b44e3 100644 --- a/src/Yasumi/Filters/OtherHolidaysFilter.php +++ b/src/Yasumi/Filters/OtherHolidaysFilter.php @@ -45,7 +45,7 @@ public function count(): int { $days = \array_keys(\iterator_to_array($this)); - \array_walk($days, function (&$day) { + \array_walk($days, static function (&$day) { $day = \str_replace('substituteHoliday:', '', $day); }); diff --git a/src/Yasumi/Filters/SeasonalHolidaysFilter.php b/src/Yasumi/Filters/SeasonalHolidaysFilter.php index 5eebaa59e..00e453ecd 100644 --- a/src/Yasumi/Filters/SeasonalHolidaysFilter.php +++ b/src/Yasumi/Filters/SeasonalHolidaysFilter.php @@ -45,7 +45,7 @@ public function count(): int { $days = \array_keys(\iterator_to_array($this)); - \array_walk($days, function (&$day) { + \array_walk($days, static function (&$day) { $day = \str_replace('substituteHoliday:', '', $day); }); diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index d4e670146..439b089d8 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -232,7 +232,7 @@ public function isHoliday(\DateTimeInterface $date): bool */ public function getHolidayDates(): array { - return \array_map(function ($holiday) { + return \array_map(static function ($holiday) { return (string)$holiday; }, $this->holidays); } @@ -300,7 +300,7 @@ public function count(): int { $list = $this->getHolidayNames(); - \array_walk($list, function (&$holiday) { + \array_walk($list, static function (&$holiday) { $holiday = \str_replace('substituteHoliday:', '', $holiday); }); diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 49098a56e..2cd3b3530 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -478,7 +478,7 @@ public function calculateSubstituteHolidays(): void // Loop through all holidays foreach ($holidays as $shortName => $date) { // Get list of holiday dates except this - $holidayDates = \array_map(function ($holiday) use ($shortName) { + $holidayDates = \array_map(static function ($holiday) use ($shortName) { return $holiday->shortName === $shortName ? false : (string)$holiday; }, $holidays); From 05f295664c8e9a57eeb60289fcef4407f7adcd9c Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 4 Jul 2019 11:31:32 +0900 Subject: [PATCH 047/133] Replaced double quotes with single quotes for static strings. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/SouthKorea.php | 8 ++++---- tests/SouthKorea/ChuseokTest.php | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 2cd3b3530..33de90b00 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -244,7 +244,7 @@ public function calculateIndependenceMovementDay(): void */ public function calculateArborDay(): void { - if ($this->year >= 1949 && $this->year < 1960 || $this->year > 1960 && $this->year < 2006) { + if (($this->year >= 1949 && $this->year < 1960) || ($this->year > 1960 && $this->year < 2006)) { $this->addHoliday(new Holiday( 'arborDay', ['en_US' => 'Arbor Day', 'ko_KR' => '식목일'], @@ -443,7 +443,7 @@ public function calculateNationalFoundationDay(): void */ public function calculateHangulDay(): void { - if ($this->year >= 1949 && $this->year <= 1990 || $this->year > 2012) { + if (($this->year >= 1949 && $this->year <= 1990) || $this->year > 2012) { $this->addHoliday(new Holiday( 'hangulDay', ['en_US' => 'Hangul Day', 'ko_KR' => '한글날'], @@ -487,14 +487,14 @@ public function calculateSubstituteHolidays(): void && ( 0 === (int)$date->format('w') || \in_array($date, $holidayDates, false) - || 6 === (int)$date->format('w') && $shortName === 'childrensDay' + || (6 === (int)$date->format('w') && $shortName === 'childrensDay') ) ) { $substitute = clone $date; // Find next week day (not being another holiday) while (0 === (int)$substitute->format('w') - || 6 === (int)$substitute->format('w') && $shortName === 'childrensDay' + || (6 === (int)$substitute->format('w') && $shortName === 'childrensDay') || \in_array($substitute, $holidayDates, false)) { $substitute->add(new DateInterval('P1D')); continue; diff --git a/tests/SouthKorea/ChuseokTest.php b/tests/SouthKorea/ChuseokTest.php index 31dc37f0a..4000434c6 100644 --- a/tests/SouthKorea/ChuseokTest.php +++ b/tests/SouthKorea/ChuseokTest.php @@ -82,19 +82,19 @@ public function testSubstituteHolidayByGaecheonjeol() self::REGION, 'substituteHoliday:dayBeforeChuseok', 2017, - new DateTime("2017-10-6", new DateTimeZone(self::TIMEZONE)) + new DateTime('2017-10-6', new DateTimeZone(self::TIMEZONE)) ); $this->assertHoliday( self::REGION, 'substituteHoliday:chuseok', 2028, - new DateTime("2028-10-5", new DateTimeZone(self::TIMEZONE)) + new DateTime('2028-10-5', new DateTimeZone(self::TIMEZONE)) ); $this->assertHoliday( self::REGION, 'substituteHoliday:dayAfterChuseok', 2039, - new DateTime("2039-10-5", new DateTimeZone(self::TIMEZONE)) + new DateTime('2039-10-5', new DateTimeZone(self::TIMEZONE)) ); } @@ -109,19 +109,19 @@ public function testSubstituteHolidayBySunday() self::REGION, 'substituteHoliday:dayBeforeChuseok', 2014, - new DateTime("2014-9-10", new DateTimeZone(self::TIMEZONE)) + new DateTime('2014-9-10', new DateTimeZone(self::TIMEZONE)) ); $this->assertHoliday( self::REGION, 'substituteHoliday:chuseok', 2039, - new DateTime("2039-10-4", new DateTimeZone(self::TIMEZONE)) + new DateTime('2039-10-4', new DateTimeZone(self::TIMEZONE)) ); $this->assertHoliday( self::REGION, 'substituteHoliday:dayAfterChuseok', 2022, - new DateTime("2022-9-12", new DateTimeZone(self::TIMEZONE)) + new DateTime('2022-9-12', new DateTimeZone(self::TIMEZONE)) ); } From 29c43ce91678e2cd18e29983891008b44204f6bd Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Sun, 18 Aug 2019 04:06:42 +0200 Subject: [PATCH 048/133] Simplify calculation for Sweden + Finland (#159) --- src/Yasumi/Provider/Finland.php | 44 ++++++++++++++------------------- src/Yasumi/Provider/Sweden.php | 34 +++++++++---------------- 2 files changed, 30 insertions(+), 48 deletions(-) diff --git a/src/Yasumi/Provider/Finland.php b/src/Yasumi/Provider/Finland.php index b58b3d14f..63789fa02 100644 --- a/src/Yasumi/Provider/Finland.php +++ b/src/Yasumi/Provider/Finland.php @@ -84,23 +84,20 @@ public function initialize(): void */ private function calculateStJohnsDay(): void { - $translation = ['fi_FI' => 'Juhannuspäivä']; - $shortName = 'stJohnsDay'; - $date = new DateTime("$this->year-6-24", new DateTimeZone($this->timezone)); // Default date - if ($this->year < 1955) { - $this->addHoliday(new Holiday($shortName, $translation, $date, $this->locale)); + $this->addHoliday(new Holiday( + 'stJohnsDay', + [], + new DateTime("$this->year-6-24", new DateTimeZone($this->timezone)), + $this->locale + )); } else { - - // Check between the 20th and 26th day which one is a Saturday - for ($d = 20; $d <= 26; ++$d) { - $date->setDate($this->year, 6, $d); - if ($date->format('l') === 'Saturday') { - break; - } - } - - $this->addHoliday(new Holiday($shortName, $translation, $date, $this->locale)); + $this->addHoliday(new Holiday( + 'stJohnsDay', + [], + new DateTime("$this->year-6-20 this saturday", new DateTimeZone($this->timezone)), + $this->locale + )); } } @@ -128,17 +125,12 @@ private function calculateStJohnsDay(): void */ private function calculateAllSaintsDay(): void { - $date = new DateTime("$this->year-10-31", new DateTimeZone($this->timezone)); - - // Check between 31 October and 6th of November the day that is a Saturday - for ($d = 0; $d <= 7; ++$d) { - if ($date->format('l') === 'Saturday') { - break; - } - $date->add(new DateInterval('P1D')); - } - - $this->addHoliday(new Holiday('allSaintsDay', [], $date, $this->locale)); + $this->addHoliday(new Holiday( + 'allSaintsDay', + [], + new DateTime("$this->year-10-31 this saturday", new DateTimeZone($this->timezone)), + $this->locale + )); } /** diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index 9af61bf66..470d6cec0 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -84,17 +84,12 @@ public function initialize(): void */ private function calculateStJohnsDay(): void { - $date = new DateTime("$this->year-6-20", new DateTimeZone($this->timezone)); // Default date - - // Check between the 20th and 26th day which one is a Saturday - for ($d = 0; $d <= 7; ++$d) { - if ($date->format('l') === 'Saturday') { - break; - } - $date->add(new DateInterval('P1D')); - } - - $this->addHoliday(new Holiday('stJohnsDay', ['sv_SE' => 'midsommardagen'], $date, $this->locale)); + $this->addHoliday(new Holiday( + 'stJohnsDay', + [], + new DateTime("$this->year-6-20 this saturday", new DateTimeZone($this->timezone)), + $this->locale + )); } /** @@ -120,17 +115,12 @@ private function calculateStJohnsDay(): void */ private function calculateAllSaintsDay(): void { - $date = new DateTime("$this->year-10-31", new DateTimeZone($this->timezone)); - - // Check between 31 October and 6th of November the day that is a Saturday - for ($d = 0; $d <= 7; ++$d) { - if ($date->format('l') === 'Saturday') { - break; - } - $date->add(new DateInterval('P1D')); - } - - $this->addHoliday(new Holiday('allSaintsDay', [], $date, $this->locale)); + $this->addHoliday(new Holiday( + 'allSaintsDay', + [], + new DateTime("$this->year-10-31 this saturday", new DateTimeZone($this->timezone)), + $this->locale + )); } /** From 1292953d96aab96dac67ea5e9ad53bf5dc832731 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Sun, 18 Aug 2019 13:34:01 +0200 Subject: [PATCH 049/133] Add exceptions for UK bank holidays (#160) --- CHANGELOG.md | 1 + src/Yasumi/Provider/UnitedKingdom.php | 27 +++++++++++++++++++ tests/UnitedKingdom/MayDayBankHolidayTest.php | 21 +++++++++++++++ tests/UnitedKingdom/SpringBankHolidayTest.php | 21 +++++++++++++++ 4 files changed, 70 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7a85c99a..b9918e81e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Updated the translation for the Assumption of Mary holiday for the 'fr_FR' locale [\#155](https://github.com/azuyalabs/yasumi/pull/155) ([pioc92](https://github.com/pioc92)) ### Fixed +- Fixed one-off exceptions for May Day Bank Holiday in 1995 and 2020 and Spring Bank Holiday in 2002 and 2012 (United Kingdom) [\#160](https://github.com/azuyalabs/yasumi/pull/160) ([c960657](https://github.com/c960657)) ### Removed diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index e314ecb89..3c5eabe52 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -118,6 +118,19 @@ private function calculateMayDayBankHoliday(): void return; } + // Moved to 8 May to commemorate the 50th (1995) and 75th (2020) anniversary of VE Day. + if ($this->year == 1995 || $this->year == 2020) { + $this->addHoliday(new Holiday( + 'mayDayBankHoliday', + ['en_GB' => 'May Day Bank Holiday'], + new DateTime("$this->year-5-8", new DateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_BANK + )); + + return; + } + $this->addHoliday(new Holiday( 'mayDayBankHoliday', ['en_GB' => 'May Day Bank Holiday'], @@ -150,6 +163,20 @@ private function calculateSpringBankHoliday(): void return; } + // Moved to 4 June for the celebration of the Golden (2002) and Diamond (2012) Jubilee + // of Elizabeth II. + if ($this->year == 2002 || $this->year == 2012) { + $this->addHoliday(new Holiday( + 'springBankHoliday', + ['en_GB' => 'Spring Bank Holiday'], + new DateTime("$this->year-6-4", new DateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_BANK + )); + + return; + } + $this->addHoliday(new Holiday( 'springBankHoliday', ['en_GB' => 'Spring Bank Holiday'], diff --git a/tests/UnitedKingdom/MayDayBankHolidayTest.php b/tests/UnitedKingdom/MayDayBankHolidayTest.php index 757f1e713..24578db20 100644 --- a/tests/UnitedKingdom/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/MayDayBankHolidayTest.php @@ -48,6 +48,27 @@ public function testHoliday() ); } + /** + * Tests the holiday exception in 1995 and 2020. + * @throws \ReflectionException + */ + public function testHolidayExceptions() + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1995, + new DateTime("1995-5-8", new DateTimeZone(self::TIMEZONE)) + ); + + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 2020, + new DateTime("2020-5-8", new DateTimeZone(self::TIMEZONE)) + ); + } + /** * Tests the holiday defined in this test before establishment. * @throws \ReflectionException diff --git a/tests/UnitedKingdom/SpringBankHolidayTest.php b/tests/UnitedKingdom/SpringBankHolidayTest.php index 79c390e20..3c4db82e1 100644 --- a/tests/UnitedKingdom/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/SpringBankHolidayTest.php @@ -48,6 +48,27 @@ public function testHoliday() ); } + /** + * Tests the holiday exceptions in 2002 and 2012. + * @throws \ReflectionException + */ + public function testHolidayException() + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 2002, + new DateTime("2002-6-4", new DateTimeZone(self::TIMEZONE)) + ); + + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 2012, + new DateTime("2012-6-4", new DateTimeZone(self::TIMEZONE)) + ); + } + /** * Tests the holiday defined in this test before establishment. * @throws \ReflectionException From 51c064c251abacd8e6e8ab827d3ec5b68df0d5e6 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Sun, 18 Aug 2019 13:45:50 +0200 Subject: [PATCH 050/133] Adjust Summer Bank Holiday prior to 1970 (#161) --- CHANGELOG.md | 2 + src/Yasumi/Provider/UnitedKingdom.php | 30 ++++++++- tests/UnitedKingdom/SummerBankHolidayTest.php | 63 ++++++++++++++++++- 3 files changed, 91 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9918e81e..9ffa1b483 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Holiday Provider for South Korea. [\#156](https://github.com/azuyalabs/yasumi/pull/156) ([blood72](https://github.com/blood72)) - Translation for the Easter holiday for the 'fr_FR' locale [\#146](https://github.com/azuyalabs/yasumi/pull/146) ([pioc92](https://github.com/pioc92)) - Translation for the Pentecoste holiday for the 'fr_FR' locale [\#145](https://github.com/azuyalabs/yasumi/pull/145) ([pioc92](https://github.com/pioc92)) +- Late Summer Bank Holiday in United Kingdom prior to 1965 [\#161](https://github.com/azuyalabs/yasumi/pull/161) ([c960657](https://github.com/c960657)) ### Changed - Replaced the standard 'InvalidArgumentException' when an invalid year or holiday provider are given by a new exception for each of these two situations separately ('InvalidYearException' and 'ProviderNotFoundException'). This allows you to better distinguish which exception may occur when instantiating the Yasumi class. [\#95](https://github.com/azuyalabs/yasumi/pull/95) ([qneyrat](https://github.com/qneyrat)) @@ -18,6 +19,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Updated the translation for the Assumption of Mary holiday for the 'fr_FR' locale [\#155](https://github.com/azuyalabs/yasumi/pull/155) ([pioc92](https://github.com/pioc92)) ### Fixed +- Late Summer Bank Holiday in 1968 and 1969 in United Kingdom [\#161](https://github.com/azuyalabs/yasumi/pull/161) ([c960657](https://github.com/c960657)) - Fixed one-off exceptions for May Day Bank Holiday in 1995 and 2020 and Spring Bank Holiday in 2002 and 2012 (United Kingdom) [\#160](https://github.com/azuyalabs/yasumi/pull/160) ([c960657](https://github.com/c960657)) ### Removed diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 3c5eabe52..1892ec8ea 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -189,7 +189,7 @@ private function calculateSpringBankHoliday(): void /** * The Summer Bank holiday, also known as the Late Summer bank holiday, is a time for people in the United Kingdom * to have a day off work or school. It falls on the last Monday of August replacing the first Monday in August - * (formerly commonly known as "August Bank Holiday". + * (formerly commonly known as "August Bank Holiday"). * * Many organizations, businesses and schools are closed. Stores may be open or closed, according to local custom. * Public transport systems often run to a holiday timetable. @@ -204,8 +204,34 @@ private function calculateSpringBankHoliday(): void */ private function calculateSummerBankHoliday(): void { - // Statutory bank holiday from 1971, following a trial period from 1965 to 1970. + if ($this->year < 1871) { + return; + } + if ($this->year < 1965) { + $this->addHoliday(new Holiday( + 'summerBankHoliday', + ['en_GB' => 'August Bank Holiday'], + new DateTime("first monday of august $this->year", new DateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_BANK + )); + + return; + } + + // Statutory bank holiday from 1971, following a trial period from 1965 to 1970. + // During the trial period, the definition was different than today, causing exceptions + // in 1968 and 1969. + if ($this->year == 1968 || $this->year == 1969) { + $this->addHoliday(new Holiday( + 'summerBankHoliday', + ['en_GB' => 'Summer Bank Holiday'], + new DateTime("first monday of september $this->year", new DateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_BANK + )); + return; } diff --git a/tests/UnitedKingdom/SummerBankHolidayTest.php b/tests/UnitedKingdom/SummerBankHolidayTest.php index ad0ee64f9..931fbe4a1 100644 --- a/tests/UnitedKingdom/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/SummerBankHolidayTest.php @@ -30,7 +30,7 @@ class SummerBankHolidayTest extends UnitedKingdomBaseTestCase implements YasumiT /** * The year in which the holiday was first established */ - public const ESTABLISHMENT_YEAR = 1965; + public const ESTABLISHMENT_YEAR = 1871; /** * Tests the holiday defined in this test. @@ -39,7 +39,7 @@ class SummerBankHolidayTest extends UnitedKingdomBaseTestCase implements YasumiT */ public function testHoliday() { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(1970); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -48,6 +48,65 @@ public function testHoliday() ); } + /** + * Tests the holiday exception in 2020. + * @throws \ReflectionException + */ + public function testHolidayBefore1965() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1967); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("first monday of august $year", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday during trial period in 1965-1970. + * @throws \ReflectionException + */ + public function testHolidayTrialPeriod() + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1965, + new DateTime("1965-8-30", new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1966, + new DateTime("1966-8-29", new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1967, + new DateTime("1967-8-28", new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1968, + new DateTime("1968-9-2", new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1969, + new DateTime("1969-9-1", new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1970, + new DateTime("1970-8-31", new DateTimeZone(self::TIMEZONE)) + ); + } + /** * Tests the holiday defined in this test before establishment. * @throws \ReflectionException From 5d18bba71178b6c13d90e6310f48860da39ba7cf Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Oude Koehorst Date: Tue, 20 Aug 2019 22:23:22 +0900 Subject: [PATCH 051/133] Applied the correct specifier as an integer is used opposed to the string type specifier. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Yasumi.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 8a74cd76e..d81fb0be0 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -138,7 +138,7 @@ public static function create(string $class, int $year = 0, string $locale = sel // Assert year input if ($year < 1000 || $year > 9999) { - throw new InvalidYearException(\sprintf('Year needs to be between 1000 and 9999 (%s given).', $year)); + throw new InvalidYearException(\sprintf('Year needs to be between 1000 and 9999 (%d given).', $year)); } // Load internal locales variable From 3a26069d537f8f3791bb9e452d731ad22651faa1 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Oude Koehorst Date: Tue, 20 Aug 2019 22:24:46 +0900 Subject: [PATCH 052/133] Removed unused imports. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Finland.php | 1 - src/Yasumi/Provider/Sweden.php | 1 - 2 files changed, 2 deletions(-) diff --git a/src/Yasumi/Provider/Finland.php b/src/Yasumi/Provider/Finland.php index 63789fa02..b85d1a7c4 100644 --- a/src/Yasumi/Provider/Finland.php +++ b/src/Yasumi/Provider/Finland.php @@ -12,7 +12,6 @@ namespace Yasumi\Provider; -use DateInterval; use DateTime; use DateTimeZone; use Yasumi\Holiday; diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index 470d6cec0..26275c672 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -12,7 +12,6 @@ namespace Yasumi\Provider; -use DateInterval; use DateTime; use DateTimeZone; use Yasumi\Holiday; From 707aa1ac53888b1e990bd132b634558440c2598e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Oude Koehorst Date: Tue, 20 Aug 2019 22:26:21 +0900 Subject: [PATCH 053/133] Removed unnecessary variable. Signed-off-by: Sacha Telgenhof --- composer.json | 1 + src/Yasumi/Provider/ChristianHolidays.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4861c571d..c1d8274e1 100755 --- a/composer.json +++ b/composer.json @@ -26,6 +26,7 @@ "friendsofphp/php-cs-fixer": "^2.14", "fzaninotto/faker": "~1.8", "mikey179/vfsstream": "~1.6", + "phan/phan": "^2.2", "phpunit/phpunit": "~7.5" }, "autoload": { diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index aa1743788..17bcd0030 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -49,7 +49,7 @@ trait ChristianHolidays */ public function easter(int $year, string $timezone, string $locale, string $type = Holiday::TYPE_OFFICIAL): Holiday { - return new Holiday('easter', [], $easter = $this->calculateEaster($year, $timezone), $locale, $type); + return new Holiday('easter', [], $this->calculateEaster($year, $timezone), $locale, $type); } /** From a3b0244bbc1f0071c6d93e88d4d4289bd6c5a969 Mon Sep 17 00:00:00 2001 From: Jan Langer Date: Thu, 22 Aug 2019 16:38:13 +0200 Subject: [PATCH 054/133] Separated czech and slovak independence day from New Year's Day (#158) --- src/Yasumi/Provider/CzechRepublic.php | 24 ++++++ src/Yasumi/Provider/Slovakia.php | 26 +++++- src/Yasumi/data/translations/newYearsDay.php | 4 +- tests/CzechRepublic/CzechRepublicTest.php | 1 + tests/CzechRepublic/NewYearsDayTest.php | 2 +- .../RenewalOfIndependentCzechStateDayTest.php | 82 +++++++++++++++++++ ...yTest.php => SlovakIndependeceDayTest.php} | 7 +- tests/Slovakia/SlovakiaTest.php | 2 +- 8 files changed, 140 insertions(+), 8 deletions(-) create mode 100644 tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php rename tests/Slovakia/{NewYearsDayTest.php => SlovakIndependeceDayTest.php} (89%) diff --git a/src/Yasumi/Provider/CzechRepublic.php b/src/Yasumi/Provider/CzechRepublic.php index dfd85ed13..3bdb2d41a 100644 --- a/src/Yasumi/Provider/CzechRepublic.php +++ b/src/Yasumi/Provider/CzechRepublic.php @@ -45,6 +45,7 @@ public function initialize(): void $this->timezone = 'Europe/Prague'; $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale)); + $this->calculateRenewalOfCzechIndependenceDay(); $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->internationalWorkersDay($this->year, $this->timezone, $this->locale)); @@ -59,6 +60,29 @@ public function initialize(): void $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale)); } + /** + * Day of renewal of independent Czech state + * + * @see https://en.wikipedia.org/wiki/Public_holidays_in_the_Czech_Republic + * + * @throws \Yasumi\Exception\InvalidDateException + * @throws \InvalidArgumentException + * @throws \Yasumi\Exception\UnknownLocaleException + * @throws \Exception + */ + private function calculateRenewalOfCzechIndependenceDay(): void + { + $this->addHoliday(new Holiday( + 'czechRenewalOfIndependentStateDay', + [ + 'cs_CZ' => 'Den obnovy samostatného českého státu', + 'en_US' => 'Day of renewal of the independent Czech state' + ], + new DateTime($this->year . '-01-01', new \DateTimeZone($this->timezone)), + $this->locale + )); + } + /** * Saints Cyril and Methodius Day * diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index 76a8bf6d3..14e59b2db 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -68,7 +68,7 @@ public function initialize(): void $this->timezone = 'Europe/Bratislava'; // 1.1. - $this->addHoliday($this->newYearsDay($this->year, $this->timezone, $this->locale)); + $this->calculateSlovakIndependenceDay(); // 6.1. $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK)); // 1.5. @@ -104,6 +104,30 @@ public function initialize(): void $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK)); } + + /** + * New Year's Day + * + * @see https://en.wikipedia.org/wiki/Public_holidays_in_Slovakia + * + * @throws \Yasumi\Exception\InvalidDateException + * @throws \InvalidArgumentException + * @throws \Yasumi\Exception\UnknownLocaleException + * @throws \Exception + */ + private function calculateSlovakIndependenceDay(): void + { + $this->addHoliday(new Holiday( + 'slovakIndependenceDay', + [ + 'sk_SK' => 'Deň vzniku Slovenskej republiky', + 'en_US' => 'Day of the Establishment of the Slovak Republic' + ], + new DateTime($this->year . '-01-01', new \DateTimeZone($this->timezone)), + $this->locale + )); + } + /** * Saints Cyril and Methodius Day * diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php index 8e1cafdc7..5dcb7626a 100755 --- a/src/Yasumi/data/translations/newYearsDay.php +++ b/src/Yasumi/data/translations/newYearsDay.php @@ -13,7 +13,7 @@ // Translations for New Year's Day return [ 'bs_Latn_BA' => 'Nova godina', - 'cs_CZ' => 'Den obnovy samostatného českého státu a Nový rok', + 'cs_CZ' => 'Nový rok', 'cy_GB' => 'Dydd Calan', 'da_DK' => 'Nytårsdag', 'de_AT' => 'Neujahr', @@ -50,7 +50,7 @@ 'ro_RO' => 'Anul Nou', 'ru_RU' => 'Новый год', 'ru_UA' => 'Новый Год', - 'sk_SK' => 'Deň vzniku Slovenskej republiky', + 'sk_SK' => 'Nový rok', 'sv_SE' => 'nyårsdagen', 'uk_UA' => 'Новий Рік', ]; diff --git a/tests/CzechRepublic/CzechRepublicTest.php b/tests/CzechRepublic/CzechRepublicTest.php index fa0b37ad1..394980abd 100644 --- a/tests/CzechRepublic/CzechRepublicTest.php +++ b/tests/CzechRepublic/CzechRepublicTest.php @@ -36,6 +36,7 @@ public function testOfficialHolidays(): void { $this->assertDefinedHolidays([ 'newYearsDay', + 'czechRenewalOfIndependentStateDay', 'victoryInEuropeDay', 'goodFriday', 'easterMonday', diff --git a/tests/CzechRepublic/NewYearsDayTest.php b/tests/CzechRepublic/NewYearsDayTest.php index 4b77c8cac..3051e7623 100644 --- a/tests/CzechRepublic/NewYearsDayTest.php +++ b/tests/CzechRepublic/NewYearsDayTest.php @@ -66,7 +66,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Den obnovy samostatného českého státu a Nový rok'] + [self::LOCALE => 'Nový rok'] ); } diff --git a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php new file mode 100644 index 000000000..7ca1255de --- /dev/null +++ b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php @@ -0,0 +1,82 @@ + + */ + +namespace Yasumi\tests\CzechRepublic; + +use DateTime; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Day of renewal of independent czech state in Czechia. + * + * + * @package Yasumi\tests\Slovakia + * @author Andrej Rypak (dakujem) + * @author Jan Langer + */ +class RenewalOfIndependentCzechStateDayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'czechRenewalOfIndependentStateDay'; + + /** + * 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 + * + * @throws \ReflectionException + */ + public function testHoliday($year, $expected) + { + $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(1, 1, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Den obnovy samostatného českého státu'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/Slovakia/NewYearsDayTest.php b/tests/Slovakia/SlovakIndependeceDayTest.php similarity index 89% rename from tests/Slovakia/NewYearsDayTest.php rename to tests/Slovakia/SlovakIndependeceDayTest.php index cdaa94da2..1780e17fc 100644 --- a/tests/Slovakia/NewYearsDayTest.php +++ b/tests/Slovakia/SlovakIndependeceDayTest.php @@ -19,18 +19,19 @@ use Yasumi\tests\YasumiTestCaseInterface; /** - * Class for testing New years day in Slovakia. + * Class for testing Slovak independence day in Slovakia. * * * @package Yasumi\tests\Slovakia * @author Andrej Rypak (dakujem) + * @author Jan Langer */ -class NewYearsDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface +class SlovakIndependeceDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday to be tested */ - public const HOLIDAY = 'newYearsDay'; + public const HOLIDAY = 'slovakIndependenceDay'; /** diff --git a/tests/Slovakia/SlovakiaTest.php b/tests/Slovakia/SlovakiaTest.php index f134c50d2..23b174f39 100644 --- a/tests/Slovakia/SlovakiaTest.php +++ b/tests/Slovakia/SlovakiaTest.php @@ -38,7 +38,7 @@ class SlovakiaTest extends SlovakiaBaseTestCase public function testOfficialHolidays(): void { $this->assertDefinedHolidays([ - 'newYearsDay', + 'slovakIndependenceDay', 'slovakConstitutionDay', 'slovakNationalUprisingDay', 'saintsCyrilAndMethodiusDay', From f707d5aedd11093e255f8d38d2de54dc98a7bbe2 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Thu, 29 Aug 2019 16:57:24 +0200 Subject: [PATCH 055/133] Suspended holidays in Portugal 2013-2015 (#163) * Portuguese Republic Day was also suspended 2013-2015 * Holidays were also suspended in 2013 --- CHANGELOG.md | 1 + src/Yasumi/Provider/Brazil.php | 4 +- src/Yasumi/Provider/Portugal.php | 14 ++++--- tests/Portugal/AllSaintsDayTest.php | 10 ++--- tests/Portugal/CorpusChristiTest.php | 6 +-- tests/Portugal/PortugalTest.php | 2 +- tests/Portugal/PortugueseRepublicDayTest.php | 40 +++++++++++++++++++ .../RestorationOfIndependenceTest.php | 10 ++--- 8 files changed, 66 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ffa1b483..51fa021eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ### Fixed - Late Summer Bank Holiday in 1968 and 1969 in United Kingdom [\#161](https://github.com/azuyalabs/yasumi/pull/161) ([c960657](https://github.com/c960657)) - Fixed one-off exceptions for May Day Bank Holiday in 1995 and 2020 and Spring Bank Holiday in 2002 and 2012 (United Kingdom) [\#160](https://github.com/azuyalabs/yasumi/pull/160) ([c960657](https://github.com/c960657)) +- Fixed revoked holidays in Portugal in 2013-2015 [\#163](https://github.com/azuyalabs/yasumi/pull/163) ([c960657](https://github.com/c960657)) ### Removed diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index 40d2a4de9..e8e832f17 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -71,7 +71,7 @@ public function initialize(): void $carnavalMonday->sub(new DateInterval('P48D')), $this->locale, Holiday::TYPE_OBSERVANCE - )); + )); $carnavalTuesday = clone $easter; $this->addHoliday(new Holiday( @@ -80,7 +80,7 @@ public function initialize(): void $carnavalTuesday->sub(new DateInterval('P47D')), $this->locale, Holiday::TYPE_OBSERVANCE - )); + )); } /** diff --git a/src/Yasumi/Provider/Portugal.php b/src/Yasumi/Provider/Portugal.php index d722ee208..1a485fdfd 100644 --- a/src/Yasumi/Provider/Portugal.php +++ b/src/Yasumi/Provider/Portugal.php @@ -105,7 +105,7 @@ private function calculateCarnationRevolutionDay(): void */ private function calculateCorpusChristi(): void { - if ($this->year <= 2013 || $this->year >= 2016) { + if ($this->year <= 2012 || $this->year >= 2016) { $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale)); } } @@ -153,6 +153,8 @@ private function calculatePortugalDay(): void * presented itself as the only one that had a programme that was capable of returning to the country its lost * status and place Portugal on the way of progress. * + * The holiday was revoked in 2013 due to government deliberation. It was restored in 2016. + * * @link https://en.wikipedia.org/wiki/5_October_1910_revolution * * @throws \Yasumi\Exception\InvalidDateException @@ -162,7 +164,7 @@ private function calculatePortugalDay(): void */ private function calculatePortugueseRepublicDay(): void { - if ($this->year >= 1910) { + if ($this->year >= 1910 && $this->year <= 2012 || $this->year >= 2016) { $this->addHoliday(new Holiday( 'portugueseRepublic', ['pt_PT' => 'Implantação da República Portuguesa'], @@ -173,7 +175,7 @@ private function calculatePortugueseRepublicDay(): void } /** - * In Portugal, between 2013 andd 2015 (inclusive) this holiday did not happen due to government deliberation. + * In Portugal, between 2013 and 2015 (inclusive) this holiday did not happen due to government deliberation. * It was restored in 2016. * * @throws \Yasumi\Exception\InvalidDateException @@ -183,7 +185,7 @@ private function calculatePortugueseRepublicDay(): void */ private function calculateAllSaintsDay(): void { - if ($this->year <= 2013 || $this->year >= 2016) { + if ($this->year <= 2012 || $this->year >= 2016) { $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); } } @@ -205,6 +207,8 @@ private function calculateAllSaintsDay(): void * and elsewhere, as the Acclamation War. The war established the House of Braganza as Portugal's new ruling * dynasty, replacing the House of Habsburg. This ended the so-called Iberian Union. * + * The holiday was revoked in 2013 due to government deliberation. It was restored in 2016. + * * @link https://pt.wikipedia.org/wiki/Restauração_da_Independência (portuguese link) * @link https://pt.wikipedia.org/wiki/Guerra_da_Restauração (english link) * @@ -216,7 +220,7 @@ private function calculateAllSaintsDay(): void private 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 <= 2013) || $this->year >= 2016) { + if (($this->year >= 1850 && $this->year <= 2012) || $this->year >= 2016) { $this->addHoliday(new Holiday( 'restorationOfIndependence', ['pt_PT' => 'Restauração da Independência'], diff --git a/tests/Portugal/AllSaintsDayTest.php b/tests/Portugal/AllSaintsDayTest.php index 4afac9092..7aca56da5 100644 --- a/tests/Portugal/AllSaintsDayTest.php +++ b/tests/Portugal/AllSaintsDayTest.php @@ -28,9 +28,9 @@ class AllSaintsDayTest extends PortugalBaseTestCase implements YasumiTestCaseInt public const HOLIDAY = 'allSaintsDay'; /** - * Holiday was abolished by the portuguese government in 2014. + * Holiday was abolished by the portuguese government in 2013. */ - public const HOLIDAY_YEAR_ABOLISHED = 2014; + public const HOLIDAY_YEAR_ABOLISHED = 2013; /** * Holiday was restored by the portuguese government in 2016. @@ -50,18 +50,18 @@ public function testHoliday() $expected = new DateTime("$year-11-01", new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); - $year = 2013; + $year = 2012; $expected = new DateTime("$year-11-01", new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** - * Test that the holiday did not happen in 2014 and 2015. + * Test that the holiday did not happen in 2013-2015. * @throws \ReflectionException */ public function testNotHoliday() { - $year = $this->generateRandomYear(2014, 2015); + $year = $this->generateRandomYear(2013, 2015); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } diff --git a/tests/Portugal/CorpusChristiTest.php b/tests/Portugal/CorpusChristiTest.php index 0d3dc59f9..717c87235 100644 --- a/tests/Portugal/CorpusChristiTest.php +++ b/tests/Portugal/CorpusChristiTest.php @@ -30,7 +30,7 @@ class CorpusChristiTest extends PortugalBaseTestCase implements YasumiTestCaseIn /** * Holiday was abolished by the portuguese government in 2014. */ - public const HOLIDAY_YEAR_ABOLISHED = 2014; + public const HOLIDAY_YEAR_ABOLISHED = 2013; /** * Holiday was restored by the portuguese government in 2016. @@ -50,12 +50,12 @@ public function testHoliday() } /** - * Test that the holiday did not happen in 2014 and 2015. + * Test that the holiday did not happen in 2013-2015. * @throws \ReflectionException */ public function testNotHoliday() { - $year = $this->generateRandomYear(2014, 2015); + $year = $this->generateRandomYear(2013, 2015); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } diff --git a/tests/Portugal/PortugalTest.php b/tests/Portugal/PortugalTest.php index 6d3192387..ba6f32174 100644 --- a/tests/Portugal/PortugalTest.php +++ b/tests/Portugal/PortugalTest.php @@ -81,7 +81,7 @@ public function testOtherHolidays(): void { $holidays = []; - if ($this->year <= 2013 || $this->year >= 2016) { + if ($this->year <= 2012 || $this->year >= 2016) { $holidays[] = 'corpusChristi'; } diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index fbde1d4e5..2583045b2 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -27,11 +27,51 @@ class PortugueseRepublicDayTest extends PortugalBaseTestCase implements YasumiTe */ public const ESTABLISHMENT_YEAR = 1910; + /** + * Holiday was abolished by the portuguese government in 2013. + */ + public const HOLIDAY_YEAR_ABOLISHED = 2013; + + /** + * Holiday was restored by the portuguese government in 2016. + */ + public const HOLIDAY_YEAR_RESTORED = 2016; + /** * The name of the holiday to be tested */ public const HOLIDAY = 'portugueseRepublic'; + /** + * Test that the holiday if in effect in 2016 and later dates. + * @throws \ReflectionException + * @throws \Exception + * @throws \ReflectionException + * @throws \Exception + */ + public function testHolidayOnAfterRestoration() + { + $year = self::HOLIDAY_YEAR_RESTORED; + + $expected = new DateTime("$year-10-05", new DateTimeZone(self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + + $year = $this->generateRandomYear(self::HOLIDAY_YEAR_RESTORED); + + $expected = new DateTime("$year-10-05", new DateTimeZone(self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); + } + + /** + * Test that the holiday did not happen in 2013-2015. + * @throws \ReflectionException + */ + public function testNotHolidayDuringAbolishment() + { + $year = $this->generateRandomYear(2013, 2015); + $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); + } + /** * Tests the holiday defined in this test on or after establishment. * @throws \ReflectionException diff --git a/tests/Portugal/RestorationOfIndependenceTest.php b/tests/Portugal/RestorationOfIndependenceTest.php index 3ccad8eae..7e0fd9e23 100644 --- a/tests/Portugal/RestorationOfIndependenceTest.php +++ b/tests/Portugal/RestorationOfIndependenceTest.php @@ -28,9 +28,9 @@ class RestorationOfIndependenceTest extends PortugalBaseTestCase implements Yasu public const ESTABLISHMENT_YEAR = 1850; /** - * Holiday was abolished by the portuguese government in 2014. + * Holiday was abolished by the portuguese government in 2013. */ - public const HOLIDAY_YEAR_ABOLISHED = 2014; + public const HOLIDAY_YEAR_ABOLISHED = 2013; /** * Holiday was restored by the portuguese government in 2016. @@ -56,7 +56,7 @@ public function testHolidayOnAfterEstablishment() $expected = new DateTime("$year-12-01", new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); - $year = 1850; + $year = self::ESTABLISHMENT_YEAR; $expected = new DateTime("$year-12-01", new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } @@ -82,12 +82,12 @@ public function testHolidayOnAfterRestoration() } /** - * Test that the holiday did not happen in 2014 and 2015. + * Test that the holiday did not happen in 2013-2015. * @throws \ReflectionException */ public function testNotHolidayDuringAbolishment() { - $year = $this->generateRandomYear(2014, 2015); + $year = $this->generateRandomYear(2013, 2015); $this->assertNotHoliday(self::REGION, self::HOLIDAY, $year); } From c23aab810537dd181a40c5e2d5cc93c9e5b8b17b Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Tue, 3 Sep 2019 14:59:39 +0200 Subject: [PATCH 056/133] Corpus Christi is an official holiday in Poland (#168) --- CHANGELOG.md | 1 + src/Yasumi/Provider/Poland.php | 2 +- tests/Poland/CorpusChristiTest.php | 2 +- tests/Poland/PolandTest.php | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51fa021eb..906962f4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Late Summer Bank Holiday in 1968 and 1969 in United Kingdom [\#161](https://github.com/azuyalabs/yasumi/pull/161) ([c960657](https://github.com/c960657)) - Fixed one-off exceptions for May Day Bank Holiday in 1995 and 2020 and Spring Bank Holiday in 2002 and 2012 (United Kingdom) [\#160](https://github.com/azuyalabs/yasumi/pull/160) ([c960657](https://github.com/c960657)) - Fixed revoked holidays in Portugal in 2013-2015 [\#163](https://github.com/azuyalabs/yasumi/pull/163) ([c960657](https://github.com/c960657)) +- Corpus Christi is official in Poland [\#168](https://github.com/azuyalabs/yasumi/pull/168) ([c960657](https://github.com/c960657)) ### Removed diff --git a/src/Yasumi/Provider/Poland.php b/src/Yasumi/Provider/Poland.php index 0112286d9..a6321a5e1 100755 --- a/src/Yasumi/Provider/Poland.php +++ b/src/Yasumi/Provider/Poland.php @@ -49,7 +49,7 @@ public function initialize(): void $this->addHoliday($this->allSaintsDay($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->assumptionOfMary($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale)); - $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale, Holiday::TYPE_OFFICIAL)); $this->addHoliday($this->easter($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale)); diff --git a/tests/Poland/CorpusChristiTest.php b/tests/Poland/CorpusChristiTest.php index 789882a0c..beed798e2 100644 --- a/tests/Poland/CorpusChristiTest.php +++ b/tests/Poland/CorpusChristiTest.php @@ -63,6 +63,6 @@ public function testTranslation(): void */ public function testHolidayType(): void { - $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OTHER); + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); } } diff --git a/tests/Poland/PolandTest.php b/tests/Poland/PolandTest.php index b523629fe..9a4b05c2b 100644 --- a/tests/Poland/PolandTest.php +++ b/tests/Poland/PolandTest.php @@ -40,6 +40,7 @@ public function testOfficialHolidays(): void 'easterMonday', 'epiphany', 'pentecost', + 'corpusChristi', 'secondChristmasDay', 'constitutionDay', 'independenceDay', @@ -79,7 +80,7 @@ public function testBankHolidays(): void */ public function testOtherHolidays(): void { - $this->assertDefinedHolidays(['corpusChristi'], self::REGION, $this->year, Holiday::TYPE_OTHER); + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); } /** From 344a2f0084286ff9db4c3430f83460226bdd10f5 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Tue, 3 Sep 2019 15:17:09 +0200 Subject: [PATCH 057/133] Adjust da spelling for Second Christmas Day (#167) --- CHANGELOG.md | 2 ++ src/Yasumi/data/translations/secondChristmasDay.php | 2 +- tests/Denmark/SecondChristmasDayTest.php | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 906962f4c..aa74d6156 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,8 +22,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Late Summer Bank Holiday in 1968 and 1969 in United Kingdom [\#161](https://github.com/azuyalabs/yasumi/pull/161) ([c960657](https://github.com/c960657)) - Fixed one-off exceptions for May Day Bank Holiday in 1995 and 2020 and Spring Bank Holiday in 2002 and 2012 (United Kingdom) [\#160](https://github.com/azuyalabs/yasumi/pull/160) ([c960657](https://github.com/c960657)) - Fixed revoked holidays in Portugal in 2013-2015 [\#163](https://github.com/azuyalabs/yasumi/pull/163) ([c960657](https://github.com/c960657)) +- Fixed spelling issues in the Danish translation for Second Christmas Day. [\#167](https://github.com/azuyalabs/yasumi/pull/167) - Corpus Christi is official in Poland [\#168](https://github.com/azuyalabs/yasumi/pull/168) ([c960657](https://github.com/c960657)) + ### Removed diff --git a/src/Yasumi/data/translations/secondChristmasDay.php b/src/Yasumi/data/translations/secondChristmasDay.php index a3d8a9a94..32ea2753d 100755 --- a/src/Yasumi/data/translations/secondChristmasDay.php +++ b/src/Yasumi/data/translations/secondChristmasDay.php @@ -13,7 +13,7 @@ // Translations for Second Christmas Day return [ 'cs_CZ' => '2. svátek vánoční', - 'da_DK' => '2. Juledag', + 'da_DK' => '2. juledag', 'de_AT' => 'Stefanitag', 'de_DE' => '2. Weihnachtsfeiertag', 'el_GR' => 'Σύναξις Υπεραγίας Θεοτόκου Μαρίας', diff --git a/tests/Denmark/SecondChristmasDayTest.php b/tests/Denmark/SecondChristmasDayTest.php index 591cdebc0..e710bd494 100644 --- a/tests/Denmark/SecondChristmasDayTest.php +++ b/tests/Denmark/SecondChristmasDayTest.php @@ -62,7 +62,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => '2. Juledag'] + [self::LOCALE => '2. juledag'] ); } From 970064f657d3762e9355c6a5f71978d7661c45e8 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Wed, 4 Sep 2019 16:58:30 +0200 Subject: [PATCH 058/133] Change Dutch translation of Christmas Day (#170) --- CHANGELOG.md | 1 + src/Yasumi/data/translations/christmasDay.php | 2 +- tests/Netherlands/ChristmasDayTest.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa74d6156..25f2bff0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Updated the translation for the Armistice holiday for the 'fr_FR' locale [\#154](https://github.com/azuyalabs/yasumi/pull/154) ([pioc92](https://github.com/pioc92)) - Updated the translation for the Victory in Europe holiday for the 'fr_FR' locale [\#153](https://github.com/azuyalabs/yasumi/pull/153) ([pioc92](https://github.com/pioc92)) - Updated the translation for the Assumption of Mary holiday for the 'fr_FR' locale [\#155](https://github.com/azuyalabs/yasumi/pull/155) ([pioc92](https://github.com/pioc92)) +- Updated the translation for Christmas Day for the 'nl_NL' locale [\#160](https://github.com/azuyalabs/yasumi/pull/160) ([pioc92](https://github.com/pioc92)) ### Fixed - Late Summer Bank Holiday in 1968 and 1969 in United Kingdom [\#161](https://github.com/azuyalabs/yasumi/pull/161) ([c960657](https://github.com/c960657)) diff --git a/src/Yasumi/data/translations/christmasDay.php b/src/Yasumi/data/translations/christmasDay.php index 3e7da6ce4..07969a068 100755 --- a/src/Yasumi/data/translations/christmasDay.php +++ b/src/Yasumi/data/translations/christmasDay.php @@ -40,7 +40,7 @@ 'lv_LV' => 'Ziemassvētki', 'nb_NO' => 'Første juledag', 'nl_BE' => 'Kerstmis', - 'nl_NL' => 'Kerstmis', + 'nl_NL' => 'Eerste kerstdag', 'pl_PL' => 'pierwszy dzień Bożego Narodzenia', 'pt_BR' => 'Natal', 'pt_PT' => 'Natal', diff --git a/tests/Netherlands/ChristmasDayTest.php b/tests/Netherlands/ChristmasDayTest.php index 508bdd5a6..5348929bf 100644 --- a/tests/Netherlands/ChristmasDayTest.php +++ b/tests/Netherlands/ChristmasDayTest.php @@ -62,7 +62,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Kerstmis'] + [self::LOCALE => 'Eerste kerstdag'] ); } From 3b036af3402bf9cf0d60be28421c5f2b8f38b905 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Wed, 4 Sep 2019 17:03:13 +0200 Subject: [PATCH 059/133] Liberation Day is official in the Netherlands (#169) --- CHANGELOG.md | 1 + src/Yasumi/Provider/Netherlands.php | 2 +- tests/Netherlands/LiberationDayTest.php | 2 +- tests/Netherlands/NetherlandsTest.php | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25f2bff0e..3b103756b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Fixed revoked holidays in Portugal in 2013-2015 [\#163](https://github.com/azuyalabs/yasumi/pull/163) ([c960657](https://github.com/c960657)) - Fixed spelling issues in the Danish translation for Second Christmas Day. [\#167](https://github.com/azuyalabs/yasumi/pull/167) - Corpus Christi is official in Poland [\#168](https://github.com/azuyalabs/yasumi/pull/168) ([c960657](https://github.com/c960657)) +- Liberation Day is official in the Netherlands [\#169](https://github.com/azuyalabs/yasumi/pull/169) ([c960657](https://github.com/c960657)) ### Removed diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 44975b09a..0bab0fb87 100755 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -107,7 +107,7 @@ private function calculateCommemorationLiberationDay(): void ['en_US' => 'Liberation Day', 'nl_NL' => 'Bevrijdingsdag'], new DateTime("$this->year-5-5", new DateTimeZone($this->timezone)), $this->locale, - Holiday::TYPE_OBSERVANCE + Holiday::TYPE_OFFICIAL )); } } diff --git a/tests/Netherlands/LiberationDayTest.php b/tests/Netherlands/LiberationDayTest.php index f8e4ad60c..38a7730be 100644 --- a/tests/Netherlands/LiberationDayTest.php +++ b/tests/Netherlands/LiberationDayTest.php @@ -85,7 +85,7 @@ public function testHolidayType(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - Holiday::TYPE_OBSERVANCE + Holiday::TYPE_OFFICIAL ); } } diff --git a/tests/Netherlands/NetherlandsTest.php b/tests/Netherlands/NetherlandsTest.php index 2dacd5ce1..35c829d7f 100644 --- a/tests/Netherlands/NetherlandsTest.php +++ b/tests/Netherlands/NetherlandsTest.php @@ -38,6 +38,7 @@ public function testOfficialHolidays(): void 'ascensionDay', 'pentecost', 'pentecostMonday', + 'liberationDay', 'christmasDay', 'secondChristmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); @@ -54,7 +55,6 @@ public function testObservedHolidays(): void 'goodFriday', 'ashWednesday', 'commemorationDay', - 'liberationDay', 'halloween', 'stNicholasDay', 'carnivalDay', From fc1d604ac287afebd9f424c684b47ddc59add459 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Fri, 6 Sep 2019 15:01:06 +0200 Subject: [PATCH 060/133] Typos in Easter Monday and Republic Day for it_IT (#171) --- CHANGELOG.md | 1 + src/Yasumi/Provider/Italy.php | 2 +- src/Yasumi/data/translations/easterMonday.php | 2 +- tests/Italy/EasterMondayTest.php | 2 +- tests/Italy/RepublicDayTest.php | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b103756b..80ea629e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Fixed spelling issues in the Danish translation for Second Christmas Day. [\#167](https://github.com/azuyalabs/yasumi/pull/167) - Corpus Christi is official in Poland [\#168](https://github.com/azuyalabs/yasumi/pull/168) ([c960657](https://github.com/c960657)) - Liberation Day is official in the Netherlands [\#169](https://github.com/azuyalabs/yasumi/pull/169) ([c960657](https://github.com/c960657)) +- Typos in Easter Monday and Republic Day for the 'it_IT' locale [\#171](https://github.com/azuyalabs/yasumi/pull/171) ([c960657](https://github.com/c960657)) ### Removed diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index 9469f64ba..84fc91f6b 100755 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -110,7 +110,7 @@ private function calculateRepublicDay(): void if ($this->year >= 1946) { $this->addHoliday(new Holiday( 'republicDay', - ['it_IT' => 'Festa della Republica'], + ['it_IT' => 'Festa della Repubblica'], new DateTime("$this->year-6-2", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/data/translations/easterMonday.php b/src/Yasumi/data/translations/easterMonday.php index 6c2d6a2b5..1b6853074 100644 --- a/src/Yasumi/data/translations/easterMonday.php +++ b/src/Yasumi/data/translations/easterMonday.php @@ -33,7 +33,7 @@ 'hr_HR' => 'Uskršnji ponedjeljak', 'hu_HU' => 'Húsvéthétfő', 'it_CH' => 'Lunedi di Pasqua', - 'it_IT' => 'Lunedi` dell\'Angelo', + 'it_IT' => 'Lunedì dell\'Angelo', 'lt_LT' => 'Antroji Velykų diena', 'lv_LV' => 'Otrās Lieldienas', 'nb_NO' => 'Andre påskedag', diff --git a/tests/Italy/EasterMondayTest.php b/tests/Italy/EasterMondayTest.php index 43020a674..3eddf77e0 100644 --- a/tests/Italy/EasterMondayTest.php +++ b/tests/Italy/EasterMondayTest.php @@ -53,7 +53,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Lunedi` dell\'Angelo'] + [self::LOCALE => "Lunedì dell'Angelo"] ); } diff --git a/tests/Italy/RepublicDayTest.php b/tests/Italy/RepublicDayTest.php index dbacc71fe..86d0f08d6 100644 --- a/tests/Italy/RepublicDayTest.php +++ b/tests/Italy/RepublicDayTest.php @@ -78,7 +78,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(self::ESTABLISHMENT_YEAR), - [self::LOCALE => 'Festa della Republica'] + [self::LOCALE => 'Festa della Repubblica'] ); } From 7777207df7d52212c2a788121f6f46b2aa79f3b1 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Fri, 6 Sep 2019 15:10:53 +0200 Subject: [PATCH 061/133] Swedish observance holidays (#172) --- CHANGELOG.md | 1 + src/Yasumi/Provider/Sweden.php | 94 ++++++++++++++++-- src/Yasumi/data/translations/allSaintsEve.php | 18 ++++ src/Yasumi/data/translations/epiphanyEve.php | 18 ++++ src/Yasumi/data/translations/newYearsEve.php | 1 + src/Yasumi/data/translations/stJohnsDay.php | 1 + src/Yasumi/data/translations/stJohnsEve.php | 18 ++++ src/Yasumi/data/translations/walpurgisEve.php | 17 ++++ tests/Sweden/AllSaintsEveTest.php | 95 +++++++++++++++++++ tests/Sweden/ChristmasEveTest.php | 2 +- tests/Sweden/EpiphanyEveTest.php | 77 +++++++++++++++ tests/Sweden/NewYearsEveTest.php | 77 +++++++++++++++ ...{stJohnsDayTest.php => StJohnsDayTest.php} | 2 +- tests/Sweden/StJohnsEveTest.php | 75 +++++++++++++++ tests/Sweden/SwedenTest.php | 10 +- tests/Sweden/WalpurgisEveTest.php | 77 +++++++++++++++ 16 files changed, 572 insertions(+), 11 deletions(-) create mode 100755 src/Yasumi/data/translations/allSaintsEve.php create mode 100644 src/Yasumi/data/translations/epiphanyEve.php create mode 100644 src/Yasumi/data/translations/stJohnsEve.php create mode 100755 src/Yasumi/data/translations/walpurgisEve.php create mode 100644 tests/Sweden/AllSaintsEveTest.php create mode 100644 tests/Sweden/EpiphanyEveTest.php create mode 100644 tests/Sweden/NewYearsEveTest.php rename tests/Sweden/{stJohnsDayTest.php => StJohnsDayTest.php} (97%) create mode 100644 tests/Sweden/StJohnsEveTest.php create mode 100644 tests/Sweden/WalpurgisEveTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 80ea629e9..a73b3d485 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Translation for the Easter holiday for the 'fr_FR' locale [\#146](https://github.com/azuyalabs/yasumi/pull/146) ([pioc92](https://github.com/pioc92)) - Translation for the Pentecoste holiday for the 'fr_FR' locale [\#145](https://github.com/azuyalabs/yasumi/pull/145) ([pioc92](https://github.com/pioc92)) - Late Summer Bank Holiday in United Kingdom prior to 1965 [\#161](https://github.com/azuyalabs/yasumi/pull/161) ([c960657](https://github.com/c960657)) +- Observance holidays for Sweden [\#172](https://github.com/azuyalabs/yasumi/pull/172) ([c960657](https://github.com/c960657)) ### Changed - Replaced the standard 'InvalidArgumentException' when an invalid year or holiday provider are given by a new exception for each of these two situations separately ('InvalidYearException' and 'ProviderNotFoundException'). This allows you to better distinguish which exception may occur when instantiating the Yasumi class. [\#95](https://github.com/azuyalabs/yasumi/pull/95) ([qneyrat](https://github.com/qneyrat)) diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index 26275c672..a60223a98 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -12,6 +12,7 @@ namespace Yasumi\Provider; +use DateInterval; use DateTime; use DateTimeZone; use Yasumi\Holiday; @@ -47,21 +48,80 @@ public function initialize(): void // Add common Christian holidays (common in Sweden) $this->addHoliday($this->epiphany($this->year, $this->timezone, $this->locale)); + $this->calculateEpiphanyEve(); + $this->calculateWalpurgisEve(); $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->easter($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->easterMonday($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->ascensionDay($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale)); - $this->calculateStJohnsDay(); // aka Midsummer's Day - $this->calculateAllSaintsDay(); - $this->addHoliday($this->christmasEve($this->year, $this->timezone, $this->locale, Holiday::TYPE_OFFICIAL)); + $this->calculateStJohnsHolidays(); // aka Midsummer + $this->calculateAllSaintsHolidays(); + $this->addHoliday($this->christmasEve($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE)); $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->newYearsEve($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE)); + // Calculate other holidays $this->calculateNationalDay(); } + /** + * Epiphany Eve. + * + * Epiphany is a Christian feast day that celebrates the revelation of God the Son as a human being in Jesus Christ. + * The traditional date for the feast is January 6. In Sweden the holiday is celebrated on the evening before, also + * known as Twelfth Night. + * + * Epiphany Eve is often treated with the afternoon off, but this varies depending on employer. + * + * @link https://en.wikipedia.org/wiki/Twelfth_Night_(holiday) + * + * @throws \Yasumi\Exception\InvalidDateException + * @throws \Yasumi\Exception\UnknownLocaleException + * @throws \InvalidArgumentException + * @throws \Exception + */ + public function calculateEpiphanyEve(): void + { + $this->addHoliday(new Holiday( + 'epiphanyEve', + [], + new DateTime("$this->year-1-5", new DateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OBSERVANCE + )); + } + + + /** + * Walpurgis Night. + * + * Walpurgis Night is the eve of the Christian feast day of Saint Walpurga, an 8th-century abbess in Francia. + * This feast commemorates the canonization of Saint Walpurga and the movement of her relics to Eichstätt, + * both of which occurred on 1 May 870 + * + * Walpurgis Night is often treated with the afternoon off, but this varies depending on employer. + * + * @link https://en.wikipedia.org/wiki/Walpurgis_Night + * + * @throws \Yasumi\Exception\InvalidDateException + * @throws \Yasumi\Exception\UnknownLocaleException + * @throws \InvalidArgumentException + * @throws \Exception + */ + public function calculateWalpurgisEve(): void + { + $this->addHoliday(new Holiday( + 'walpurgisEve', + [], + new DateTime("$this->year-4-30", new DateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OBSERVANCE + )); + } + /** * St. John's Day / Midsummer. * @@ -81,14 +141,24 @@ public function initialize(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - private function calculateStJohnsDay(): void + private function calculateStJohnsHolidays(): void { + $date = new DateTime("$this->year-6-20 this saturday", new DateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'stJohnsDay', [], - new DateTime("$this->year-6-20 this saturday", new DateTimeZone($this->timezone)), + $date, $this->locale )); + + $date->sub(new DateInterval('P1D')); + $this->addHoliday(new Holiday( + 'stJohnsEve', + [], + $date, + $this->locale, + Holiday::TYPE_OBSERVANCE + )); } /** @@ -112,14 +182,24 @@ private function calculateStJohnsDay(): void * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ - private function calculateAllSaintsDay(): void + private function calculateAllSaintsHolidays(): void { + $date = new DateTime("$this->year-10-31 this saturday", new DateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'allSaintsDay', [], - new DateTime("$this->year-10-31 this saturday", new DateTimeZone($this->timezone)), + $date, $this->locale )); + + $date->sub(new DateInterval('P1D')); + $this->addHoliday(new Holiday( + 'allSaintsEve', + [], + $date, + $this->locale, + Holiday::TYPE_OBSERVANCE + )); } /** diff --git a/src/Yasumi/data/translations/allSaintsEve.php b/src/Yasumi/data/translations/allSaintsEve.php new file mode 100755 index 000000000..20a902d7b --- /dev/null +++ b/src/Yasumi/data/translations/allSaintsEve.php @@ -0,0 +1,18 @@ + + */ + +// Translations for All Saints' Eve +return [ + 'da_DK' => 'Allehelgensaften', + 'en_US' => 'All Saints\' Eve', + 'sv_SE' => 'alla helgons afton', +]; diff --git a/src/Yasumi/data/translations/epiphanyEve.php b/src/Yasumi/data/translations/epiphanyEve.php new file mode 100644 index 000000000..d2c8ba509 --- /dev/null +++ b/src/Yasumi/data/translations/epiphanyEve.php @@ -0,0 +1,18 @@ + + */ + +// Translations for Epiphany Eve +return [ + 'da_DK' => 'Helligtrekongersaften', + 'en_US' => 'Epiphany Eve', + 'sv_SE' => 'trettondagsafton', +]; diff --git a/src/Yasumi/data/translations/newYearsEve.php b/src/Yasumi/data/translations/newYearsEve.php index 0a6a6133c..56de73ade 100755 --- a/src/Yasumi/data/translations/newYearsEve.php +++ b/src/Yasumi/data/translations/newYearsEve.php @@ -16,4 +16,5 @@ 'en_US' => 'New Year\'s Eve', 'ko_KR' => '신년전야', 'lv_LV' => 'Vecgada vakars', + 'sv_SE' => 'nyårsafton', ]; diff --git a/src/Yasumi/data/translations/stJohnsDay.php b/src/Yasumi/data/translations/stJohnsDay.php index 3e2b272e6..6907dda89 100644 --- a/src/Yasumi/data/translations/stJohnsDay.php +++ b/src/Yasumi/data/translations/stJohnsDay.php @@ -12,6 +12,7 @@ // Translations for St. John's Day return [ + 'da_DK' => 'Sankthansaften', 'el_GR' => 'Σύναξις Προφήτου Προδρόμου και Βαπτιστού Ιωάννου', 'en_US' => 'St. John\'s Day', 'es_ES' => 'Sant Joan', diff --git a/src/Yasumi/data/translations/stJohnsEve.php b/src/Yasumi/data/translations/stJohnsEve.php new file mode 100644 index 000000000..b979daa37 --- /dev/null +++ b/src/Yasumi/data/translations/stJohnsEve.php @@ -0,0 +1,18 @@ + + */ + +// Translations for St. John's Eve +return [ + 'da_DK' => 'Sankthansaften', + 'en_US' => 'St. John\'s Eve', + 'sv_SE' => 'midsommarafton', +]; diff --git a/src/Yasumi/data/translations/walpurgisEve.php b/src/Yasumi/data/translations/walpurgisEve.php new file mode 100755 index 000000000..3570a04a1 --- /dev/null +++ b/src/Yasumi/data/translations/walpurgisEve.php @@ -0,0 +1,17 @@ + + */ + +// Translations for Walpurgis Night +return [ + 'en_US' => 'Walpurgis Night', + 'sv_SE' => 'valborgsmässoafton', +]; diff --git a/tests/Sweden/AllSaintsEveTest.php b/tests/Sweden/AllSaintsEveTest.php new file mode 100644 index 000000000..3897206ba --- /dev/null +++ b/tests/Sweden/AllSaintsEveTest.php @@ -0,0 +1,95 @@ + + */ + +namespace Yasumi\tests\Sweden; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing All Saints' Eve in Sweden. + */ +class AllSaintsEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'allSaintsEve'; + + /** + * 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 + * + * @throws \ReflectionException + */ + public function testHoliday($year, $expected) + { + $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 + { + $data = []; + + for ($y = 0; $y < 50; $y++) { + $year = $this->generateRandomYear(); + $date = new DateTime("$year-10-30", new DateTimeZone(self::TIMEZONE)); + + // Check between 30 October and 5th of November the day that is a Friday + for ($d = 0; $d <= 7; ++$d) { + if ($date->format('l') === 'Friday') { + $data[] = [$year, $date]; + break; + } + $date->add(new DateInterval('P1D')); + } + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'alla helgons afton'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + } +} diff --git a/tests/Sweden/ChristmasEveTest.php b/tests/Sweden/ChristmasEveTest.php index d0c7eb967..2502f163e 100644 --- a/tests/Sweden/ChristmasEveTest.php +++ b/tests/Sweden/ChristmasEveTest.php @@ -72,6 +72,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_OBSERVANCE); } } diff --git a/tests/Sweden/EpiphanyEveTest.php b/tests/Sweden/EpiphanyEveTest.php new file mode 100644 index 000000000..ab72505f2 --- /dev/null +++ b/tests/Sweden/EpiphanyEveTest.php @@ -0,0 +1,77 @@ + + */ + +namespace Yasumi\tests\Sweden; + +use DateTime; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class containing tests for Epiphany Eve in Sweden. + */ +class EpiphanyEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'epiphanyEve'; + + /** + * 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 + * + * @throws \ReflectionException + */ + public function testHoliday($year, $expected) + { + $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 day of the holiday defined in this test + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(1, 5, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'trettondagsafton'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + } +} diff --git a/tests/Sweden/NewYearsEveTest.php b/tests/Sweden/NewYearsEveTest.php new file mode 100644 index 000000000..33508ffbd --- /dev/null +++ b/tests/Sweden/NewYearsEveTest.php @@ -0,0 +1,77 @@ + + */ + +namespace Yasumi\tests\Sweden; + +use DateTime; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing New Year's Eve in Sweden. + */ +class NewYearsEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'newYearsEve'; + + /** + * 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 + * + * @throws \ReflectionException + */ + public function testHoliday($year, $expected) + { + $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(12, 31, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'nyårsafton'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + } +} diff --git a/tests/Sweden/stJohnsDayTest.php b/tests/Sweden/StJohnsDayTest.php similarity index 97% rename from tests/Sweden/stJohnsDayTest.php rename to tests/Sweden/StJohnsDayTest.php index b70c108c5..a3039c38d 100644 --- a/tests/Sweden/stJohnsDayTest.php +++ b/tests/Sweden/StJohnsDayTest.php @@ -19,7 +19,7 @@ /** * Class for testing St. John's Day / Midsummer's Day in Sweden. */ -class stJohnsDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +class StJohnsDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday to be tested diff --git a/tests/Sweden/StJohnsEveTest.php b/tests/Sweden/StJohnsEveTest.php new file mode 100644 index 000000000..6f030e8d9 --- /dev/null +++ b/tests/Sweden/StJohnsEveTest.php @@ -0,0 +1,75 @@ + + */ + +namespace Yasumi\tests\Sweden; + +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; +use Yasumi\Yasumi; + +/** + * Class for testing St. John's Eve / Midsummer's Eve in Sweden. + */ +class StJohnsEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'stJohnsEve'; + + /** + * Tests the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(); + + $holidays = Yasumi::create(self::REGION, $year); + $holiday = $holidays->getHoliday(self::HOLIDAY); + + // Some basic assertions + $this->assertInstanceOf('Yasumi\Provider\\' . \str_replace('/', '\\', self::REGION), $holidays); + $this->assertInstanceOf(Holiday::class, $holiday); + $this->assertNotNull($holiday); + + // Holiday specific assertions + $this->assertEquals('Friday', $holiday->format('l')); + $this->assertGreaterThanOrEqual(19, $holiday->format('j')); + $this->assertLessThanOrEqual(25, $holiday->format('j')); + + unset($holiday, $holidays); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'midsommarafton'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + } +} diff --git a/tests/Sweden/SwedenTest.php b/tests/Sweden/SwedenTest.php index a9b56c57b..f58706af6 100644 --- a/tests/Sweden/SwedenTest.php +++ b/tests/Sweden/SwedenTest.php @@ -42,7 +42,6 @@ public function testOfficialHolidays(): void 'nationalDay', 'stJohnsDay', // Midsummer's Day 'allSaintsDay', - 'christmasEve', 'christmasDay', 'secondChristmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); @@ -54,7 +53,14 @@ public function testOfficialHolidays(): void */ public function testObservedHolidays(): void { - $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + $this->assertDefinedHolidays([ + 'epiphanyEve', + 'walpurgisEve', + 'stJohnsEve', + 'allSaintsEve', + 'christmasEve', + 'newYearsEve', + ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } /** diff --git a/tests/Sweden/WalpurgisEveTest.php b/tests/Sweden/WalpurgisEveTest.php new file mode 100644 index 000000000..86916f8b6 --- /dev/null +++ b/tests/Sweden/WalpurgisEveTest.php @@ -0,0 +1,77 @@ + + */ + +namespace Yasumi\tests\Sweden; + +use DateTime; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class containing tests for Walpurgis Night in Sweden. + */ +class WalpurgisEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'walpurgisEve'; + + /** + * 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 + * + * @throws \ReflectionException + */ + public function testHoliday($year, $expected) + { + $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 day of the holiday defined in this test + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + return $this->generateRandomDates(4, 30, self::TIMEZONE); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'valborgsmässoafton'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OBSERVANCE); + } +} From aeaee03eaa742adeb5eb247fe4b5cc9b3358a406 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 10:28:20 +0900 Subject: [PATCH 062/133] Upgrade to PHPUnit 8. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 3 +- composer.json | 2 +- tests/Australia/ACT/ACTTest.php | 2 +- tests/Australia/ACT/CanberraDayTest.php | 2 +- tests/Australia/ACT/EasterSaturdayTest.php | 2 +- tests/Australia/ACT/EasterSundayTest.php | 2 +- tests/Australia/ACT/LabourDayTest.php | 2 +- tests/Australia/ACT/QueensBirthdayTest.php | 2 +- tests/Australia/ACT/ReconciliationDayTest.php | 2 +- tests/Australia/AnzacDayTest.php | 2 +- tests/Australia/AustraliaDayTest.php | 2 +- tests/Australia/AustraliaTest.php | 2 +- tests/Australia/BoxingDayTest.php | 4 +- tests/Australia/ChristmasDayTest.php | 4 +- tests/Australia/EasterMondayTest.php | 6 +- tests/Australia/GoodFridayTest.php | 2 +- tests/Australia/NSW/BankHolidayTest.php | 2 +- tests/Australia/NSW/EasterSaturdayTest.php | 2 +- tests/Australia/NSW/EasterSundayTest.php | 2 +- tests/Australia/NSW/LabourDayTest.php | 2 +- tests/Australia/NSW/NSWTest.php | 2 +- tests/Australia/NSW/QueensBirthdayTest.php | 2 +- tests/Australia/NT/EasterSaturdayTest.php | 2 +- tests/Australia/NT/MayDayTest.php | 2 +- tests/Australia/NT/NTTest.php | 2 +- tests/Australia/NT/PicnicDayTest.php | 2 +- tests/Australia/NT/QueensBirthdayTest.php | 2 +- tests/Australia/NewYearsDayTest.php | 4 +- .../Queensland/Brisbane/BrisbaneTest.php | 2 +- .../Queensland/Brisbane/PeoplesDayTest.php | 2 +- tests/Australia/Queensland/LabourDayTest.php | 2 +- .../Queensland/QueensBirthdayTest.php | 2 +- tests/Australia/Queensland/QueenslandTest.php | 2 +- tests/Australia/SA/AdelaideCupDayTest.php | 2 +- tests/Australia/SA/ChristmasDayTest.php | 4 +- tests/Australia/SA/EasterSaturdayTest.php | 2 +- tests/Australia/SA/LabourDayTest.php | 2 +- tests/Australia/SA/ProclamationDayTest.php | 2 +- tests/Australia/SA/QueensBirthdayTest.php | 2 +- tests/Australia/SA/SATest.php | 2 +- .../CentralNorth/CentralNorthTest.php | 2 +- .../CentralNorth/DevonportShowTest.php | 2 +- tests/Australia/Tasmania/EightHourDayTest.php | 2 +- .../FlindersIsland/FlindersIslandShowTest.php | 2 +- .../FlindersIsland/FlindersIslandTest.php | 2 +- .../KingIsland/KingIslandShowTest.php | 2 +- .../Tasmania/KingIsland/KingIslandTest.php | 2 +- .../Tasmania/Northeast/LauncestonShowTest.php | 2 +- .../Tasmania/Northeast/NortheastTest.php | 2 +- .../Tasmania/Northwest/BurnieShowTest.php | 2 +- .../Northwest/CircularHead/AGFESTTest.php | 2 +- .../CircularHead/CircularHeadTest.php | 2 +- .../Tasmania/Northwest/NorthwestTest.php | 2 +- .../Australia/Tasmania/QueensBirthdayTest.php | 2 +- .../Australia/Tasmania/RecreationDayTest.php | 2 +- .../Tasmania/South/HobartShowTest.php | 2 +- tests/Australia/Tasmania/South/SouthTest.php | 2 +- .../South/Southeast/HobartRegattaTest.php | 2 +- .../South/Southeast/SoutheastTest.php | 2 +- tests/Australia/Tasmania/TasmaniaTest.php | 2 +- .../Victoria/AFLGrandFinalFridayTest.php | 2 +- .../Australia/Victoria/EasterSaturdayTest.php | 2 +- tests/Australia/Victoria/EasterSundayTest.php | 2 +- tests/Australia/Victoria/LabourDayTest.php | 2 +- .../Victoria/MelbourneCupDayTest.php | 2 +- .../Australia/Victoria/QueensBirthdayTest.php | 2 +- tests/Australia/Victoria/VictoriaTest.php | 2 +- tests/Australia/WA/LabourDayTest.php | 2 +- tests/Australia/WA/QueensBirthdayTest.php | 2 +- tests/Australia/WA/WATest.php | 2 +- .../Australia/WA/WesternAustraliaDayTest.php | 2 +- tests/Austria/AllSaintsDayTest.php | 2 +- tests/Austria/AssumptionOfMaryTest.php | 2 +- tests/Austria/AustriaTest.php | 2 +- tests/Austria/ChristmasTest.php | 2 +- tests/Austria/EpiphanyTest.php | 2 +- tests/Austria/ImmaculateConceptionTest.php | 2 +- tests/Austria/InternationalWorkersDayTest.php | 2 +- tests/Austria/NewYearsDayTest.php | 2 +- tests/Austria/SecondChristmasDayTest.php | 2 +- tests/Base/HolidayBetweenFilterTest.php | 17 ++- tests/Base/HolidayFiltersTest.php | 10 +- tests/Base/HolidayTest.php | 27 ++-- tests/Base/TranslationsTest.php | 56 +++---- tests/Base/YasumiTest.php | 73 +++++---- tests/Base/YasumiWorkdayTest.php | 38 ++--- tests/Belgium/AllSaintsDayTest.php | 2 +- tests/Belgium/ArmisticeDayTest.php | 2 +- tests/Belgium/AssumptionOfMaryTest.php | 2 +- tests/Belgium/BelgiumTest.php | 2 +- tests/Belgium/ChristmasTest.php | 2 +- tests/Belgium/InternationalWorkersDayTest.php | 2 +- tests/Belgium/NationalDayTest.php | 2 +- tests/Belgium/NewYearsDayTest.php | 2 +- tests/Bosnia/BosniaTest.php | 2 +- tests/Bosnia/ChristmasDayTest.php | 2 +- tests/Bosnia/DayAfterNewYearsDay.php | 2 +- tests/Bosnia/InternationalWorkersDayTest.php | 2 +- tests/Bosnia/NewYearsDayTest.php | 2 +- tests/Bosnia/OrthodoxChristmasDay.php | 2 +- tests/Bosnia/SecondLabourDay.php | 2 +- tests/Brazil/BrazilTest.php | 2 +- tests/Croatia/AllSaintsDayTest.php | 2 +- tests/Croatia/AssumptionOfMaryTest.php | 2 +- tests/Croatia/ChristmasDayTest.php | 2 +- tests/Croatia/EpiphanyTest.php | 2 +- tests/Croatia/InternationalWorkersDayTest.php | 2 +- tests/Croatia/NewYearsDayTest.php | 2 +- tests/Croatia/StStephensDayTest.php | 2 +- tests/CzechRepublic/ChristmasDayTest.php | 2 +- tests/CzechRepublic/ChristmasEveTest.php | 2 +- tests/CzechRepublic/CzechRepublicTest.php | 2 +- tests/CzechRepublic/CzechStateHoodDayTest.php | 2 +- .../IndependentCzechoslovakStateDayTest.php | 2 +- .../InternationalWorkersDayTest.php | 2 +- tests/CzechRepublic/JanHusDayTest.php | 2 +- tests/CzechRepublic/NewYearsDayTest.php | 2 +- .../RenewalOfIndependentCzechStateDayTest.php | 2 +- .../SaintsCyrilAndMethodiusDayTest.php | 2 +- .../CzechRepublic/SecondChristmasDayTest.php | 2 +- .../StruggleForFreedomAndDemocracyDayTest.php | 2 +- .../CzechRepublic/VictoryInEuropeDayTest.php | 2 +- tests/Denmark/ChristmasDayTest.php | 2 +- tests/Denmark/ChristmasEveTest.php | 2 +- tests/Denmark/DenmarkTest.php | 2 +- tests/Denmark/InternationalWorkersDayTest.php | 2 +- tests/Denmark/NewYearsDayTest.php | 2 +- tests/Denmark/NewYearsEveTest.php | 2 +- tests/Denmark/SecondChristmasDayTest.php | 2 +- tests/Estonia/ChristmasDayTest.php | 2 +- tests/Estonia/ChristmasEveDayTest.php | 2 +- tests/Estonia/EasterDayTest.php | 2 +- tests/Estonia/GoodFridayDayTest.php | 2 +- tests/Estonia/InternationalWorkersDayTest.php | 2 +- tests/Estonia/NewYearsDayTest.php | 2 +- tests/Estonia/PentecostTest.php | 2 +- tests/Estonia/SecondChristmasDayTest.php | 2 +- tests/Estonia/StJohnsDayTest.php | 2 +- tests/Finland/AllSaintsDayTest.php | 2 +- tests/Finland/ChristmasDayTest.php | 2 +- tests/Finland/EpiphanyTest.php | 2 +- tests/Finland/FinlandTest.php | 2 +- tests/Finland/InternationalWorkersDayTest.php | 2 +- tests/Finland/NewYearsDayTest.php | 2 +- tests/Finland/SecondChristmasDayTest.php | 2 +- tests/Finland/stJohnsDayTest.php | 2 +- tests/France/AllSaintsDayTest.php | 2 +- tests/France/AssumptionOfMaryTest.php | 2 +- tests/France/BasRhin/BasRhinTest.php | 2 +- tests/France/BasRhin/stStephensDayTest.php | 2 +- tests/France/ChristmasDayTest.php | 2 +- tests/France/FranceTest.php | 2 +- tests/France/HautRhin/HautRhinTest.php | 2 +- tests/France/HautRhin/stStephensDayTest.php | 2 +- tests/France/InternationalWorkersDayTest.php | 2 +- tests/France/Moselle/MoselleTest.php | 2 +- tests/France/Moselle/stStephensDayTest.php | 2 +- tests/France/NewYearsDayTest.php | 2 +- .../BadenWurttemberg/AllSaintsDayTest.php | 2 +- .../BadenWurttemberg/BadenWurttembergTest.php | 2 +- .../Germany/BadenWurttemberg/EpiphanyTest.php | 2 +- tests/Germany/Bavaria/AllSaintsDayTest.php | 2 +- tests/Germany/Bavaria/BavariaTest.php | 2 +- tests/Germany/Bavaria/EpiphanyTest.php | 2 +- tests/Germany/Berlin/BerlinTest.php | 2 +- tests/Germany/Brandenburg/BrandenburgTest.php | 2 +- .../Brandenburg/ReformationDayTest.php | 4 +- tests/Germany/Bremen/BremenTest.php | 2 +- tests/Germany/Bremen/ReformationDayTest.php | 4 +- tests/Germany/ChristmasTest.php | 2 +- tests/Germany/GermanyTest.php | 2 +- .../Germany/Hamburg/DayOfReformationTest.php | 4 +- tests/Germany/Hamburg/HamburgTest.php | 2 +- tests/Germany/Hesse/HesseTest.php | 2 +- tests/Germany/InternationalWorkersDayTest.php | 2 +- tests/Germany/LowerSaxony/LowerSaxonyTest.php | 2 +- .../LowerSaxony/ReformationDayTest.php | 4 +- .../MecklenburgWesternPomeraniaTest.php | 2 +- .../ReformationDayTest.php | 2 +- tests/Germany/NewYearsDayTest.php | 2 +- .../NorthRhineWestphalia/AllSaintsDayTest.php | 2 +- .../NorthRhineWestphaliaTest.php | 2 +- .../RhinelandPalatinate/AllSaintsDayTest.php | 2 +- .../RhinelandPalatinateTest.php | 2 +- tests/Germany/Saarland/AllSaintsDayTest.php | 2 +- .../Germany/Saarland/AssumptionOfMaryTest.php | 2 +- tests/Germany/Saarland/SaarlandTest.php | 2 +- tests/Germany/Saxony/ReformationDayTest.php | 4 +- .../Saxony/RepentanceAndPrayerDayTest.php | 2 +- tests/Germany/Saxony/SaxonyTest.php | 2 +- tests/Germany/SaxonyAnhalt/EpiphanyTest.php | 2 +- .../SaxonyAnhalt/ReformationDayTest.php | 4 +- .../Germany/SaxonyAnhalt/SaxonyAnhaltTest.php | 2 +- .../SchleswigHolstein/ReformationDayTest.php | 4 +- .../SchleswigHolsteinTest.php | 2 +- tests/Germany/SecondChristmasDayTest.php | 2 +- .../Germany/Thuringia/ReformationDayTest.php | 4 +- tests/Germany/Thuringia/ThuringiaTest.php | 2 +- tests/Greece/AnnunciationTest.php | 2 +- tests/Greece/AssumptionOfMaryTest.php | 2 +- tests/Greece/ChristmasDayTest.php | 2 +- tests/Greece/EpiphanyTest.php | 2 +- tests/Greece/GreeceTest.php | 2 +- tests/Greece/InternationalWorkersDayTest.php | 2 +- tests/Greece/NewYearsDayTest.php | 2 +- tests/Greece/ThreeHolyHierarchsTest.php | 2 +- tests/Hungary/AllSaintsDayTest.php | 2 +- tests/Hungary/ChristmasTest.php | 2 +- tests/Hungary/HungaryTest.php | 2 +- tests/Hungary/InternationalWorkersDayTest.php | 2 +- tests/Hungary/NewYearsDayTest.php | 2 +- tests/Hungary/SecondChristmasDayTest.php | 2 +- tests/Ireland/AugustHolidayTest.php | 2 +- tests/Ireland/ChristmasDayTest.php | 6 +- tests/Ireland/EasterMondayTest.php | 2 +- tests/Ireland/EasterTest.php | 2 +- tests/Ireland/GoodFridayTest.php | 2 +- tests/Ireland/IrelandTest.php | 2 +- tests/Ireland/JuneHolidayTest.php | 2 +- tests/Ireland/MayDayTest.php | 2 +- tests/Ireland/NewYearsDayTest.php | 6 +- tests/Ireland/OctoberHolidayTest.php | 2 +- tests/Ireland/PentecostTest.php | 2 +- tests/Ireland/StPatricksDayTest.php | 6 +- tests/Ireland/StStephensDayTest.php | 6 +- tests/Ireland/pentecostMondayTest.php | 2 +- tests/Italy/AllSaintsDayTest.php | 2 +- tests/Italy/AssumptionOfMaryTest.php | 2 +- tests/Italy/ChristmasTest.php | 2 +- tests/Italy/EpiphanyTest.php | 2 +- tests/Italy/ImmaculateConceptionTest.php | 2 +- tests/Italy/InternationalWorkersDayTest.php | 2 +- tests/Italy/ItalyTest.php | 2 +- tests/Italy/NewYearsDayTest.php | 2 +- tests/Italy/stStephensDayTest.php | 2 +- tests/Japan/JapanTest.php | 2 +- tests/Japan/PublicBridgeDayTest.php | 10 +- tests/Japan/SportsDayTest.php | 2 +- tests/Latvia/ChristmasDayTest.php | 2 +- tests/Latvia/ChristmasEveDayTest.php | 2 +- tests/Latvia/EasterDayTest.php | 2 +- tests/Latvia/EasterMondayDayTest.php | 2 +- tests/Latvia/GoodFridayDayTest.php | 2 +- tests/Latvia/InternationalWorkersDayTest.php | 2 +- tests/Latvia/MidsummerEveDayTest.php | 2 +- tests/Latvia/NewYearsDayTest.php | 2 +- tests/Latvia/NewYearsEveDayTest.php | 2 +- ...oclamationOfTheRepublicOfLatviaDayTest.php | 4 +- .../RestorationOfIndependenceDayTest.php | 4 +- tests/Latvia/SecondChristmasDayTest.php | 2 +- tests/Latvia/StJohnsDayTest.php | 2 +- tests/Lithuania/AllSaintsDayTest.php | 2 +- tests/Lithuania/AssumptionOfMaryDayTest.php | 2 +- tests/Lithuania/ChristmasDayTest.php | 2 +- tests/Lithuania/ChristmasEveDayTest.php | 2 +- tests/Lithuania/EasterDayTest.php | 2 +- tests/Lithuania/EasterMondayDayTest.php | 2 +- .../Lithuania/InternationalWorkersDayTest.php | 2 +- tests/Lithuania/NewYearsDayTest.php | 2 +- tests/Lithuania/SecondChristmasDayTest.php | 2 +- tests/Lithuania/StJohnsDayTest.php | 2 +- tests/Netherlands/ChristmasDayTest.php | 2 +- tests/Netherlands/EpiphanyTest.php | 2 +- tests/Netherlands/HalloweenTest.php | 2 +- .../InternationalWorkersDayTest.php | 2 +- tests/Netherlands/NetherlandsTest.php | 2 +- tests/Netherlands/NewYearsDayTest.php | 2 +- tests/Netherlands/ValentinesDayTest.php | 2 +- tests/Netherlands/secondChristmasdayTest.php | 2 +- tests/Netherlands/stMartinsDayTest.php | 2 +- tests/Netherlands/stNicholasDayTest.php | 2 +- tests/NewZealand/AnzacDayTest.php | 2 +- tests/NewZealand/BoxingDayTest.php | 2 +- tests/NewZealand/ChristmasDayTest.php | 2 +- tests/NewZealand/DayAfterNewYearsDayTest.php | 2 +- tests/NewZealand/EasterMondayTest.php | 2 +- tests/NewZealand/GoodFridayTest.php | 2 +- tests/NewZealand/LabourDayTest.php | 4 +- tests/NewZealand/NewYearsDayTest.php | 2 +- tests/NewZealand/NewZealandTest.php | 2 +- tests/NewZealand/QueensBirthdayTest.php | 6 +- tests/NewZealand/WaitangiDayTest.php | 2 +- tests/Norway/ChristmasDayTest.php | 2 +- tests/Norway/InternationalWorkersDayTest.php | 2 +- tests/Norway/NewYearsDayTest.php | 2 +- tests/Norway/NorwayTest.php | 2 +- tests/Norway/SecondChristmasDayTest.php | 2 +- tests/Poland/AllSaintsDayTest.php | 2 +- tests/Poland/AssumptionOfMaryTest.php | 2 +- tests/Poland/ChristmasTest.php | 2 +- tests/Poland/EpiphanyTest.php | 2 +- tests/Poland/InternationalWorkersDayTest.php | 2 +- tests/Poland/NewYearsDayTest.php | 2 +- tests/Poland/PolandTest.php | 2 +- tests/Poland/SecondChristmasDayTest.php | 2 +- tests/Portugal/AllSaintsDayTest.php | 4 +- tests/Portugal/AssumptionOfMaryTest.php | 2 +- tests/Portugal/CarnationRevolutionDayTest.php | 2 +- tests/Portugal/ChristmasTest.php | 2 +- tests/Portugal/CorpusChristiTest.php | 2 +- tests/Portugal/ImmaculateConceptionTest.php | 2 +- .../Portugal/InternationalWorkersDayTest.php | 2 +- tests/Portugal/NewYearsDayTest.php | 2 +- tests/Portugal/PortugalDayTest.php | 10 +- tests/Portugal/PortugalTest.php | 2 +- tests/Portugal/PortugueseRepublicDayTest.php | 2 +- .../RestorationOfIndependenceTest.php | 2 +- tests/Romania/ChristmasDayTest.php | 2 +- tests/Romania/DayAfterNewYearsDayTest.php | 2 +- tests/Romania/InternationalWorkersDayTest.php | 2 +- tests/Romania/NewYearsDayTest.php | 2 +- tests/Romania/RomaniaTest.php | 2 +- tests/Romania/SecondChristmasDayTest.php | 2 +- tests/Russia/InternationalWomensDayTest.php | 2 +- tests/Russia/NewYearHolidaysDay2Test.php | 2 +- tests/Russia/NewYearHolidaysDay3Test.php | 2 +- tests/Russia/NewYearHolidaysDay4Test.php | 2 +- tests/Russia/NewYearHolidaysDay5Test.php | 2 +- tests/Russia/NewYearHolidaysDay6Test.php | 2 +- tests/Russia/NewYearHolidaysDay8Test.php | 2 +- tests/Russia/NewYearsDayTest.php | 2 +- tests/Russia/OrthodoxChristmasDayTest.php | 2 +- tests/Russia/SpringAndLabourDayTest.php | 2 +- tests/Russia/VictoryDayTest.php | 2 +- tests/Slovakia/AllSaintsDayTest.php | 2 +- tests/Slovakia/ChristmasDayTest.php | 2 +- tests/Slovakia/ChristmasEveTest.php | 2 +- tests/Slovakia/EasterMondayTest.php | 2 +- tests/Slovakia/EpiphanyTest.php | 2 +- tests/Slovakia/GoodFridayTest.php | 2 +- .../Slovakia/InternationalWorkersDayTest.php | 2 +- tests/Slovakia/OurLadyOfSorrowsDayTest.php | 2 +- .../SaintsCyrilAndMethodiusDayTest.php | 2 +- tests/Slovakia/SecondChristmasDayTest.php | 2 +- tests/Slovakia/SlovakConstitutionDayTest.php | 2 +- tests/Slovakia/SlovakIndependeceDayTest.php | 2 +- .../SlovakNationalUprisingDayTest.php | 2 +- tests/Slovakia/SlovakiaTest.php | 2 +- .../StruggleForFreedomAndDemocracyDayTest.php | 2 +- tests/Slovakia/VictoryInEuropeDayTest.php | 2 +- tests/SouthAfrica/ChristmasDayTest.php | 6 +- tests/SouthAfrica/FamilyDayTest.php | 2 +- tests/SouthAfrica/FreedomDayTest.php | 6 +- tests/SouthAfrica/GoodFridayTest.php | 2 +- tests/SouthAfrica/HeritageDayTest.php | 6 +- tests/SouthAfrica/HumanRightsDayTest.php | 6 +- tests/SouthAfrica/NationalWomensDayTest.php | 6 +- tests/SouthAfrica/NewYearsDayTest.php | 6 +- tests/SouthAfrica/ReconciliationDayTest.php | 6 +- tests/SouthAfrica/SecondChristmasDayTest.php | 6 +- tests/SouthAfrica/SouthAfricaTest.php | 2 +- tests/SouthAfrica/WorkersDayTest.php | 6 +- tests/SouthAfrica/YouthDayTest.php | 6 +- tests/SouthKorea/SouthKoreaTest.php | 2 +- tests/Spain/AllSaintsDayTest.php | 2 +- tests/Spain/Andalusia/AndalusiaTest.php | 2 +- tests/Spain/Aragon/AragonTest.php | 2 +- tests/Spain/AssumptionOfMaryTest.php | 2 +- tests/Spain/Asturias/AsturiasTest.php | 2 +- .../BalearicIslands/BalearicIslandsTest.php | 2 +- .../Spain/BasqueCountry/BasqueCountryTest.php | 2 +- .../Spain/CanaryIslands/CanaryIslandsTest.php | 2 +- tests/Spain/Cantabria/CantabriaTest.php | 2 +- .../CastileAndLeon/CastileAndLeonTest.php | 2 +- .../CastillaLaMancha/CastillaLaManchaTest.php | 2 +- tests/Spain/Catalonia/CataloniaTest.php | 2 +- tests/Spain/Catalonia/stJohnsDayTest.php | 2 +- tests/Spain/Ceuta/CeutaTest.php | 2 +- tests/Spain/ChristmasTest.php | 2 +- .../CommunityOfMadridTest.php | 2 +- tests/Spain/EpiphanyTest.php | 2 +- tests/Spain/Extremadura/ExtremaduraTest.php | 2 +- tests/Spain/Galicia/GaliciaTest.php | 2 +- tests/Spain/ImmaculateConceptionTest.php | 2 +- tests/Spain/InternationalWorkersDayTest.php | 2 +- tests/Spain/LaRioja/LaRiojaTest.php | 2 +- tests/Spain/Melilla/MelillaTest.php | 2 +- tests/Spain/Navarre/NavarreTest.php | 2 +- tests/Spain/NewYearsDayTest.php | 2 +- .../RegionOfMurcia/RegionOfMurciaTest.php | 2 +- tests/Spain/SpainTest.php | 2 +- .../ValencianCommunityTest.php | 2 +- tests/Spain/ValentinesDayTest.php | 2 +- tests/Spain/stJosephsDayTest.php | 2 +- tests/Sweden/AllSaintsDayTest.php | 2 +- tests/Sweden/AllSaintsEveTest.php | 2 +- tests/Sweden/ChristmasDayTest.php | 2 +- tests/Sweden/ChristmasEveTest.php | 2 +- tests/Sweden/EpiphanyEveTest.php | 2 +- tests/Sweden/EpiphanyTest.php | 2 +- tests/Sweden/InternationalWorkersDayTest.php | 2 +- tests/Sweden/NewYearsDayTest.php | 2 +- tests/Sweden/NewYearsEveTest.php | 2 +- tests/Sweden/SecondChristmasDayTest.php | 2 +- tests/Sweden/StJohnsDayTest.php | 2 +- tests/Sweden/StJohnsEveTest.php | 2 +- tests/Sweden/SwedenTest.php | 2 +- tests/Sweden/WalpurgisEveTest.php | 2 +- tests/Switzerland/Aargau/AargauTest.php | 2 +- tests/Switzerland/Aargau/ChristmasDayTest.php | 2 +- tests/Switzerland/Aargau/NewYearsDayTest.php | 2 +- .../AppenzellAusserrhodenTest.php | 2 +- .../ChristmasDayTest.php | 2 +- .../AppenzellAusserrhoden/NewYearsDayTest.php | 2 +- .../StStephensDayTest.php | 2 +- .../AppenzellInnerrhoden/AllSaintsDayTest.php | 2 +- .../AppenzellInnerrhodenTest.php | 2 +- .../AssumptionOfMaryTest.php | 2 +- .../AppenzellInnerrhoden/ChristmasDayTest.php | 2 +- .../ImmaculateConceptionTest.php | 2 +- .../AppenzellInnerrhoden/NewYearsDayTest.php | 2 +- .../StStephensDayTest.php | 2 +- .../BaselLandschaft/BaselLandschaftTest.php | 2 +- .../BaselLandschaft/ChristmasDayTest.php | 2 +- .../BaselLandschaft/NewYearsDayTest.php | 2 +- .../BaselLandschaft/StStephensDayTest.php | 2 +- .../BaselLandschaft/WorkersDayTest.php | 6 +- .../Switzerland/BaselStadt/BaselStadtTest.php | 2 +- .../BaselStadt/ChristmasDayTest.php | 2 +- .../BaselStadt/NewYearsDayTest.php | 2 +- .../BaselStadt/StStephensDayTest.php | 2 +- .../Switzerland/BaselStadt/WorkersDayTest.php | 6 +- tests/Switzerland/Bern/BernTest.php | 2 +- tests/Switzerland/Bern/ChristmasDayTest.php | 2 +- tests/Switzerland/Bern/NewYearsDayTest.php | 2 +- tests/Switzerland/Bern/StStephensDayTest.php | 2 +- .../Switzerland/Fribourg/ChristmasDayTest.php | 2 +- tests/Switzerland/Fribourg/FribourgTest.php | 2 +- .../Switzerland/Fribourg/NewYearsDayTest.php | 2 +- tests/Switzerland/Geneva/ChristmasDayTest.php | 2 +- tests/Switzerland/Geneva/GenevaTest.php | 2 +- tests/Switzerland/Geneva/NewYearsDayTest.php | 2 +- tests/Switzerland/Glarus/AllSaintsDayTest.php | 2 +- tests/Switzerland/Glarus/ChristmasDayTest.php | 2 +- tests/Switzerland/Glarus/GlarusTest.php | 2 +- tests/Switzerland/Glarus/NewYearsDayTest.php | 2 +- .../Switzerland/Glarus/StStephensDayTest.php | 2 +- .../Switzerland/Grisons/ChristmasDayTest.php | 2 +- tests/Switzerland/Grisons/GrisonsTest.php | 2 +- tests/Switzerland/Grisons/NewYearsDayTest.php | 2 +- .../Switzerland/Grisons/StStephensDayTest.php | 2 +- tests/Switzerland/Jura/AllSaintsDayTest.php | 2 +- .../Switzerland/Jura/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Jura/ChristmasDayTest.php | 2 +- tests/Switzerland/Jura/JuraTest.php | 2 +- tests/Switzerland/Jura/NewYearsDayTest.php | 2 +- tests/Switzerland/Jura/WorkersDayTest.php | 6 +- .../Switzerland/Lucerne/AllSaintsDayTest.php | 2 +- .../Lucerne/AssumptionOfMaryTest.php | 2 +- .../Switzerland/Lucerne/ChristmasDayTest.php | 2 +- .../Lucerne/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Lucerne/LucerneTest.php | 2 +- tests/Switzerland/Lucerne/NewYearsDayTest.php | 2 +- .../Switzerland/Lucerne/StStephensDayTest.php | 2 +- .../Neuchatel/ChristmasDayTest.php | 2 +- tests/Switzerland/Neuchatel/NeuchatelTest.php | 2 +- .../Switzerland/Neuchatel/NewYearsDayTest.php | 2 +- .../Switzerland/Neuchatel/WorkersDayTest.php | 6 +- .../Nidwalden/AllSaintsDayTest.php | 2 +- .../Nidwalden/AssumptionOfMaryTest.php | 2 +- .../Nidwalden/ChristmasDayTest.php | 2 +- .../Nidwalden/ImmaculateConceptionTest.php | 2 +- .../Switzerland/Nidwalden/NewYearsDayTest.php | 2 +- tests/Switzerland/Nidwalden/NidwaldenTest.php | 2 +- .../Switzerland/Nidwalden/StJosephDayTest.php | 2 +- .../Nidwalden/StStephensDayTest.php | 2 +- .../Switzerland/Obwalden/AllSaintsDayTest.php | 2 +- .../Obwalden/AssumptionOfMaryTest.php | 2 +- .../Switzerland/Obwalden/ChristmasDayTest.php | 2 +- .../Obwalden/ImmaculateConceptionTest.php | 2 +- .../Switzerland/Obwalden/NewYearsDayTest.php | 2 +- tests/Switzerland/Obwalden/ObwaldenTest.php | 2 +- .../Obwalden/StStephensDayTest.php | 2 +- .../Schaffhausen/ChristmasDayTest.php | 2 +- .../Schaffhausen/NewYearsDayTest.php | 2 +- .../Schaffhausen/SchaffhausenTest.php | 2 +- .../Schaffhausen/StStephensDayTest.php | 2 +- .../Schaffhausen/WorkersDayTest.php | 6 +- tests/Switzerland/Schwyz/AllSaintsDayTest.php | 2 +- .../Schwyz/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Schwyz/ChristmasDayTest.php | 2 +- tests/Switzerland/Schwyz/EpiphanyTest.php | 2 +- .../Schwyz/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Schwyz/NewYearsDayTest.php | 2 +- tests/Switzerland/Schwyz/SchwyzTest.php | 2 +- tests/Switzerland/Schwyz/StJosephDayTest.php | 2 +- .../Switzerland/Schwyz/StStephensDayTest.php | 2 +- .../Solothurn/ChristmasDayTest.php | 2 +- .../Switzerland/Solothurn/NewYearsDayTest.php | 2 +- tests/Switzerland/Solothurn/SolothurnTest.php | 2 +- .../Switzerland/StGallen/AllSaintsDayTest.php | 2 +- .../Switzerland/StGallen/ChristmasDayTest.php | 2 +- .../Switzerland/StGallen/NewYearsDayTest.php | 2 +- tests/Switzerland/StGallen/StGallenTest.php | 2 +- .../StGallen/StStephensDayTest.php | 2 +- tests/Switzerland/SwitzerlandTest.php | 2 +- .../Switzerland/Thurgau/ChristmasDayTest.php | 2 +- tests/Switzerland/Thurgau/NewYearsDayTest.php | 2 +- .../Switzerland/Thurgau/StStephensDayTest.php | 2 +- tests/Switzerland/Thurgau/ThurgauTest.php | 2 +- tests/Switzerland/Thurgau/WorkersDayTest.php | 6 +- tests/Switzerland/Ticino/AllSaintsDayTest.php | 2 +- .../Ticino/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Ticino/ChristmasDayTest.php | 2 +- tests/Switzerland/Ticino/EpiphanyTest.php | 2 +- .../Ticino/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Ticino/NewYearsDayTest.php | 2 +- tests/Switzerland/Ticino/StJosephDayTest.php | 2 +- tests/Switzerland/Ticino/StPeterPaulTest.php | 2 +- .../Switzerland/Ticino/StStephensDayTest.php | 2 +- tests/Switzerland/Ticino/TicinoTest.php | 2 +- tests/Switzerland/Ticino/WorkersDayTest.php | 6 +- tests/Switzerland/Uri/AllSaintsDayTest.php | 2 +- .../Switzerland/Uri/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Uri/ChristmasDayTest.php | 2 +- tests/Switzerland/Uri/EpiphanyTest.php | 2 +- .../Uri/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Uri/NewYearsDayTest.php | 2 +- tests/Switzerland/Uri/StJosephDayTest.php | 2 +- tests/Switzerland/Uri/StStephensDayTest.php | 2 +- tests/Switzerland/Uri/UriTest.php | 2 +- tests/Switzerland/Valais/AllSaintsDayTest.php | 2 +- .../Valais/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Valais/ChristmasDayTest.php | 2 +- .../Valais/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Valais/NewYearsDayTest.php | 2 +- tests/Switzerland/Valais/StJosephDayTest.php | 2 +- tests/Switzerland/Valais/ValaisTest.php | 2 +- tests/Switzerland/Vaud/ChristmasDayTest.php | 2 +- tests/Switzerland/Vaud/NewYearsDayTest.php | 2 +- tests/Switzerland/Vaud/VaudTest.php | 2 +- tests/Switzerland/Zug/AllSaintsDayTest.php | 2 +- .../Switzerland/Zug/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Zug/ChristmasDayTest.php | 2 +- .../Zug/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Zug/NewYearsDayTest.php | 2 +- tests/Switzerland/Zug/StStephensDayTest.php | 2 +- tests/Switzerland/Zug/ZugTest.php | 2 +- tests/Switzerland/Zurich/ChristmasDayTest.php | 2 +- tests/Switzerland/Zurich/NewYearsDayTest.php | 2 +- .../Switzerland/Zurich/StStephensDayTest.php | 2 +- tests/Switzerland/Zurich/WorkersDayTest.php | 6 +- tests/Switzerland/Zurich/ZurichTest.php | 2 +- tests/USA/NewYearsDayTest.php | 2 +- tests/USA/USATest.php | 2 +- tests/USA/VeteransDayTest.php | 4 +- tests/Ukraine/ChristmasDayTest.php | 2 +- tests/Ukraine/InternationalWomensDayTest.php | 2 +- tests/Ukraine/InternationalWorkersDayTest.php | 2 +- tests/Ukraine/NewYearsDayTest.php | 2 +- .../SecondInternationalWorkersDayTest.php | 2 +- tests/Ukraine/UkraineTest.php | 2 +- tests/Ukraine/VictoryDayTest.php | 2 +- tests/UnitedKingdom/BoxingDayTest.php | 2 +- tests/UnitedKingdom/ChristmasDayTest.php | 2 +- tests/UnitedKingdom/EasterMondayTest.php | 2 +- tests/UnitedKingdom/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/UnitedKingdomTest.php | 2 +- tests/YasumiBase.php | 141 +++++++++--------- 559 files changed, 819 insertions(+), 794 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a73b3d485..1ce1e86a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,11 +8,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ### Added - Holiday Provider for South Korea. [\#156](https://github.com/azuyalabs/yasumi/pull/156) ([blood72](https://github.com/blood72)) - Translation for the Easter holiday for the 'fr_FR' locale [\#146](https://github.com/azuyalabs/yasumi/pull/146) ([pioc92](https://github.com/pioc92)) -- Translation for the Pentecoste holiday for the 'fr_FR' locale [\#145](https://github.com/azuyalabs/yasumi/pull/145) ([pioc92](https://github.com/pioc92)) +- Translation for the Pentecost holiday for the 'fr_FR' locale [\#145](https://github.com/azuyalabs/yasumi/pull/145) ([pioc92](https://github.com/pioc92)) - Late Summer Bank Holiday in United Kingdom prior to 1965 [\#161](https://github.com/azuyalabs/yasumi/pull/161) ([c960657](https://github.com/c960657)) - Observance holidays for Sweden [\#172](https://github.com/azuyalabs/yasumi/pull/172) ([c960657](https://github.com/c960657)) ### Changed +- Upgraded to PHPUnit 8. - Replaced the standard 'InvalidArgumentException' when an invalid year or holiday provider are given by a new exception for each of these two situations separately ('InvalidYearException' and 'ProviderNotFoundException'). This allows you to better distinguish which exception may occur when instantiating the Yasumi class. [\#95](https://github.com/azuyalabs/yasumi/pull/95) ([qneyrat](https://github.com/qneyrat)) - Updated the translation for the All Saints holiday for the 'fr_FR' locale [\#152](https://github.com/azuyalabs/yasumi/pull/152) ([pioc92](https://github.com/pioc92)) - Updated the translation for the Armistice holiday for the 'fr_FR' locale [\#154](https://github.com/azuyalabs/yasumi/pull/154) ([pioc92](https://github.com/pioc92)) diff --git a/composer.json b/composer.json index c1d8274e1..f78313e71 100755 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "fzaninotto/faker": "~1.8", "mikey179/vfsstream": "~1.6", "phan/phan": "^2.2", - "phpunit/phpunit": "~7.5" + "phpunit/phpunit": "~8.3" }, "autoload": { "psr-4": { diff --git a/tests/Australia/ACT/ACTTest.php b/tests/Australia/ACT/ACTTest.php index c57dc2f0e..718f548f7 100644 --- a/tests/Australia/ACT/ACTTest.php +++ b/tests/Australia/ACT/ACTTest.php @@ -50,7 +50,7 @@ public function testOfficialHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(2018, 2100); } diff --git a/tests/Australia/ACT/CanberraDayTest.php b/tests/Australia/ACT/CanberraDayTest.php index 033b3bcda..af456528a 100644 --- a/tests/Australia/ACT/CanberraDayTest.php +++ b/tests/Australia/ACT/CanberraDayTest.php @@ -37,7 +37,7 @@ class CanberraDayTest extends ACTBaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/ACT/EasterSaturdayTest.php b/tests/Australia/ACT/EasterSaturdayTest.php index 92c50f97b..37fb0dc7e 100644 --- a/tests/Australia/ACT/EasterSaturdayTest.php +++ b/tests/Australia/ACT/EasterSaturdayTest.php @@ -33,7 +33,7 @@ class EasterSaturdayTest extends ACTBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/ACT/EasterSundayTest.php b/tests/Australia/ACT/EasterSundayTest.php index 8cf3efd36..b328e1d58 100644 --- a/tests/Australia/ACT/EasterSundayTest.php +++ b/tests/Australia/ACT/EasterSundayTest.php @@ -32,7 +32,7 @@ class EasterSundayTest extends ACTBaseTestCase implements YasumiTestCaseInterfac * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/ACT/LabourDayTest.php b/tests/Australia/ACT/LabourDayTest.php index 391af8199..c5a0fcba5 100644 --- a/tests/Australia/ACT/LabourDayTest.php +++ b/tests/Australia/ACT/LabourDayTest.php @@ -32,7 +32,7 @@ class LabourDayTest extends ACTBaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/ACT/QueensBirthdayTest.php b/tests/Australia/ACT/QueensBirthdayTest.php index 4f271bd8b..9850e6a4e 100644 --- a/tests/Australia/ACT/QueensBirthdayTest.php +++ b/tests/Australia/ACT/QueensBirthdayTest.php @@ -37,7 +37,7 @@ class QueensBirthdayTest extends ACTBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/ACT/ReconciliationDayTest.php b/tests/Australia/ACT/ReconciliationDayTest.php index 00f55ee6e..c7afb9aca 100644 --- a/tests/Australia/ACT/ReconciliationDayTest.php +++ b/tests/Australia/ACT/ReconciliationDayTest.php @@ -37,7 +37,7 @@ class ReconciliationDayTest extends ACTBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/AnzacDayTest.php b/tests/Australia/AnzacDayTest.php index ad5b8a2de..4a84f2209 100644 --- a/tests/Australia/AnzacDayTest.php +++ b/tests/Australia/AnzacDayTest.php @@ -37,7 +37,7 @@ class AnzacDayTest extends AustraliaBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/AustraliaDayTest.php b/tests/Australia/AustraliaDayTest.php index 7e565261b..133331d9d 100644 --- a/tests/Australia/AustraliaDayTest.php +++ b/tests/Australia/AustraliaDayTest.php @@ -32,7 +32,7 @@ class AustraliaDayTest extends AustraliaBaseTestCase implements YasumiTestCaseIn * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/AustraliaTest.php b/tests/Australia/AustraliaTest.php index 6b8066988..5a0a5b8ed 100644 --- a/tests/Australia/AustraliaTest.php +++ b/tests/Australia/AustraliaTest.php @@ -80,7 +80,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1987); } diff --git a/tests/Australia/BoxingDayTest.php b/tests/Australia/BoxingDayTest.php index 2ddf836e3..67384a43e 100644 --- a/tests/Australia/BoxingDayTest.php +++ b/tests/Australia/BoxingDayTest.php @@ -33,8 +33,8 @@ class BoxingDayTest extends AustraliaBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested - * @param string $expected the expected date + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param string $expected the expected date * @param string $expectedExtra the expected date for the additional holiday, or null if no additional holiday * * @throws \ReflectionException diff --git a/tests/Australia/ChristmasDayTest.php b/tests/Australia/ChristmasDayTest.php index 70bc08cab..946501a2c 100644 --- a/tests/Australia/ChristmasDayTest.php +++ b/tests/Australia/ChristmasDayTest.php @@ -33,8 +33,8 @@ class ChristmasDayTest extends AustraliaBaseTestCase implements YasumiTestCaseIn * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested - * @param string $expected the expected date + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param string $expected the expected date * @param string $expectedExtra the expected date for the additional holiday, or null if no additional holiday * * @throws \ReflectionException diff --git a/tests/Australia/EasterMondayTest.php b/tests/Australia/EasterMondayTest.php index f0039d19b..c76c27be4 100644 --- a/tests/Australia/EasterMondayTest.php +++ b/tests/Australia/EasterMondayTest.php @@ -34,7 +34,7 @@ class EasterMondayTest extends AustraliaBaseTestCase implements YasumiTestCaseIn * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException @@ -55,7 +55,7 @@ public function testHoliday($year, $expected) * * @dataProvider HolidayDataProvider2 * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException @@ -105,7 +105,7 @@ public function HolidayDataProvider2(): array [2095, '2095-04-26'], [2163, '2163-04-26'], ]; - + return $data; } diff --git a/tests/Australia/GoodFridayTest.php b/tests/Australia/GoodFridayTest.php index e0c7a64d4..6ef86da14 100644 --- a/tests/Australia/GoodFridayTest.php +++ b/tests/Australia/GoodFridayTest.php @@ -33,7 +33,7 @@ class GoodFridayTest extends AustraliaBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/NSW/BankHolidayTest.php b/tests/Australia/NSW/BankHolidayTest.php index def296b86..f01cdbd45 100644 --- a/tests/Australia/NSW/BankHolidayTest.php +++ b/tests/Australia/NSW/BankHolidayTest.php @@ -32,7 +32,7 @@ class BankHolidayTest extends NSWBaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/NSW/EasterSaturdayTest.php b/tests/Australia/NSW/EasterSaturdayTest.php index 064aca9eb..78b846c64 100644 --- a/tests/Australia/NSW/EasterSaturdayTest.php +++ b/tests/Australia/NSW/EasterSaturdayTest.php @@ -33,7 +33,7 @@ class EasterSaturdayTest extends NSWBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/NSW/EasterSundayTest.php b/tests/Australia/NSW/EasterSundayTest.php index f14724a66..c77663ff1 100644 --- a/tests/Australia/NSW/EasterSundayTest.php +++ b/tests/Australia/NSW/EasterSundayTest.php @@ -32,7 +32,7 @@ class EasterSundayTest extends NSWBaseTestCase implements YasumiTestCaseInterfac * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/NSW/LabourDayTest.php b/tests/Australia/NSW/LabourDayTest.php index 56c7bdcaf..698ce5c23 100644 --- a/tests/Australia/NSW/LabourDayTest.php +++ b/tests/Australia/NSW/LabourDayTest.php @@ -32,7 +32,7 @@ class LabourDayTest extends NSWBaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/NSW/NSWTest.php b/tests/Australia/NSW/NSWTest.php index f777d1012..fb9ce3217 100644 --- a/tests/Australia/NSW/NSWTest.php +++ b/tests/Australia/NSW/NSWTest.php @@ -59,7 +59,7 @@ public function testBankHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1921); } diff --git a/tests/Australia/NSW/QueensBirthdayTest.php b/tests/Australia/NSW/QueensBirthdayTest.php index 4c587d53a..1065a25a4 100644 --- a/tests/Australia/NSW/QueensBirthdayTest.php +++ b/tests/Australia/NSW/QueensBirthdayTest.php @@ -37,7 +37,7 @@ class QueensBirthdayTest extends NSWBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/NT/EasterSaturdayTest.php b/tests/Australia/NT/EasterSaturdayTest.php index 79c8b2dc5..7a6f5001f 100644 --- a/tests/Australia/NT/EasterSaturdayTest.php +++ b/tests/Australia/NT/EasterSaturdayTest.php @@ -33,7 +33,7 @@ class EasterSaturdayTest extends NTBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/NT/MayDayTest.php b/tests/Australia/NT/MayDayTest.php index d8b760927..6fa96c1c8 100644 --- a/tests/Australia/NT/MayDayTest.php +++ b/tests/Australia/NT/MayDayTest.php @@ -32,7 +32,7 @@ class MayDayTest extends NTBaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/NT/NTTest.php b/tests/Australia/NT/NTTest.php index d33118c3e..8b678cc5c 100644 --- a/tests/Australia/NT/NTTest.php +++ b/tests/Australia/NT/NTTest.php @@ -48,7 +48,7 @@ public function testOfficialHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1921); } diff --git a/tests/Australia/NT/PicnicDayTest.php b/tests/Australia/NT/PicnicDayTest.php index f67d2320a..d7e8ea14b 100644 --- a/tests/Australia/NT/PicnicDayTest.php +++ b/tests/Australia/NT/PicnicDayTest.php @@ -32,7 +32,7 @@ class PicnicDayTest extends NTBaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/NT/QueensBirthdayTest.php b/tests/Australia/NT/QueensBirthdayTest.php index 9e3c4ec83..de9d93cb6 100644 --- a/tests/Australia/NT/QueensBirthdayTest.php +++ b/tests/Australia/NT/QueensBirthdayTest.php @@ -37,7 +37,7 @@ class QueensBirthdayTest extends NTBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/NewYearsDayTest.php b/tests/Australia/NewYearsDayTest.php index 4af07ea72..822f0d60f 100644 --- a/tests/Australia/NewYearsDayTest.php +++ b/tests/Australia/NewYearsDayTest.php @@ -33,8 +33,8 @@ class NewYearsDayTest extends AustraliaBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested - * @param string $expected the expected date + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param string $expected the expected date * @param string $expectedExtra the expected date for the additional holiday, or null if no additional holiday * * @throws \ReflectionException diff --git a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php index 33417dcbb..285954aac 100644 --- a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php +++ b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php @@ -48,7 +48,7 @@ public function testOfficialHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1921); } diff --git a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php index 0b977a7b3..6c5c30a8a 100644 --- a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php +++ b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php @@ -32,7 +32,7 @@ class PeoplesDayTest extends BrisbaneBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Queensland/LabourDayTest.php b/tests/Australia/Queensland/LabourDayTest.php index 18bb0db61..08c04d4da 100644 --- a/tests/Australia/Queensland/LabourDayTest.php +++ b/tests/Australia/Queensland/LabourDayTest.php @@ -32,7 +32,7 @@ class LabourDayTest extends QueenslandBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Queensland/QueensBirthdayTest.php b/tests/Australia/Queensland/QueensBirthdayTest.php index d2054a83e..c18e6c045 100644 --- a/tests/Australia/Queensland/QueensBirthdayTest.php +++ b/tests/Australia/Queensland/QueensBirthdayTest.php @@ -37,7 +37,7 @@ class QueensBirthdayTest extends QueenslandBaseTestCase implements YasumiTestCas * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Queensland/QueenslandTest.php b/tests/Australia/Queensland/QueenslandTest.php index 996375bde..32b4d5df6 100644 --- a/tests/Australia/Queensland/QueenslandTest.php +++ b/tests/Australia/Queensland/QueenslandTest.php @@ -47,7 +47,7 @@ public function testOfficialHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1921); } diff --git a/tests/Australia/SA/AdelaideCupDayTest.php b/tests/Australia/SA/AdelaideCupDayTest.php index 559b939a3..c8b9c98f2 100644 --- a/tests/Australia/SA/AdelaideCupDayTest.php +++ b/tests/Australia/SA/AdelaideCupDayTest.php @@ -37,7 +37,7 @@ class AdelaideCupDayTest extends SABaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/SA/ChristmasDayTest.php b/tests/Australia/SA/ChristmasDayTest.php index e7b248eb4..ec5f66445 100644 --- a/tests/Australia/SA/ChristmasDayTest.php +++ b/tests/Australia/SA/ChristmasDayTest.php @@ -33,8 +33,8 @@ class ChristmasDayTest extends SABaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested - * @param string $expected the expected date + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param string $expected the expected date * @param string $expectedExtra the expected date for the additional holiday, or null if no additional holiday * * @throws \ReflectionException diff --git a/tests/Australia/SA/EasterSaturdayTest.php b/tests/Australia/SA/EasterSaturdayTest.php index 068d5d493..78e215acb 100644 --- a/tests/Australia/SA/EasterSaturdayTest.php +++ b/tests/Australia/SA/EasterSaturdayTest.php @@ -33,7 +33,7 @@ class EasterSaturdayTest extends SABaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/SA/LabourDayTest.php b/tests/Australia/SA/LabourDayTest.php index 5207d9bd6..1d950c647 100644 --- a/tests/Australia/SA/LabourDayTest.php +++ b/tests/Australia/SA/LabourDayTest.php @@ -32,7 +32,7 @@ class LabourDayTest extends SABaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/SA/ProclamationDayTest.php b/tests/Australia/SA/ProclamationDayTest.php index 19ed2d373..16a32a60b 100644 --- a/tests/Australia/SA/ProclamationDayTest.php +++ b/tests/Australia/SA/ProclamationDayTest.php @@ -32,7 +32,7 @@ class ProclamationDayTest extends SABaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/SA/QueensBirthdayTest.php b/tests/Australia/SA/QueensBirthdayTest.php index 97d1e58d6..b90ef370e 100644 --- a/tests/Australia/SA/QueensBirthdayTest.php +++ b/tests/Australia/SA/QueensBirthdayTest.php @@ -37,7 +37,7 @@ class QueensBirthdayTest extends SABaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/SA/SATest.php b/tests/Australia/SA/SATest.php index b2baaffec..9a015365f 100644 --- a/tests/Australia/SA/SATest.php +++ b/tests/Australia/SA/SATest.php @@ -48,7 +48,7 @@ public function testOfficialHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1973); } diff --git a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php index 2d9daf03a..dd0fbe800 100644 --- a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php +++ b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php @@ -48,7 +48,7 @@ public function testOfficialHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1921); } diff --git a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php index d986a775f..0d16d8111 100644 --- a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php +++ b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php @@ -32,7 +32,7 @@ class DevonportShowTest extends CentralNorthBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Tasmania/EightHourDayTest.php b/tests/Australia/Tasmania/EightHourDayTest.php index ac7c4fd39..64b71a1c2 100644 --- a/tests/Australia/Tasmania/EightHourDayTest.php +++ b/tests/Australia/Tasmania/EightHourDayTest.php @@ -32,7 +32,7 @@ class EightHourDayTest extends TasmaniaBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php index 4dbbc762a..c91ecb3ae 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php @@ -32,7 +32,7 @@ class FlindersIslandShowTest extends FlindersIslandBaseTestCase implements Yasum * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php index 7c3abf6db..886058a6f 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php @@ -49,7 +49,7 @@ public function testOfficialHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1921); } diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php index ed87f8dde..869c886d0 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php @@ -32,7 +32,7 @@ class KingIslandShowTest extends KingIslandBaseTestCase implements YasumiTestCas * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php index 1fe944563..c9ecbd0d1 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php @@ -49,7 +49,7 @@ public function testOfficialHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1921); } diff --git a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php index 51e600325..a1c8a1596 100644 --- a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php +++ b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php @@ -32,7 +32,7 @@ class LauncestonShowTest extends NortheastBaseTestCase implements YasumiTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Tasmania/Northeast/NortheastTest.php b/tests/Australia/Tasmania/Northeast/NortheastTest.php index 231fc9a35..2f1447536 100644 --- a/tests/Australia/Tasmania/Northeast/NortheastTest.php +++ b/tests/Australia/Tasmania/Northeast/NortheastTest.php @@ -49,7 +49,7 @@ public function testOfficialHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1921); } diff --git a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php index f620814d1..c7515bdfa 100644 --- a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php +++ b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php @@ -32,7 +32,7 @@ class BurnieShowTest extends NorthwestBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php index 95df6fefd..edaf48683 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php @@ -32,7 +32,7 @@ class AGFESTTest extends CircularHeadBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php index add83b131..71a247c4a 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php @@ -50,7 +50,7 @@ public function testOfficialHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1921); } diff --git a/tests/Australia/Tasmania/Northwest/NorthwestTest.php b/tests/Australia/Tasmania/Northwest/NorthwestTest.php index 65bcb955a..fadd5fb43 100644 --- a/tests/Australia/Tasmania/Northwest/NorthwestTest.php +++ b/tests/Australia/Tasmania/Northwest/NorthwestTest.php @@ -49,7 +49,7 @@ public function testOfficialHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1921); } diff --git a/tests/Australia/Tasmania/QueensBirthdayTest.php b/tests/Australia/Tasmania/QueensBirthdayTest.php index ce5d70ba1..a73628dd7 100644 --- a/tests/Australia/Tasmania/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/QueensBirthdayTest.php @@ -37,7 +37,7 @@ class QueensBirthdayTest extends TasmaniaBaseTestCase implements YasumiTestCaseI * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Tasmania/RecreationDayTest.php b/tests/Australia/Tasmania/RecreationDayTest.php index 12ca81c54..18ff45c71 100644 --- a/tests/Australia/Tasmania/RecreationDayTest.php +++ b/tests/Australia/Tasmania/RecreationDayTest.php @@ -32,7 +32,7 @@ class RecreationDayTest extends TasmaniaBaseTestCase implements YasumiTestCaseIn * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Tasmania/South/HobartShowTest.php b/tests/Australia/Tasmania/South/HobartShowTest.php index 516f6c300..26f1a949c 100644 --- a/tests/Australia/Tasmania/South/HobartShowTest.php +++ b/tests/Australia/Tasmania/South/HobartShowTest.php @@ -32,7 +32,7 @@ class HobartShowTest extends SouthBaseTestCase implements YasumiTestCaseInterfac * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Tasmania/South/SouthTest.php b/tests/Australia/Tasmania/South/SouthTest.php index 6d83ed001..c6d75bb96 100644 --- a/tests/Australia/Tasmania/South/SouthTest.php +++ b/tests/Australia/Tasmania/South/SouthTest.php @@ -49,7 +49,7 @@ public function testOfficialHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1921); } diff --git a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php index e8d689368..1f9068909 100644 --- a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php +++ b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php @@ -32,7 +32,7 @@ class HobartRegattaTest extends SoutheastBaseTestCase implements YasumiTestCaseI * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php index d4bff35ab..6518567e7 100644 --- a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php +++ b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php @@ -49,7 +49,7 @@ public function testOfficialHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1921); } diff --git a/tests/Australia/Tasmania/TasmaniaTest.php b/tests/Australia/Tasmania/TasmaniaTest.php index bb977385f..ba3703316 100644 --- a/tests/Australia/Tasmania/TasmaniaTest.php +++ b/tests/Australia/Tasmania/TasmaniaTest.php @@ -47,7 +47,7 @@ public function testOfficialHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1921); } diff --git a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php index 07c9a6ef1..3da8dea4d 100644 --- a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php +++ b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php @@ -35,7 +35,7 @@ class AFLGrandFinalFridayTest extends VictoriaBaseTestCase implements YasumiTest * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Victoria/EasterSaturdayTest.php b/tests/Australia/Victoria/EasterSaturdayTest.php index a7e53fd63..a3b8616d7 100644 --- a/tests/Australia/Victoria/EasterSaturdayTest.php +++ b/tests/Australia/Victoria/EasterSaturdayTest.php @@ -33,7 +33,7 @@ class EasterSaturdayTest extends VictoriaBaseTestCase implements YasumiTestCaseI * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Victoria/EasterSundayTest.php b/tests/Australia/Victoria/EasterSundayTest.php index 370b718d8..cf1fb9f8b 100644 --- a/tests/Australia/Victoria/EasterSundayTest.php +++ b/tests/Australia/Victoria/EasterSundayTest.php @@ -32,7 +32,7 @@ class EasterSundayTest extends VictoriaBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Victoria/LabourDayTest.php b/tests/Australia/Victoria/LabourDayTest.php index 55332201c..a09f064bd 100644 --- a/tests/Australia/Victoria/LabourDayTest.php +++ b/tests/Australia/Victoria/LabourDayTest.php @@ -32,7 +32,7 @@ class LabourDayTest extends VictoriaBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Victoria/MelbourneCupDayTest.php b/tests/Australia/Victoria/MelbourneCupDayTest.php index 2d6b914c7..462d64ce3 100644 --- a/tests/Australia/Victoria/MelbourneCupDayTest.php +++ b/tests/Australia/Victoria/MelbourneCupDayTest.php @@ -37,7 +37,7 @@ class MelbourneCupDayTest extends VictoriaBaseTestCase implements YasumiTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Victoria/QueensBirthdayTest.php b/tests/Australia/Victoria/QueensBirthdayTest.php index b7ce7cc56..542f245f9 100644 --- a/tests/Australia/Victoria/QueensBirthdayTest.php +++ b/tests/Australia/Victoria/QueensBirthdayTest.php @@ -37,7 +37,7 @@ class QueensBirthdayTest extends VictoriaBaseTestCase implements YasumiTestCaseI * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/Victoria/VictoriaTest.php b/tests/Australia/Victoria/VictoriaTest.php index d9713f62d..6729edc75 100644 --- a/tests/Australia/Victoria/VictoriaTest.php +++ b/tests/Australia/Victoria/VictoriaTest.php @@ -51,7 +51,7 @@ public function testOfficialHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(2015, 2018); } diff --git a/tests/Australia/WA/LabourDayTest.php b/tests/Australia/WA/LabourDayTest.php index fad438794..1d6c8f7c9 100644 --- a/tests/Australia/WA/LabourDayTest.php +++ b/tests/Australia/WA/LabourDayTest.php @@ -32,7 +32,7 @@ class LabourDayTest extends WABaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/WA/QueensBirthdayTest.php b/tests/Australia/WA/QueensBirthdayTest.php index ca4bdab20..686570ae3 100644 --- a/tests/Australia/WA/QueensBirthdayTest.php +++ b/tests/Australia/WA/QueensBirthdayTest.php @@ -37,7 +37,7 @@ class QueensBirthdayTest extends WABaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Australia/WA/WATest.php b/tests/Australia/WA/WATest.php index bb55af236..fd1e34a8b 100644 --- a/tests/Australia/WA/WATest.php +++ b/tests/Australia/WA/WATest.php @@ -48,7 +48,7 @@ public function testOfficialHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1921); } diff --git a/tests/Australia/WA/WesternAustraliaDayTest.php b/tests/Australia/WA/WesternAustraliaDayTest.php index 8c1148dbf..9e4dd47fb 100644 --- a/tests/Australia/WA/WesternAustraliaDayTest.php +++ b/tests/Australia/WA/WesternAustraliaDayTest.php @@ -32,7 +32,7 @@ class WesternAustraliaDayTest extends WABaseTestCase implements YasumiTestCaseIn * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Austria/AllSaintsDayTest.php b/tests/Austria/AllSaintsDayTest.php index 764da59b5..65974cf0e 100644 --- a/tests/Austria/AllSaintsDayTest.php +++ b/tests/Austria/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends AustriaBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Austria/AssumptionOfMaryTest.php b/tests/Austria/AssumptionOfMaryTest.php index f194d72dc..60969a120 100644 --- a/tests/Austria/AssumptionOfMaryTest.php +++ b/tests/Austria/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends AustriaBaseTestCase implements YasumiTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Austria/AustriaTest.php b/tests/Austria/AustriaTest.php index 64cc5dda0..161c46322 100644 --- a/tests/Austria/AustriaTest.php +++ b/tests/Austria/AustriaTest.php @@ -86,7 +86,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1955); } diff --git a/tests/Austria/ChristmasTest.php b/tests/Austria/ChristmasTest.php index 1a1b3e0ed..7b10ba5f6 100644 --- a/tests/Austria/ChristmasTest.php +++ b/tests/Austria/ChristmasTest.php @@ -31,7 +31,7 @@ class ChristmasTest extends AustriaBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Austria/EpiphanyTest.php b/tests/Austria/EpiphanyTest.php index 6c9de7bd4..98b217e75 100644 --- a/tests/Austria/EpiphanyTest.php +++ b/tests/Austria/EpiphanyTest.php @@ -31,7 +31,7 @@ class EpiphanyTest extends AustriaBaseTestCase implements YasumiTestCaseInterfac * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Austria/ImmaculateConceptionTest.php b/tests/Austria/ImmaculateConceptionTest.php index aaf254201..6853852e5 100644 --- a/tests/Austria/ImmaculateConceptionTest.php +++ b/tests/Austria/ImmaculateConceptionTest.php @@ -31,7 +31,7 @@ class ImmaculateConceptionTest extends AustriaBaseTestCase implements YasumiTest * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Austria/InternationalWorkersDayTest.php b/tests/Austria/InternationalWorkersDayTest.php index c24c41ddc..52b37b732 100644 --- a/tests/Austria/InternationalWorkersDayTest.php +++ b/tests/Austria/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends AustriaBaseTestCase implements YasumiT * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Austria/NewYearsDayTest.php b/tests/Austria/NewYearsDayTest.php index 50129f6cd..467f56221 100644 --- a/tests/Austria/NewYearsDayTest.php +++ b/tests/Austria/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends AustriaBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Austria/SecondChristmasDayTest.php b/tests/Austria/SecondChristmasDayTest.php index 4a30a6898..d75f1ca8e 100644 --- a/tests/Austria/SecondChristmasDayTest.php +++ b/tests/Austria/SecondChristmasDayTest.php @@ -31,7 +31,7 @@ class SecondChristmasDayTest extends AustriaBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Base/HolidayBetweenFilterTest.php b/tests/Base/HolidayBetweenFilterTest.php index 3d269c450..b4d25647b 100644 --- a/tests/Base/HolidayBetweenFilterTest.php +++ b/tests/Base/HolidayBetweenFilterTest.php @@ -229,7 +229,7 @@ public function testHolidaysBetweenDateRangeExclusiveStartEndDate(): void */ public function testHolidaysBetweenDateRangeWithStartBeforeInstanceYear(): void { - $year = 2015; + $year = 2015; $timezone = 'Europe/Oslo'; $holidays = Yasumi::create('Norway', $year); @@ -269,7 +269,7 @@ public function testHolidaysBetweenDateRangeWithStartBeforeInstanceYear(): void */ public function testHolidaysBetweenDateRangeWithEndAfterInstanceYear(): void { - $year = 2000; + $year = 2000; $timezone = 'Europe/Rome'; $holidays = Yasumi::create('Italy', $year); @@ -304,13 +304,14 @@ public function testHolidaysBetweenDateRangeWithEndAfterInstanceYear(): void /** * Tests that an InvalidArgumentException is thrown in case an invalid holiday provider is given. * - * @expectedException InvalidArgumentException * @throws \Exception * @throws \ReflectionException */ public function testWrongDates(): void { - $year = 2017; + $this->expectException(InvalidArgumentException::class); + + $year = 2017; $timezone = 'America/New_York'; $holidays = Yasumi::create('USA', $year); @@ -331,7 +332,7 @@ public function testWrongDates(): void public function testCountBetweenWithSubstitutes(): void { // There are official 12 holidays in Ireland in the year 2018, with 1 substituted holiday. - $year = 2018; + $year = 2018; $timezone = 'Europe/Dublin'; $holidays = Yasumi::create('Ireland', $year); @@ -372,7 +373,7 @@ public function testCountBetweenWithSubstitutes(): void public function testCountBetweenExcludingSubstituteHoliday(): void { // There are 2 official holidays in Ireland in the given date range, with 1 substituted holiday. - $year = 2018; + $year = 2018; $timezone = 'Europe/Dublin'; $holidays = Yasumi::create('Ireland', $year); @@ -417,7 +418,7 @@ public function testCountBetweenExcludingSubstituteHoliday(): void public function testCountBetweenExcludingSubstituteHolidayIncludingOriginalHoliday(): void { // There are 2 official holidays in Ireland in the given date range, with 1 substituted holiday. - $year = 2018; + $year = 2018; $timezone = 'Europe/Dublin'; $holidays = Yasumi::create('Ireland', $year); @@ -463,7 +464,7 @@ public function testCountBetweenExcludingSubstituteHolidayIncludingOriginalHolid public function testCountBetweenExcludingSubstituteHolidayAndOriginalHoliday(): void { // There is 1 official holidays in Ireland in the given date range. - $year = 2018; + $year = 2018; $timezone = 'Europe/Dublin'; $holidays = Yasumi::create('Ireland', $year); diff --git a/tests/Base/HolidayFiltersTest.php b/tests/Base/HolidayFiltersTest.php index fac3abb26..f59c725c0 100644 --- a/tests/Base/HolidayFiltersTest.php +++ b/tests/Base/HolidayFiltersTest.php @@ -39,7 +39,7 @@ public function testOfficialHolidaysFilter(): void // There are 11 official holidays in Ireland in the year 2018, with 1 substituted holiday. $holidays = Yasumi::create('Ireland', 2018); - $filteredHolidays = new OfficialHolidaysFilter($holidays->getIterator()); + $filteredHolidays = new OfficialHolidaysFilter($holidays->getIterator()); $filteredHolidaysArray = \iterator_to_array($filteredHolidays); // Assert array definitions @@ -73,7 +73,7 @@ public function testObservedHolidaysFilter(): void // There are 2 observed holidays in Ireland in the year 2018. $holidays = Yasumi::create('Ireland', 2018); - $filteredHolidays = new ObservedHolidaysFilter($holidays->getIterator()); + $filteredHolidays = new ObservedHolidaysFilter($holidays->getIterator()); $filteredHolidaysArray = \iterator_to_array($filteredHolidays); // Assert array definitions @@ -107,7 +107,7 @@ public function testBankHolidaysFilter(): void // There are no bank holidays in Ireland in the year 2018. $holidays = Yasumi::create('Ireland', 2018); - $filteredHolidays = new BankHolidaysFilter($holidays->getIterator()); + $filteredHolidays = new BankHolidaysFilter($holidays->getIterator()); $filteredHolidaysArray = \iterator_to_array($filteredHolidays); // Assert array definitions @@ -140,7 +140,7 @@ public function testSeasonalHolidaysFilter(): void { $holidays = Yasumi::create('Netherlands', 2017); - $filteredHolidays = new SeasonalHolidaysFilter($holidays->getIterator()); + $filteredHolidays = new SeasonalHolidaysFilter($holidays->getIterator()); $filteredHolidaysArray = \iterator_to_array($filteredHolidays); // Assert array definitions @@ -188,7 +188,7 @@ public function testOtherHolidaysFilter(): void { $holidays = Yasumi::create('Netherlands', 2017); - $filteredHolidays = new OtherHolidaysFilter($holidays->getIterator()); + $filteredHolidays = new OtherHolidaysFilter($holidays->getIterator()); $filteredHolidaysArray = \iterator_to_array($filteredHolidays); // Assert array definitions diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index 4f7608064..30aa5f551 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -15,6 +15,7 @@ use DateTime; use InvalidArgumentException; use PHPUnit\Framework\TestCase; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\tests\YasumiBase; use Yasumi\TranslationsInterface; @@ -31,22 +32,24 @@ class HolidayTest extends TestCase /** * Tests that an InvalidArgumentException is thrown in case an blank short name is given. * - * @expectedException InvalidArgumentException * @throws \Exception */ public function testHolidayBlankNameInvalidArgumentException(): void { + $this->expectException(InvalidArgumentException::class); + new Holiday('', [], new \DateTime()); } /** * Tests that an Yasumi\Exception\UnknownLocaleException is thrown in case an invalid locale is given. * - * @expectedException \Yasumi\Exception\UnknownLocaleException * @throws \Exception */ public function testCreateHolidayUnknownLocaleException(): void { + $this->expectException(UnknownLocaleException::class); + new Holiday('testHoliday', [], new DateTime(), 'wx-YZ'); } @@ -56,8 +59,8 @@ public function testCreateHolidayUnknownLocaleException(): void */ public function testHolidayIsJsonSerializable(): void { - $holiday = new Holiday('testHoliday', [], new DateTime(), 'en_US'); - $json = \json_encode($holiday); + $holiday = new Holiday('testHoliday', [], new DateTime(), 'en_US'); + $json = \json_encode($holiday); $instance = \json_decode($json, true); $this->assertIsArray($instance); @@ -89,7 +92,7 @@ public function testHolidayWithDateTimeInterface(): void */ public function testHolidayGetNameWithNoTranslations(): void { - $name = 'testHoliday'; + $name = 'testHoliday'; $holiday = new Holiday($name, [], new DateTime(), 'en_US'); $this->assertIsString($holiday->getName()); @@ -102,10 +105,10 @@ public function testHolidayGetNameWithNoTranslations(): void */ public function testHolidayGetNameWithOnlyDefaultTranslation(): void { - $name = 'testHoliday'; + $name = 'testHoliday'; $translation = 'My Holiday'; - $locale = 'en_US'; - $holiday = new Holiday($name, [$locale => $translation], new DateTime(), $locale); + $locale = 'en_US'; + $holiday = new Holiday($name, [$locale => $translation], new DateTime(), $locale); $this->assertIsString($holiday->getName()); $this->assertEquals($translation, $holiday->getName()); @@ -118,9 +121,9 @@ public function testHolidayGetNameWithOnlyDefaultTranslation(): void */ public function testHolidayGetNameWithOneNonDefaultTranslation(): void { - $name = 'testHoliday'; + $name = 'testHoliday'; $translation = 'My Holiday'; - $holiday = new Holiday($name, ['en_US' => $translation], new DateTime(), 'nl_NL'); + $holiday = new Holiday($name, ['en_US' => $translation], new DateTime(), 'nl_NL'); $this->assertNotNull($holiday->getName()); $this->assertIsString($holiday->getName()); @@ -169,7 +172,7 @@ public function testHolidayGetNameWithGlobalAndCustomTranslations(): void $translationsStub->expects($this->once())->method('getTranslations')->with($this->equalTo('newYearsDay'))->willReturn($translations); - $customLocale = 'nl_NL'; + $customLocale = 'nl_NL'; $customTranslation = 'Nieuwjaar'; $holiday = new Holiday( @@ -201,7 +204,7 @@ public function testHolidayGetNameWithOverridenGlobalTranslations(): void $translationsStub->expects($this->once())->method('getTranslations')->with($this->equalTo('newYearsDay'))->willReturn($translations); - $customLocale = 'pl_PL'; + $customLocale = 'pl_PL'; $customTranslation = 'Bardzo Nowy Rok'; $holiday = new Holiday( diff --git a/tests/Base/TranslationsTest.php b/tests/Base/TranslationsTest.php index b7559fa08..51f51f732 100644 --- a/tests/Base/TranslationsTest.php +++ b/tests/Base/TranslationsTest.php @@ -15,6 +15,7 @@ use InvalidArgumentException; use org\bovigo\vfs\vfsStream; use PHPUnit\Framework\TestCase; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Translations; /** @@ -37,8 +38,8 @@ public function testAddTranslation(): void { $translations = new Translations(self::LOCALES); - $locale = 'en_US'; - $shortName = 'newYearsDay'; + $locale = 'en_US'; + $shortName = 'newYearsDay'; $translation = 'New Year\'s Day'; $this->assertNull($translations->getTranslation($shortName, $locale)); @@ -62,8 +63,8 @@ public function testAddMultipleTranslations(): void { $translations = new Translations(self::LOCALES); - $firstLocale = 'en_US'; - $firstShortName = 'newYearsDay'; + $firstLocale = 'en_US'; + $firstShortName = 'newYearsDay'; $firstTranslation = 'New Year\'s Day'; $translations->addTranslation($firstShortName, $firstLocale, $firstTranslation); @@ -76,8 +77,8 @@ public function testAddMultipleTranslations(): void $this->assertIsString($translations->getTranslation($firstShortName, $firstLocale)); $this->assertEquals($firstTranslation, $translations->getTranslation($firstShortName, $firstLocale)); - $secondLocale = 'nl_NL'; - $secondShortName = 'easter'; + $secondLocale = 'nl_NL'; + $secondShortName = 'easter'; $secondTranslation = 'Eerste paasdag'; $translations->addTranslation($secondShortName, $secondLocale, $secondTranslation); @@ -90,8 +91,8 @@ public function testAddMultipleTranslations(): void $this->assertIsString($translations->getTranslation($secondShortName, $secondLocale)); $this->assertEquals($secondTranslation, $translations->getTranslation($secondShortName, $secondLocale)); - $thirdLocale = 'en_US'; - $thirdShortName = 'easter'; + $thirdLocale = 'en_US'; + $thirdShortName = 'easter'; $thirdTranslation = 'Easter Sunday'; $translations->addTranslation($thirdShortName, $thirdLocale, $thirdTranslation); @@ -111,15 +112,16 @@ public function testAddMultipleTranslations(): void /** * Tests that an UnknownLocaleException is thrown when adding translation for unknown locale. * - * @expectedException \Yasumi\Exception\UnknownLocaleException */ public function testAddTranslationUnknownLocaleException(): void { + $this->expectException(UnknownLocaleException::class); + $translations = new Translations(self::LOCALES); $unknownLocale = 'en_XY'; - $shortName = 'newYearsDay'; - $translation = 'New Year\'s Day'; + $shortName = 'newYearsDay'; + $translation = 'New Year\'s Day'; $translations->addTranslation($shortName, $unknownLocale, $translation); } @@ -131,8 +133,8 @@ public function testNoTranslationForUnknownHoliday(): void { $translations = new Translations(self::LOCALES); - $locale = 'en_US'; - $shortName = 'newYearsDay'; + $locale = 'en_US'; + $shortName = 'newYearsDay'; $translation = 'New Year\'s Day'; $unknownShortName = 'unknownHoliday'; @@ -150,8 +152,8 @@ public function testNoTranslationForNotTranslatedLocale(): void { $translations = new Translations(self::LOCALES); - $locale = 'en_US'; - $shortName = 'newYearsDay'; + $locale = 'en_US'; + $shortName = 'newYearsDay'; $translation = 'New Year\'s Day'; $unknownLocale = 'pl_PL'; @@ -166,7 +168,7 @@ public function testNoTranslationForNotTranslatedLocale(): void */ public function testLoadingTranslationsFromDirectory(): void { - $shortName = 'newYearsDay'; + $shortName = 'newYearsDay'; $fileContents = <<<'FILE' loadTranslations(vfsStream::url('root/lang')); - $locale = 'en_US'; + $locale = 'en_US'; $translation = 'New Year\'s Day'; $this->assertNotNull($translations->getTranslations($shortName)); @@ -195,7 +197,7 @@ public function testLoadingTranslationsFromDirectory(): void */ public function testNotLoadingTranslationsFromFileWithInvalidExtension(): void { - $shortName = 'newYearsDay'; + $shortName = 'newYearsDay'; $fileContents = <<<'FILE' expectException(UnknownLocaleException::class); + + $shortName = 'newYearsDay'; $fileContents = <<<'FILE' expectException(InvalidArgumentException::class); + vfsStream::setup(); $translations = new Translations(self::LOCALES); @@ -254,7 +258,7 @@ public function testLoadingTranslationsFromInexistentDirectory(): void */ public function testLoadingMultipleTranslationsFromDirectory(): void { - $firstShortName = 'newYearsDay'; + $firstShortName = 'newYearsDay'; $firstFileContents = <<<'FILE' [ - $firstShortName . '.php' => $firstFileContents, + $firstShortName . '.php' => $firstFileContents, $secondShortName . '.php' => $secondFileContents ] ]); @@ -284,7 +288,7 @@ public function testLoadingMultipleTranslationsFromDirectory(): void $translations->loadTranslations(vfsStream::url('root/lang')); - $locale = 'en_US'; + $locale = 'en_US'; $translation = 'New Year\'s Day'; $this->assertNotNull($translations->getTranslations($firstShortName)); @@ -292,7 +296,7 @@ public function testLoadingMultipleTranslationsFromDirectory(): void $this->assertIsString($translations->getTranslation($firstShortName, $locale)); $this->assertEquals($translation, $translations->getTranslation($firstShortName, $locale)); - $locale = 'nl_NL'; + $locale = 'nl_NL'; $translation = 'Eerste Paasdag'; $this->assertNotNull($translations->getTranslations($secondShortName)); diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index 6172dfe91..a178e49c8 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -15,6 +15,9 @@ use Faker\Factory; use InvalidArgumentException; use PHPUnit\Framework\TestCase; +use Yasumi\Exception\InvalidYearException; +use Yasumi\Exception\ProviderNotFoundException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\tests\YasumiBase; use Yasumi\Yasumi; @@ -40,44 +43,48 @@ class YasumiTest extends TestCase /** * Tests that an InvalidArgumentException is thrown in case an invalid year is given. * - * @expectedException \Yasumi\Exception\InvalidYearException * @throws \ReflectionException */ public function testCreateWithInvalidYear(): void { + $this->expectException(InvalidYearException::class); + Yasumi::create('Japan', 10100); } /** * Tests that an InvalidArgumentException is thrown in case an invalid holiday provider is given. * - * @expectedException \Yasumi\Exception\ProviderNotFoundException * @throws \ReflectionException */ public function testCreateWithInvalidProvider(): void { + $this->expectException(ProviderNotFoundException::class); + Yasumi::create('Mars'); } /** * Tests that an InvalidArgumentException is thrown in case we try to load a Trait as provider. * - * @expectedException InvalidArgumentException * @throws \ReflectionException */ public function testCreateWithInvalidProviderBecauseItsATrait(): void { + $this->expectException(InvalidArgumentException::class); + Yasumi::create('CommonHolidays'); } /** * Tests that an InvalidArgumentException is thrown in case we try to load the AbstractProvider as provider. * - * @expectedException InvalidArgumentException * @throws \ReflectionException */ public function testCreateWithAbstractClassProvider(): void { + $this->expectException(InvalidArgumentException::class); + Yasumi::create('AbstractProvider'); } @@ -87,7 +94,7 @@ public function testCreateWithAbstractClassProvider(): void */ public function testCreateWithAbstractExtension(): void { - $class = YasumiExternalProvider::class; + $class = YasumiExternalProvider::class; $instance = Yasumi::create( $class, Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND) @@ -98,11 +105,12 @@ public function testCreateWithAbstractExtension(): void /** * Tests that an Yasumi\Exception\UnknownLocaleException is thrown in case an invalid locale is given. * - * @expectedException \Yasumi\Exception\UnknownLocaleException * @throws \ReflectionException */ public function testCreateWithInvalidLocale(): void { + $this->expectException(UnknownLocaleException::class); + Yasumi::create( 'Japan', Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND), @@ -145,7 +153,7 @@ public function testCount(): void public function testGetType(): void { $holidays = Yasumi::create('Japan', Factory::create()->numberBetween(1949, self::YEAR_UPPER_BOUND)); - $holiday = $holidays->getHoliday('newYearsDay'); + $holiday = $holidays->getHoliday('newYearsDay'); $this->assertIsString($holiday->getType()); } @@ -156,7 +164,7 @@ public function testGetType(): void */ public function testGetYear(): void { - $year = Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND); + $year = Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND); $holidays = Yasumi::create('Netherlands', $year); $this->assertIsInt($holidays->getYear()); @@ -171,8 +179,8 @@ public function testGetYear(): void public function testNext(): void { $country = 'Japan'; - $name = 'childrensDay'; - $year = Factory::create()->numberBetween(1949, self::YEAR_UPPER_BOUND - 1); + $name = 'childrensDay'; + $year = Factory::create()->numberBetween(1949, self::YEAR_UPPER_BOUND - 1); $holidays = Yasumi::create($country, $year); @@ -182,11 +190,12 @@ public function testNext(): void /** * Tests the next function that an InvalidArgumentException is thrown in case a blank name is given. * - * @expectedException InvalidArgumentException * @throws \ReflectionException */ public function testNextWithBlankName(): void { + $this->expectException(InvalidArgumentException::class); + $holidays = Yasumi::create( 'Netherlands', Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND - 1) @@ -201,10 +210,10 @@ public function testNextWithBlankName(): void */ public function testPrevious(): void { - $country = 'Netherlands'; - $name = 'liberationDay'; + $country = 'Netherlands'; + $name = 'liberationDay'; $year_lower_limit = 1949; - $year = Factory::create()->numberBetween($year_lower_limit, self::YEAR_UPPER_BOUND); + $year = Factory::create()->numberBetween($year_lower_limit, self::YEAR_UPPER_BOUND); $holidays = Yasumi::create($country, $year); @@ -219,11 +228,12 @@ public function testPrevious(): void /** * Tests the previous function that an InvalidArgumentException is thrown in case a blank name is given. * - * @expectedException InvalidArgumentException * @throws \ReflectionException */ public function testPreviousWithBlankName(): void { + $this->expectException(InvalidArgumentException::class); + $holidays = Yasumi::create( 'Netherlands', Factory::create()->numberBetween(self::YEAR_LOWER_BOUND + 1, self::YEAR_UPPER_BOUND) @@ -237,7 +247,7 @@ public function testPreviousWithBlankName(): void */ public function testGetHolidayNames(): void { - $holidays = Yasumi::create('Japan', 2015); + $holidays = Yasumi::create('Japan', 2015); $holidayNames = $holidays->getHolidayNames(); $this->assertIsArray($holidayNames); @@ -262,11 +272,12 @@ public function testWhenIs(): void /** * Tests that the WhenIs function throws an InvalidArgumentException when a blank name is given. * - * @expectedException InvalidArgumentException * @throws \ReflectionException */ public function testWhenIsWithBlankName(): void { + $this->expectException(InvalidArgumentException::class); + $holidays = Yasumi::create('Japan', 2010); $holidays->whenIs(null); } @@ -274,11 +285,12 @@ public function testWhenIsWithBlankName(): void /** * Tests that an InvalidArgumentException is thrown in case a blank name is given for the getHoliday function. * - * @expectedException InvalidArgumentException * @throws \ReflectionException */ public function testGetHolidayWithBlankName(): void { + $this->expectException(InvalidArgumentException::class); + $holidays = Yasumi::create('Netherlands', 1999); $holidays->getHoliday(null); } @@ -291,7 +303,7 @@ public function testGetHolidayWithBlankName(): void public function testWhatWeekDayIs(): void { $holidays = Yasumi::create('Netherlands', 2110); - $weekDay = $holidays->whatWeekDayIs('stMartinsDay'); + $weekDay = $holidays->whatWeekDayIs('stMartinsDay'); $this->assertIsInt($weekDay); $this->assertEquals(2, $weekDay); @@ -300,11 +312,12 @@ public function testWhatWeekDayIs(): void /** * Tests that the whatWeekDayIs function throws an InvalidArgumentException when a blank name is given. * - * @expectedException InvalidArgumentException * @throws \ReflectionException */ public function testWhatWeekDayIsWithBlankName(): void { + $this->expectException(InvalidArgumentException::class); + $holidays = Yasumi::create('Netherlands', 2388); $holidays->whatWeekDayIs(null); } @@ -331,8 +344,8 @@ public function testGetProviders(): void */ public function testGetProvidersStaticCall(): void { - $provider = 'Ireland'; - $providers = Yasumi::getProviders(); + $provider = 'Ireland'; + $providers = Yasumi::getProviders(); $initial_providers = $providers; $this->assertNotEmpty($providers); @@ -355,9 +368,9 @@ public function testGetProvidersStaticCall(): void */ public function testIsHoliday(): void { - $year = 2110; + $year = 2110; $provider = 'Spain'; - $date = $year . '-08-15'; + $date = $year . '-08-15'; // Assertion using a DateTime instance $isHoliday = Yasumi::create($provider, $year)->isHoliday(new \DateTime($date)); @@ -381,9 +394,9 @@ public function testIsHoliday(): void */ public function testIsNotHoliday(): void { - $year = 5220; + $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)); @@ -425,9 +438,9 @@ public function testIsHolidayException(): void */ public function testIsWorkingDay(): void { - $year = 2020; + $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)); @@ -454,9 +467,9 @@ public function testIsWorkingDay(): void */ public function testIsNotWorkingDay(): void { - $year = 2016; + $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 8b0ce05f6..a496f47c2 100644 --- a/tests/Base/YasumiWorkdayTest.php +++ b/tests/Base/YasumiWorkdayTest.php @@ -28,21 +28,21 @@ class YasumiWorkdayTest extends TestCase public function testNextWorkingDay(): void { // Includes a weekend and a holiday - $provider = 'USA'; - $date = '2016-07-01'; - $timezone = 'America/New_York'; + $provider = 'USA'; + $date = '2016-07-01'; + $timezone = 'America/New_York'; $expectedDate = '2016-07-05'; // Assertion using a DateTime instance $startDate = new \DateTime($date, new \DateTimeZone($timezone)); - $result = Yasumi::nextWorkingDay($provider, $startDate); + $result = Yasumi::nextWorkingDay($provider, $startDate); $this->assertInstanceOf(\DateTime::class, $result); $this->assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); // Assertion using a DateTimeImmutable instance $startDate = new \DateTimeImmutable($date, new \DateTimeZone($timezone)); - $result = Yasumi::nextWorkingDay($provider, $startDate); + $result = Yasumi::nextWorkingDay($provider, $startDate); $this->assertInstanceOf(\DateTimeImmutable::class, $result); $this->assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); @@ -57,21 +57,21 @@ public function testNextWorkingDay(): void public function testPreviousWorkingDay(): void { // Includes a weekend and a holiday - $provider = 'USA'; - $date = '2016-07-05'; - $timezone = 'America/New_York'; + $provider = 'USA'; + $date = '2016-07-05'; + $timezone = 'America/New_York'; $expectedDate = '2016-07-01'; // Assertion using a DateTime instance $startDate = new \DateTime($date, new \DateTimeZone($timezone)); - $result = Yasumi::prevWorkingDay($provider, $startDate); + $result = Yasumi::prevWorkingDay($provider, $startDate); $this->assertInstanceOf(\DateTime::class, $result); $this->assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); // Assertion using a DateTimeImmutable instance $startDate = new \DateTimeImmutable($date, new \DateTimeZone($timezone)); - $result = Yasumi::prevWorkingDay($provider, $startDate); + $result = Yasumi::prevWorkingDay($provider, $startDate); $this->assertInstanceOf(\DateTimeImmutable::class, $result); $this->assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); @@ -104,32 +104,32 @@ public function testYearBoundary(): void * @see https://www.timeanddate.com/calendar/?year=2016&country=1 */ - $provider = 'USA'; - $timezone = 'America/New_York'; - $interval = 20; - $start = '2015-12-20'; - $expectedNext = '2016-01-20'; + $provider = 'USA'; + $timezone = 'America/New_York'; + $interval = 20; + $start = '2015-12-20'; + $expectedNext = '2016-01-20'; $expectedPrevious = '2015-12-18'; // Assertion using a DateTime instance $startDate = new \DateTime($start, new \DateTimeZone($timezone)); - $result = Yasumi::nextWorkingDay($provider, $startDate, $interval); + $result = Yasumi::nextWorkingDay($provider, $startDate, $interval); $this->assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); $startDate = new \DateTime($expectedNext, new \DateTimeZone($timezone)); - $result = Yasumi::prevWorkingDay($provider, $startDate, $interval); + $result = Yasumi::prevWorkingDay($provider, $startDate, $interval); $this->assertEquals($expectedPrevious, $result->format(self::FORMAT_DATE)); // Assertion using a DateTimeImmutable instance $startDate = new \DateTimeImmutable($start, new \DateTimeZone($timezone)); - $result = Yasumi::nextWorkingDay($provider, $startDate, $interval); + $result = Yasumi::nextWorkingDay($provider, $startDate, $interval); $this->assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); $startDate = new \DateTimeImmutable($expectedNext, new \DateTimeZone($timezone)); - $result = Yasumi::prevWorkingDay($provider, $startDate, $interval); + $result = Yasumi::prevWorkingDay($provider, $startDate, $interval); $this->assertEquals($expectedPrevious, $result->format(self::FORMAT_DATE)); } } diff --git a/tests/Belgium/AllSaintsDayTest.php b/tests/Belgium/AllSaintsDayTest.php index b98bc74d1..697c0d6b9 100644 --- a/tests/Belgium/AllSaintsDayTest.php +++ b/tests/Belgium/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Belgium/ArmisticeDayTest.php b/tests/Belgium/ArmisticeDayTest.php index 220e25f39..60ad4eeb2 100644 --- a/tests/Belgium/ArmisticeDayTest.php +++ b/tests/Belgium/ArmisticeDayTest.php @@ -31,7 +31,7 @@ class ArmisticeDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Belgium/AssumptionOfMaryTest.php b/tests/Belgium/AssumptionOfMaryTest.php index 623c685f0..97e68ef96 100644 --- a/tests/Belgium/AssumptionOfMaryTest.php +++ b/tests/Belgium/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends BelgiumBaseTestCase implements YasumiTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Belgium/BelgiumTest.php b/tests/Belgium/BelgiumTest.php index 84aed9382..ea5cda3e2 100644 --- a/tests/Belgium/BelgiumTest.php +++ b/tests/Belgium/BelgiumTest.php @@ -85,7 +85,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(); } diff --git a/tests/Belgium/ChristmasTest.php b/tests/Belgium/ChristmasTest.php index 1856d8a1e..3780bc4d6 100644 --- a/tests/Belgium/ChristmasTest.php +++ b/tests/Belgium/ChristmasTest.php @@ -31,7 +31,7 @@ class ChristmasTest extends BelgiumBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Belgium/InternationalWorkersDayTest.php b/tests/Belgium/InternationalWorkersDayTest.php index a8b41c4c8..199467662 100644 --- a/tests/Belgium/InternationalWorkersDayTest.php +++ b/tests/Belgium/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends BelgiumBaseTestCase implements YasumiT * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Belgium/NationalDayTest.php b/tests/Belgium/NationalDayTest.php index a22c73ad7..e5a916dc2 100644 --- a/tests/Belgium/NationalDayTest.php +++ b/tests/Belgium/NationalDayTest.php @@ -31,7 +31,7 @@ class NationalDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Belgium/NewYearsDayTest.php b/tests/Belgium/NewYearsDayTest.php index af1eeadf4..6dd764fc5 100644 --- a/tests/Belgium/NewYearsDayTest.php +++ b/tests/Belgium/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Bosnia/BosniaTest.php b/tests/Bosnia/BosniaTest.php index 227f8da83..14eaa9306 100644 --- a/tests/Bosnia/BosniaTest.php +++ b/tests/Bosnia/BosniaTest.php @@ -83,7 +83,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1992); } diff --git a/tests/Bosnia/ChristmasDayTest.php b/tests/Bosnia/ChristmasDayTest.php index 60541e82c..dd1c54d39 100644 --- a/tests/Bosnia/ChristmasDayTest.php +++ b/tests/Bosnia/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends BosniaBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Bosnia/DayAfterNewYearsDay.php b/tests/Bosnia/DayAfterNewYearsDay.php index a440db3ad..a68ed14f8 100644 --- a/tests/Bosnia/DayAfterNewYearsDay.php +++ b/tests/Bosnia/DayAfterNewYearsDay.php @@ -31,7 +31,7 @@ class DayAfterNewYearsDay extends BosniaBaseTestCase implements YasumiTestCaseIn * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Bosnia/InternationalWorkersDayTest.php b/tests/Bosnia/InternationalWorkersDayTest.php index 4607feede..afa7ee625 100644 --- a/tests/Bosnia/InternationalWorkersDayTest.php +++ b/tests/Bosnia/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends BosniaBaseTestCase implements YasumiTe * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Bosnia/NewYearsDayTest.php b/tests/Bosnia/NewYearsDayTest.php index 220aa03d2..4df11e0b9 100644 --- a/tests/Bosnia/NewYearsDayTest.php +++ b/tests/Bosnia/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends BosniaBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Bosnia/OrthodoxChristmasDay.php b/tests/Bosnia/OrthodoxChristmasDay.php index 8c5814ba7..2a89a3350 100644 --- a/tests/Bosnia/OrthodoxChristmasDay.php +++ b/tests/Bosnia/OrthodoxChristmasDay.php @@ -38,7 +38,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Bosnia/SecondLabourDay.php b/tests/Bosnia/SecondLabourDay.php index 03b0e6451..40ed71c6a 100644 --- a/tests/Bosnia/SecondLabourDay.php +++ b/tests/Bosnia/SecondLabourDay.php @@ -31,7 +31,7 @@ class SecondLabourDay extends BosniaBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Brazil/BrazilTest.php b/tests/Brazil/BrazilTest.php index 9fdccc47d..51be5944d 100644 --- a/tests/Brazil/BrazilTest.php +++ b/tests/Brazil/BrazilTest.php @@ -88,7 +88,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1980); } diff --git a/tests/Croatia/AllSaintsDayTest.php b/tests/Croatia/AllSaintsDayTest.php index eec55bb4f..15131e1d4 100644 --- a/tests/Croatia/AllSaintsDayTest.php +++ b/tests/Croatia/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Croatia/AssumptionOfMaryTest.php b/tests/Croatia/AssumptionOfMaryTest.php index e368677a6..929abb1fc 100644 --- a/tests/Croatia/AssumptionOfMaryTest.php +++ b/tests/Croatia/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends CroatiaBaseTestCase implements YasumiTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Croatia/ChristmasDayTest.php b/tests/Croatia/ChristmasDayTest.php index 56c5d31c9..283698c5a 100644 --- a/tests/Croatia/ChristmasDayTest.php +++ b/tests/Croatia/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Croatia/EpiphanyTest.php b/tests/Croatia/EpiphanyTest.php index 3daddb0d4..018767e6a 100644 --- a/tests/Croatia/EpiphanyTest.php +++ b/tests/Croatia/EpiphanyTest.php @@ -31,7 +31,7 @@ class EpiphanyTest extends CroatiaBaseTestCase implements YasumiTestCaseInterfac * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Croatia/InternationalWorkersDayTest.php b/tests/Croatia/InternationalWorkersDayTest.php index 805e8306e..f5adbb129 100644 --- a/tests/Croatia/InternationalWorkersDayTest.php +++ b/tests/Croatia/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends CroatiaBaseTestCase implements YasumiT * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Croatia/NewYearsDayTest.php b/tests/Croatia/NewYearsDayTest.php index 87953bbbc..950067c16 100644 --- a/tests/Croatia/NewYearsDayTest.php +++ b/tests/Croatia/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Croatia/StStephensDayTest.php b/tests/Croatia/StStephensDayTest.php index 8ce175c9f..0873aa07e 100644 --- a/tests/Croatia/StStephensDayTest.php +++ b/tests/Croatia/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInt * * @dataProvider stStephensDayDataProvider * - * @param int $year the year for which St. Stephen's Day needs to be tested + * @param int $year the year for which St. Stephen's Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/CzechRepublic/ChristmasDayTest.php b/tests/CzechRepublic/ChristmasDayTest.php index 2357c4beb..f979bed92 100644 --- a/tests/CzechRepublic/ChristmasDayTest.php +++ b/tests/CzechRepublic/ChristmasDayTest.php @@ -35,7 +35,7 @@ class ChristmasDayTest extends CzechRepublicBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/CzechRepublic/ChristmasEveTest.php b/tests/CzechRepublic/ChristmasEveTest.php index 01dbad67c..0f952a585 100644 --- a/tests/CzechRepublic/ChristmasEveTest.php +++ b/tests/CzechRepublic/ChristmasEveTest.php @@ -35,7 +35,7 @@ class ChristmasEveTest extends CzechRepublicBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Eve needs to be tested + * @param int $year the year for which Christmas Eve needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/CzechRepublic/CzechRepublicTest.php b/tests/CzechRepublic/CzechRepublicTest.php index 394980abd..ca7be7266 100644 --- a/tests/CzechRepublic/CzechRepublicTest.php +++ b/tests/CzechRepublic/CzechRepublicTest.php @@ -90,7 +90,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1990); } diff --git a/tests/CzechRepublic/CzechStateHoodDayTest.php b/tests/CzechRepublic/CzechStateHoodDayTest.php index 9fe192d5f..cf49130e2 100644 --- a/tests/CzechRepublic/CzechStateHoodDayTest.php +++ b/tests/CzechRepublic/CzechStateHoodDayTest.php @@ -35,7 +35,7 @@ class CzechStateHoodDayTest extends CzechRepublicBaseTestCase implements YasumiT * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php index 0b08365e6..045b5747a 100644 --- a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php +++ b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php @@ -31,7 +31,7 @@ class IndependentCzechoslovakStateDayTest extends CzechRepublicBaseTestCase impl * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/CzechRepublic/InternationalWorkersDayTest.php b/tests/CzechRepublic/InternationalWorkersDayTest.php index 94f6c8977..ba95c2319 100644 --- a/tests/CzechRepublic/InternationalWorkersDayTest.php +++ b/tests/CzechRepublic/InternationalWorkersDayTest.php @@ -35,7 +35,7 @@ class InternationalWorkersDayTest extends CzechRepublicBaseTestCase implements Y * * @dataProvider HolidayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested + * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/CzechRepublic/JanHusDayTest.php b/tests/CzechRepublic/JanHusDayTest.php index 4e05f22d5..5c480251b 100644 --- a/tests/CzechRepublic/JanHusDayTest.php +++ b/tests/CzechRepublic/JanHusDayTest.php @@ -31,7 +31,7 @@ class JanHusDayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseI * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/CzechRepublic/NewYearsDayTest.php b/tests/CzechRepublic/NewYearsDayTest.php index 3051e7623..b4a0739b6 100644 --- a/tests/CzechRepublic/NewYearsDayTest.php +++ b/tests/CzechRepublic/NewYearsDayTest.php @@ -35,7 +35,7 @@ class NewYearsDayTest extends CzechRepublicBaseTestCase implements YasumiTestCas * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php index 7ca1255de..4e953f090 100644 --- a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php +++ b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php @@ -36,7 +36,7 @@ class RenewalOfIndependentCzechStateDayTest extends CzechRepublicBaseTestCase im * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php index 6bf231375..c92de2e39 100644 --- a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php @@ -35,7 +35,7 @@ class SaintsCyrilAndMethodiusDayTest extends CzechRepublicBaseTestCase implement * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/CzechRepublic/SecondChristmasDayTest.php b/tests/CzechRepublic/SecondChristmasDayTest.php index 3b1315370..1accc6809 100644 --- a/tests/CzechRepublic/SecondChristmasDayTest.php +++ b/tests/CzechRepublic/SecondChristmasDayTest.php @@ -35,7 +35,7 @@ class SecondChristmasDayTest extends CzechRepublicBaseTestCase implements Yasumi * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php index f9943485d..2386dc424 100644 --- a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php @@ -31,7 +31,7 @@ class StruggleForFreedomAndDemocracyDayTest extends CzechRepublicBaseTestCase im * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/CzechRepublic/VictoryInEuropeDayTest.php b/tests/CzechRepublic/VictoryInEuropeDayTest.php index b271f0d00..22743f24c 100644 --- a/tests/CzechRepublic/VictoryInEuropeDayTest.php +++ b/tests/CzechRepublic/VictoryInEuropeDayTest.php @@ -35,7 +35,7 @@ class VictoryInEuropeDayTest extends CzechRepublicBaseTestCase implements Yasumi * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Denmark/ChristmasDayTest.php b/tests/Denmark/ChristmasDayTest.php index b48474b0c..ce839aa43 100644 --- a/tests/Denmark/ChristmasDayTest.php +++ b/tests/Denmark/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends DenmarkBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Denmark/ChristmasEveTest.php b/tests/Denmark/ChristmasEveTest.php index a2aa4b559..be7107e94 100644 --- a/tests/Denmark/ChristmasEveTest.php +++ b/tests/Denmark/ChristmasEveTest.php @@ -31,7 +31,7 @@ class ChristmasEveTest extends DenmarkBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Denmark/DenmarkTest.php b/tests/Denmark/DenmarkTest.php index 190488484..4f2f1f633 100644 --- a/tests/Denmark/DenmarkTest.php +++ b/tests/Denmark/DenmarkTest.php @@ -90,7 +90,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1849); } diff --git a/tests/Denmark/InternationalWorkersDayTest.php b/tests/Denmark/InternationalWorkersDayTest.php index 236a3bb5e..21e3ff8c9 100644 --- a/tests/Denmark/InternationalWorkersDayTest.php +++ b/tests/Denmark/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends DenmarkBaseTestCase implements YasumiT * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested + * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Denmark/NewYearsDayTest.php b/tests/Denmark/NewYearsDayTest.php index f05eee8de..39d3119e6 100644 --- a/tests/Denmark/NewYearsDayTest.php +++ b/tests/Denmark/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends DenmarkBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Denmark/NewYearsEveTest.php b/tests/Denmark/NewYearsEveTest.php index 17def1099..a292c0719 100644 --- a/tests/Denmark/NewYearsEveTest.php +++ b/tests/Denmark/NewYearsEveTest.php @@ -31,7 +31,7 @@ class NewYearsEveTest extends DenmarkBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Denmark/SecondChristmasDayTest.php b/tests/Denmark/SecondChristmasDayTest.php index e710bd494..db9f4ad1f 100644 --- a/tests/Denmark/SecondChristmasDayTest.php +++ b/tests/Denmark/SecondChristmasDayTest.php @@ -31,7 +31,7 @@ class SecondChristmasDayTest extends DenmarkBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Estonia/ChristmasDayTest.php b/tests/Estonia/ChristmasDayTest.php index cbe91f0d7..74840d4be 100644 --- a/tests/Estonia/ChristmasDayTest.php +++ b/tests/Estonia/ChristmasDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Estonia/ChristmasEveDayTest.php b/tests/Estonia/ChristmasEveDayTest.php index 19f7fc7a7..a4e82c6b1 100644 --- a/tests/Estonia/ChristmasEveDayTest.php +++ b/tests/Estonia/ChristmasEveDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Estonia/EasterDayTest.php b/tests/Estonia/EasterDayTest.php index 39e0d0edb..f31b2394d 100644 --- a/tests/Estonia/EasterDayTest.php +++ b/tests/Estonia/EasterDayTest.php @@ -42,7 +42,7 @@ public function holidayDataProvider(): array * * @dataProvider holidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Estonia/GoodFridayDayTest.php b/tests/Estonia/GoodFridayDayTest.php index 09724dd04..690b6c8e5 100644 --- a/tests/Estonia/GoodFridayDayTest.php +++ b/tests/Estonia/GoodFridayDayTest.php @@ -43,7 +43,7 @@ public function holidayDataProvider(): array * * @dataProvider holidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Estonia/InternationalWorkersDayTest.php b/tests/Estonia/InternationalWorkersDayTest.php index 7ac8c7f34..ed6c94fd8 100644 --- a/tests/Estonia/InternationalWorkersDayTest.php +++ b/tests/Estonia/InternationalWorkersDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Estonia/NewYearsDayTest.php b/tests/Estonia/NewYearsDayTest.php index cbbf69e95..9f109171d 100644 --- a/tests/Estonia/NewYearsDayTest.php +++ b/tests/Estonia/NewYearsDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Estonia/PentecostTest.php b/tests/Estonia/PentecostTest.php index 52221390b..e9f3e824a 100644 --- a/tests/Estonia/PentecostTest.php +++ b/tests/Estonia/PentecostTest.php @@ -43,7 +43,7 @@ public function holidayDataProvider(): array * * @dataProvider holidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Estonia/SecondChristmasDayTest.php b/tests/Estonia/SecondChristmasDayTest.php index 694568422..f98c48734 100644 --- a/tests/Estonia/SecondChristmasDayTest.php +++ b/tests/Estonia/SecondChristmasDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Estonia/StJohnsDayTest.php b/tests/Estonia/StJohnsDayTest.php index 2a3bf590e..52a79b6f4 100644 --- a/tests/Estonia/StJohnsDayTest.php +++ b/tests/Estonia/StJohnsDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Finland/AllSaintsDayTest.php b/tests/Finland/AllSaintsDayTest.php index de92950aa..56a57563e 100644 --- a/tests/Finland/AllSaintsDayTest.php +++ b/tests/Finland/AllSaintsDayTest.php @@ -33,7 +33,7 @@ class AllSaintsDayTest extends FinlandBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Finland/ChristmasDayTest.php b/tests/Finland/ChristmasDayTest.php index c3b1dfa14..617a555c9 100644 --- a/tests/Finland/ChristmasDayTest.php +++ b/tests/Finland/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends FinlandBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Finland/EpiphanyTest.php b/tests/Finland/EpiphanyTest.php index ad70e7aeb..146d5cab5 100644 --- a/tests/Finland/EpiphanyTest.php +++ b/tests/Finland/EpiphanyTest.php @@ -31,7 +31,7 @@ class EpiphanyTest extends FinlandBaseTestCase implements YasumiTestCaseInterfac * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Finland/FinlandTest.php b/tests/Finland/FinlandTest.php index 1cddb0c80..7bb15e9b0 100644 --- a/tests/Finland/FinlandTest.php +++ b/tests/Finland/FinlandTest.php @@ -86,7 +86,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1917); } diff --git a/tests/Finland/InternationalWorkersDayTest.php b/tests/Finland/InternationalWorkersDayTest.php index 22eeb73c9..05dc497f6 100644 --- a/tests/Finland/InternationalWorkersDayTest.php +++ b/tests/Finland/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends FinlandBaseTestCase implements YasumiT * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Finland/NewYearsDayTest.php b/tests/Finland/NewYearsDayTest.php index 12344bd53..be39c3eff 100644 --- a/tests/Finland/NewYearsDayTest.php +++ b/tests/Finland/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends FinlandBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Finland/SecondChristmasDayTest.php b/tests/Finland/SecondChristmasDayTest.php index 0d846a188..f400c917f 100644 --- a/tests/Finland/SecondChristmasDayTest.php +++ b/tests/Finland/SecondChristmasDayTest.php @@ -31,7 +31,7 @@ class SecondChristmasDayTest extends FinlandBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Finland/stJohnsDayTest.php b/tests/Finland/stJohnsDayTest.php index 9b5fa9ec6..0ec4c6f28 100644 --- a/tests/Finland/stJohnsDayTest.php +++ b/tests/Finland/stJohnsDayTest.php @@ -62,7 +62,7 @@ public function testHolidayAfterAdjustment() $year = $this->generateRandomYear(self::ADJUSTMENT_YEAR); $holidays = Yasumi::create(self::REGION, $year); - $holiday = $holidays->getHoliday(self::HOLIDAY); + $holiday = $holidays->getHoliday(self::HOLIDAY); // Some basic assertions $this->assertInstanceOf('Yasumi\Provider\\' . \str_replace('/', '\\', self::REGION), $holidays); diff --git a/tests/France/AllSaintsDayTest.php b/tests/France/AllSaintsDayTest.php index ea4270967..7688e9d43 100644 --- a/tests/France/AllSaintsDayTest.php +++ b/tests/France/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends FranceBaseTestCase implements YasumiTestCaseInter * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested + * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/France/AssumptionOfMaryTest.php b/tests/France/AssumptionOfMaryTest.php index 961b8f679..3d1c77296 100644 --- a/tests/France/AssumptionOfMaryTest.php +++ b/tests/France/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends FranceBaseTestCase implements YasumiTestCaseI * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/France/BasRhin/BasRhinTest.php b/tests/France/BasRhin/BasRhinTest.php index 4009a0a3a..474989283 100644 --- a/tests/France/BasRhin/BasRhinTest.php +++ b/tests/France/BasRhin/BasRhinTest.php @@ -86,7 +86,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/France/BasRhin/stStephensDayTest.php b/tests/France/BasRhin/stStephensDayTest.php index a0b111358..1d5313082 100644 --- a/tests/France/BasRhin/stStephensDayTest.php +++ b/tests/France/BasRhin/stStephensDayTest.php @@ -31,7 +31,7 @@ class stStephensDayTest extends BasRhinBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/France/ChristmasDayTest.php b/tests/France/ChristmasDayTest.php index a8caa9701..f626a178f 100644 --- a/tests/France/ChristmasDayTest.php +++ b/tests/France/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends FranceBaseTestCase implements YasumiTestCaseInter * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/France/FranceTest.php b/tests/France/FranceTest.php index d30e0e9bd..2ccde0fa4 100644 --- a/tests/France/FranceTest.php +++ b/tests/France/FranceTest.php @@ -84,7 +84,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/France/HautRhin/HautRhinTest.php b/tests/France/HautRhin/HautRhinTest.php index 4c0da79e4..e61120d31 100644 --- a/tests/France/HautRhin/HautRhinTest.php +++ b/tests/France/HautRhin/HautRhinTest.php @@ -86,7 +86,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/France/HautRhin/stStephensDayTest.php b/tests/France/HautRhin/stStephensDayTest.php index efaee6358..b4744094c 100644 --- a/tests/France/HautRhin/stStephensDayTest.php +++ b/tests/France/HautRhin/stStephensDayTest.php @@ -31,7 +31,7 @@ class stStephensDayTest extends HautRhinBaseTestCase implements YasumiTestCaseIn * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/France/InternationalWorkersDayTest.php b/tests/France/InternationalWorkersDayTest.php index 34383f2f4..4b5aabb82 100644 --- a/tests/France/InternationalWorkersDayTest.php +++ b/tests/France/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends FranceBaseTestCase implements YasumiTe * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested + * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/France/Moselle/MoselleTest.php b/tests/France/Moselle/MoselleTest.php index d4b5660df..858502063 100644 --- a/tests/France/Moselle/MoselleTest.php +++ b/tests/France/Moselle/MoselleTest.php @@ -86,7 +86,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/France/Moselle/stStephensDayTest.php b/tests/France/Moselle/stStephensDayTest.php index 52a0528ca..372cc86d9 100644 --- a/tests/France/Moselle/stStephensDayTest.php +++ b/tests/France/Moselle/stStephensDayTest.php @@ -31,7 +31,7 @@ class stStephensDayTest extends MoselleBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/France/NewYearsDayTest.php b/tests/France/NewYearsDayTest.php index bb12ca651..9baf53ced 100644 --- a/tests/France/NewYearsDayTest.php +++ b/tests/France/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends FranceBaseTestCase implements YasumiTestCaseInterf * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php index dc214a17f..697d88ac8 100644 --- a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php +++ b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends BadenWurttembergBaseTestCase implements YasumiTes * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php index 7c7f45e6c..83c4aaff5 100644 --- a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php +++ b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php @@ -87,7 +87,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1990); } diff --git a/tests/Germany/BadenWurttemberg/EpiphanyTest.php b/tests/Germany/BadenWurttemberg/EpiphanyTest.php index 8e762ba62..f8c7b060b 100644 --- a/tests/Germany/BadenWurttemberg/EpiphanyTest.php +++ b/tests/Germany/BadenWurttemberg/EpiphanyTest.php @@ -31,7 +31,7 @@ class EpiphanyTest extends BadenWurttembergBaseTestCase implements YasumiTestCas * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Germany/Bavaria/AllSaintsDayTest.php b/tests/Germany/Bavaria/AllSaintsDayTest.php index d85bec9c7..fadf591e2 100644 --- a/tests/Germany/Bavaria/AllSaintsDayTest.php +++ b/tests/Germany/Bavaria/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends BavariaBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Germany/Bavaria/BavariaTest.php b/tests/Germany/Bavaria/BavariaTest.php index bc5c530bc..eafc04e74 100644 --- a/tests/Germany/Bavaria/BavariaTest.php +++ b/tests/Germany/Bavaria/BavariaTest.php @@ -87,7 +87,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1990); } diff --git a/tests/Germany/Bavaria/EpiphanyTest.php b/tests/Germany/Bavaria/EpiphanyTest.php index da1a37750..e8e463922 100644 --- a/tests/Germany/Bavaria/EpiphanyTest.php +++ b/tests/Germany/Bavaria/EpiphanyTest.php @@ -32,7 +32,7 @@ class EpiphanyTest extends BavariaBaseTestCase implements YasumiTestCaseInterfac * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Germany/Berlin/BerlinTest.php b/tests/Germany/Berlin/BerlinTest.php index 1b8c24d91..4ecff02a5 100644 --- a/tests/Germany/Berlin/BerlinTest.php +++ b/tests/Germany/Berlin/BerlinTest.php @@ -82,7 +82,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1990); } diff --git a/tests/Germany/Brandenburg/BrandenburgTest.php b/tests/Germany/Brandenburg/BrandenburgTest.php index 06ec34f28..9e05c2082 100644 --- a/tests/Germany/Brandenburg/BrandenburgTest.php +++ b/tests/Germany/Brandenburg/BrandenburgTest.php @@ -93,7 +93,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(); } diff --git a/tests/Germany/Brandenburg/ReformationDayTest.php b/tests/Germany/Brandenburg/ReformationDayTest.php index f7a2c5f5e..c79b9f278 100644 --- a/tests/Germany/Brandenburg/ReformationDayTest.php +++ b/tests/Germany/Brandenburg/ReformationDayTest.php @@ -37,7 +37,7 @@ class ReformationDayTest extends BrandenburgBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; } diff --git a/tests/Germany/Bremen/BremenTest.php b/tests/Germany/Bremen/BremenTest.php index a0a135033..32e41f611 100644 --- a/tests/Germany/Bremen/BremenTest.php +++ b/tests/Germany/Bremen/BremenTest.php @@ -82,7 +82,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1990); } diff --git a/tests/Germany/Bremen/ReformationDayTest.php b/tests/Germany/Bremen/ReformationDayTest.php index 5bd240ced..92c37ba06 100644 --- a/tests/Germany/Bremen/ReformationDayTest.php +++ b/tests/Germany/Bremen/ReformationDayTest.php @@ -37,7 +37,7 @@ class ReformationDayTest extends BremenBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; } diff --git a/tests/Germany/ChristmasTest.php b/tests/Germany/ChristmasTest.php index fe9b6f773..a20cfddc8 100644 --- a/tests/Germany/ChristmasTest.php +++ b/tests/Germany/ChristmasTest.php @@ -31,7 +31,7 @@ class ChristmasTest extends GermanyBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Germany/GermanyTest.php b/tests/Germany/GermanyTest.php index 3eff63ad5..d538eb9c9 100644 --- a/tests/Germany/GermanyTest.php +++ b/tests/Germany/GermanyTest.php @@ -82,7 +82,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1990); } diff --git a/tests/Germany/Hamburg/DayOfReformationTest.php b/tests/Germany/Hamburg/DayOfReformationTest.php index 4fa53ac0f..6cdce9a02 100644 --- a/tests/Germany/Hamburg/DayOfReformationTest.php +++ b/tests/Germany/Hamburg/DayOfReformationTest.php @@ -37,7 +37,7 @@ class DayOfReformationTest extends HamburgBaseTestCase implements YasumiTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; } diff --git a/tests/Germany/Hamburg/HamburgTest.php b/tests/Germany/Hamburg/HamburgTest.php index 776f967c1..fadc2c516 100644 --- a/tests/Germany/Hamburg/HamburgTest.php +++ b/tests/Germany/Hamburg/HamburgTest.php @@ -82,7 +82,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1990); } diff --git a/tests/Germany/Hesse/HesseTest.php b/tests/Germany/Hesse/HesseTest.php index fa7ae8ec9..094fc897e 100644 --- a/tests/Germany/Hesse/HesseTest.php +++ b/tests/Germany/Hesse/HesseTest.php @@ -82,7 +82,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1990); } diff --git a/tests/Germany/InternationalWorkersDayTest.php b/tests/Germany/InternationalWorkersDayTest.php index e5e6af22b..92c1d9121 100644 --- a/tests/Germany/InternationalWorkersDayTest.php +++ b/tests/Germany/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends GermanyBaseTestCase implements YasumiT * * @dataProvider HolidayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested + * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Germany/LowerSaxony/LowerSaxonyTest.php b/tests/Germany/LowerSaxony/LowerSaxonyTest.php index a3bc6a710..90aab3908 100644 --- a/tests/Germany/LowerSaxony/LowerSaxonyTest.php +++ b/tests/Germany/LowerSaxony/LowerSaxonyTest.php @@ -82,7 +82,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1990); } diff --git a/tests/Germany/LowerSaxony/ReformationDayTest.php b/tests/Germany/LowerSaxony/ReformationDayTest.php index ccc477cf8..22a8eab49 100644 --- a/tests/Germany/LowerSaxony/ReformationDayTest.php +++ b/tests/Germany/LowerSaxony/ReformationDayTest.php @@ -37,7 +37,7 @@ class ReformationDayTest extends LowerSaxonyBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; } diff --git a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php index cd529dae6..61260ade9 100644 --- a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php @@ -91,7 +91,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(); } diff --git a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php index 5c81764c6..e37083d61 100644 --- a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php @@ -43,7 +43,7 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; } diff --git a/tests/Germany/NewYearsDayTest.php b/tests/Germany/NewYearsDayTest.php index 5a0c6a8d6..a3ccef675 100644 --- a/tests/Germany/NewYearsDayTest.php +++ b/tests/Germany/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends GermanyBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php index 067e7074f..d35da4693 100644 --- a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php +++ b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends NorthRhineWestphaliaBaseTestCase implements Yasum * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php index 89c94f508..9feaa8548 100644 --- a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php +++ b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php @@ -82,7 +82,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1990); } diff --git a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php index f00ce5b30..552ad396e 100644 --- a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php +++ b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends RhinelandPalatinateBaseTestCase implements Yasumi * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php index db9ec4544..59b15c131 100644 --- a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php +++ b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php @@ -82,7 +82,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1990); } diff --git a/tests/Germany/Saarland/AllSaintsDayTest.php b/tests/Germany/Saarland/AllSaintsDayTest.php index dbf289179..5101d2d33 100644 --- a/tests/Germany/Saarland/AllSaintsDayTest.php +++ b/tests/Germany/Saarland/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends SaarlandBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Germany/Saarland/AssumptionOfMaryTest.php b/tests/Germany/Saarland/AssumptionOfMaryTest.php index 33d8ca259..f728f564f 100644 --- a/tests/Germany/Saarland/AssumptionOfMaryTest.php +++ b/tests/Germany/Saarland/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends SaarlandBaseTestCase implements YasumiTestCas * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Germany/Saarland/SaarlandTest.php b/tests/Germany/Saarland/SaarlandTest.php index 8cc7a81d7..2c50428b7 100644 --- a/tests/Germany/Saarland/SaarlandTest.php +++ b/tests/Germany/Saarland/SaarlandTest.php @@ -86,7 +86,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1990); } diff --git a/tests/Germany/Saxony/ReformationDayTest.php b/tests/Germany/Saxony/ReformationDayTest.php index 571dcde52..01eff3f4b 100644 --- a/tests/Germany/Saxony/ReformationDayTest.php +++ b/tests/Germany/Saxony/ReformationDayTest.php @@ -37,7 +37,7 @@ class ReformationDayTest extends SaxonyBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; } diff --git a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php index cf33667d4..a71de64b4 100644 --- a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php +++ b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php @@ -45,7 +45,7 @@ class RepentanceAndPrayerDayTest extends SaxonyBaseTestCase implements YasumiTes public function testHolidayOnAfterEstablishment() { // Check between the 16th and 22nd day the one that is a Wednesday - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $holiday = new DateTime("next wednesday $year-11-15", new DateTimeZone(self::TIMEZONE)); // Default date $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $holiday); diff --git a/tests/Germany/Saxony/SaxonyTest.php b/tests/Germany/Saxony/SaxonyTest.php index bdea0fe4d..ce86c9de5 100644 --- a/tests/Germany/Saxony/SaxonyTest.php +++ b/tests/Germany/Saxony/SaxonyTest.php @@ -95,7 +95,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1990); } diff --git a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php index 84c004665..b5da028fe 100644 --- a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php +++ b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php @@ -32,7 +32,7 @@ class EpiphanyTest extends SaxonyAnhaltBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php index 142dd2cff..40ebf9413 100644 --- a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php +++ b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php @@ -37,7 +37,7 @@ class ReformationDayTest extends SaxonyAnhaltBaseTestCase implements YasumiTestC * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; } diff --git a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php index 889c52ca1..4df49826c 100644 --- a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php +++ b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php @@ -91,7 +91,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(); } diff --git a/tests/Germany/SchleswigHolstein/ReformationDayTest.php b/tests/Germany/SchleswigHolstein/ReformationDayTest.php index aa3030d18..5d617814d 100644 --- a/tests/Germany/SchleswigHolstein/ReformationDayTest.php +++ b/tests/Germany/SchleswigHolstein/ReformationDayTest.php @@ -37,7 +37,7 @@ class ReformationDayTest extends SchleswigHolsteinBaseTestCase implements Yasumi * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; } diff --git a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php index 459192c8a..053234c71 100644 --- a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php +++ b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php @@ -82,7 +82,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1990); } diff --git a/tests/Germany/SecondChristmasDayTest.php b/tests/Germany/SecondChristmasDayTest.php index 552f1168e..9dba4cc3e 100644 --- a/tests/Germany/SecondChristmasDayTest.php +++ b/tests/Germany/SecondChristmasDayTest.php @@ -31,7 +31,7 @@ class SecondChristmasDayTest extends GermanyBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Germany/Thuringia/ReformationDayTest.php b/tests/Germany/Thuringia/ReformationDayTest.php index 6e639c948..0533cb394 100644 --- a/tests/Germany/Thuringia/ReformationDayTest.php +++ b/tests/Germany/Thuringia/ReformationDayTest.php @@ -37,7 +37,7 @@ class ReformationDayTest extends ThuringiaBaseTestCase implements YasumiTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -58,7 +58,7 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $data[] = [$year, new DateTime("$year-10-31", new DateTimeZone(self::TIMEZONE))]; } diff --git a/tests/Germany/Thuringia/ThuringiaTest.php b/tests/Germany/Thuringia/ThuringiaTest.php index 81c78832e..f75766217 100644 --- a/tests/Germany/Thuringia/ThuringiaTest.php +++ b/tests/Germany/Thuringia/ThuringiaTest.php @@ -91,7 +91,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(); } diff --git a/tests/Greece/AnnunciationTest.php b/tests/Greece/AnnunciationTest.php index 0aa080820..4e43784a2 100644 --- a/tests/Greece/AnnunciationTest.php +++ b/tests/Greece/AnnunciationTest.php @@ -31,7 +31,7 @@ class AnnunciationTest extends GreeceBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Greece/AssumptionOfMaryTest.php b/tests/Greece/AssumptionOfMaryTest.php index c9945b051..3e78caf01 100644 --- a/tests/Greece/AssumptionOfMaryTest.php +++ b/tests/Greece/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends GreeceBaseTestCase implements YasumiTestCaseI * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Greece/ChristmasDayTest.php b/tests/Greece/ChristmasDayTest.php index 29174fb01..96db67d69 100644 --- a/tests/Greece/ChristmasDayTest.php +++ b/tests/Greece/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends GreeceBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Greece/EpiphanyTest.php b/tests/Greece/EpiphanyTest.php index e8d1f2f5a..5730a3696 100644 --- a/tests/Greece/EpiphanyTest.php +++ b/tests/Greece/EpiphanyTest.php @@ -31,7 +31,7 @@ class EpiphanyTest extends GreeceBaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Greece/GreeceTest.php b/tests/Greece/GreeceTest.php index e38fb0798..16fdc01aa 100644 --- a/tests/Greece/GreeceTest.php +++ b/tests/Greece/GreeceTest.php @@ -93,7 +93,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1985); } diff --git a/tests/Greece/InternationalWorkersDayTest.php b/tests/Greece/InternationalWorkersDayTest.php index 5d68a7dd4..98b7b685d 100644 --- a/tests/Greece/InternationalWorkersDayTest.php +++ b/tests/Greece/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends GreeceBaseTestCase implements YasumiTe * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Greece/NewYearsDayTest.php b/tests/Greece/NewYearsDayTest.php index 1564aaa8b..eef74f0ef 100644 --- a/tests/Greece/NewYearsDayTest.php +++ b/tests/Greece/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends GreeceBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Greece/ThreeHolyHierarchsTest.php b/tests/Greece/ThreeHolyHierarchsTest.php index 1948e384b..1646b7a5f 100644 --- a/tests/Greece/ThreeHolyHierarchsTest.php +++ b/tests/Greece/ThreeHolyHierarchsTest.php @@ -31,7 +31,7 @@ class ThreeHolyHierarchsTest extends GreeceBaseTestCase implements YasumiTestCas * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Hungary/AllSaintsDayTest.php b/tests/Hungary/AllSaintsDayTest.php index 32a4f9323..1255dec09 100644 --- a/tests/Hungary/AllSaintsDayTest.php +++ b/tests/Hungary/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends HungaryBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Hungary/ChristmasTest.php b/tests/Hungary/ChristmasTest.php index dc1faca58..c13bf4189 100644 --- a/tests/Hungary/ChristmasTest.php +++ b/tests/Hungary/ChristmasTest.php @@ -31,7 +31,7 @@ class ChristmasTest extends HungaryBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Hungary/HungaryTest.php b/tests/Hungary/HungaryTest.php index bebf39a2c..158122c75 100644 --- a/tests/Hungary/HungaryTest.php +++ b/tests/Hungary/HungaryTest.php @@ -99,7 +99,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1955); } diff --git a/tests/Hungary/InternationalWorkersDayTest.php b/tests/Hungary/InternationalWorkersDayTest.php index 8b582c175..157cdb60f 100644 --- a/tests/Hungary/InternationalWorkersDayTest.php +++ b/tests/Hungary/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends HungaryBaseTestCase implements YasumiT * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Hungary/NewYearsDayTest.php b/tests/Hungary/NewYearsDayTest.php index 91c134c68..cd6949909 100644 --- a/tests/Hungary/NewYearsDayTest.php +++ b/tests/Hungary/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends HungaryBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Hungary/SecondChristmasDayTest.php b/tests/Hungary/SecondChristmasDayTest.php index 6700f5c5e..f6a4fcd3e 100644 --- a/tests/Hungary/SecondChristmasDayTest.php +++ b/tests/Hungary/SecondChristmasDayTest.php @@ -31,7 +31,7 @@ class SecondChristmasDayTest extends HungaryBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Ireland/AugustHolidayTest.php b/tests/Ireland/AugustHolidayTest.php index 8a8d618eb..983e15e0b 100644 --- a/tests/Ireland/AugustHolidayTest.php +++ b/tests/Ireland/AugustHolidayTest.php @@ -32,7 +32,7 @@ class AugustHolidayTest extends IrelandBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Ireland/ChristmasDayTest.php b/tests/Ireland/ChristmasDayTest.php index c9987b790..47491841f 100644 --- a/tests/Ireland/ChristmasDayTest.php +++ b/tests/Ireland/ChristmasDayTest.php @@ -32,7 +32,7 @@ class ChristmasDayTest extends IrelandBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param \DateTime $expected the expected date * * @throws \ReflectionException @@ -60,8 +60,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { - $year = $this->generateRandomYear(); - $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(); + $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Ireland/EasterMondayTest.php b/tests/Ireland/EasterMondayTest.php index d2703af63..1201c5e91 100644 --- a/tests/Ireland/EasterMondayTest.php +++ b/tests/Ireland/EasterMondayTest.php @@ -33,7 +33,7 @@ class EasterMondayTest extends IrelandBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Ireland/EasterTest.php b/tests/Ireland/EasterTest.php index 92b3f0238..7b8f5da24 100644 --- a/tests/Ireland/EasterTest.php +++ b/tests/Ireland/EasterTest.php @@ -32,7 +32,7 @@ class EasterTest extends IrelandBaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Ireland/GoodFridayTest.php b/tests/Ireland/GoodFridayTest.php index d50204f24..fefec6668 100644 --- a/tests/Ireland/GoodFridayTest.php +++ b/tests/Ireland/GoodFridayTest.php @@ -33,7 +33,7 @@ class GoodFridayTest extends IrelandBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Ireland/IrelandTest.php b/tests/Ireland/IrelandTest.php index d9a1c3d16..f6d598a0b 100644 --- a/tests/Ireland/IrelandTest.php +++ b/tests/Ireland/IrelandTest.php @@ -94,7 +94,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1974); } diff --git a/tests/Ireland/JuneHolidayTest.php b/tests/Ireland/JuneHolidayTest.php index 1f78b8236..e4aa1a148 100644 --- a/tests/Ireland/JuneHolidayTest.php +++ b/tests/Ireland/JuneHolidayTest.php @@ -37,7 +37,7 @@ class JuneHolidayTest extends IrelandBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Ireland/MayDayTest.php b/tests/Ireland/MayDayTest.php index 219959588..ab2225b7b 100644 --- a/tests/Ireland/MayDayTest.php +++ b/tests/Ireland/MayDayTest.php @@ -37,7 +37,7 @@ class MayDayTest extends IrelandBaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Ireland/NewYearsDayTest.php b/tests/Ireland/NewYearsDayTest.php index 035164d27..25e64835a 100644 --- a/tests/Ireland/NewYearsDayTest.php +++ b/tests/Ireland/NewYearsDayTest.php @@ -37,7 +37,7 @@ class NewYearsDayTest extends IrelandBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param \DateTime $expected the expected date * * @throws \ReflectionException @@ -65,8 +65,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Ireland/OctoberHolidayTest.php b/tests/Ireland/OctoberHolidayTest.php index 83954a53f..0e3ffbbf7 100644 --- a/tests/Ireland/OctoberHolidayTest.php +++ b/tests/Ireland/OctoberHolidayTest.php @@ -37,7 +37,7 @@ class OctoberHolidayTest extends IrelandBaseTestCase implements YasumiTestCaseIn * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Ireland/PentecostTest.php b/tests/Ireland/PentecostTest.php index bbcf12e3b..e250360c7 100644 --- a/tests/Ireland/PentecostTest.php +++ b/tests/Ireland/PentecostTest.php @@ -33,7 +33,7 @@ class PentecostTest extends IrelandBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Ireland/StPatricksDayTest.php b/tests/Ireland/StPatricksDayTest.php index fe5a991c3..3b34a7d26 100644 --- a/tests/Ireland/StPatricksDayTest.php +++ b/tests/Ireland/StPatricksDayTest.php @@ -37,7 +37,7 @@ class StPatricksDayTest extends IrelandBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param \DateTime $expected the expected date * * @throws \ReflectionException @@ -65,8 +65,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-3-17", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-3-17", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Ireland/StStephensDayTest.php b/tests/Ireland/StStephensDayTest.php index 83b4ea9dc..f040cc6fc 100644 --- a/tests/Ireland/StStephensDayTest.php +++ b/tests/Ireland/StStephensDayTest.php @@ -32,7 +32,7 @@ class StStephensDayTest extends IrelandBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param \DateTime $expected the expected date * * @throws \ReflectionException @@ -60,8 +60,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { - $year = $this->generateRandomYear(); - $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(); + $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Ireland/pentecostMondayTest.php b/tests/Ireland/pentecostMondayTest.php index 6aed88641..e23d96988 100644 --- a/tests/Ireland/pentecostMondayTest.php +++ b/tests/Ireland/pentecostMondayTest.php @@ -38,7 +38,7 @@ class pentecostMondayTest extends IrelandBaseTestCase implements YasumiTestCaseI * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Italy/AllSaintsDayTest.php b/tests/Italy/AllSaintsDayTest.php index fbe88e7a1..1962c0d2c 100644 --- a/tests/Italy/AllSaintsDayTest.php +++ b/tests/Italy/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends ItalyBaseTestCase implements YasumiTestCaseInterf * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested + * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Italy/AssumptionOfMaryTest.php b/tests/Italy/AssumptionOfMaryTest.php index b53866a49..d447a28e7 100644 --- a/tests/Italy/AssumptionOfMaryTest.php +++ b/tests/Italy/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends ItalyBaseTestCase implements YasumiTestCaseIn * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Italy/ChristmasTest.php b/tests/Italy/ChristmasTest.php index 66a3fe35c..1eb44d201 100644 --- a/tests/Italy/ChristmasTest.php +++ b/tests/Italy/ChristmasTest.php @@ -31,7 +31,7 @@ class ChristmasTest extends ItalyBaseTestCase implements YasumiTestCaseInterface * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Italy/EpiphanyTest.php b/tests/Italy/EpiphanyTest.php index 6b2d4b822..472ee42a5 100644 --- a/tests/Italy/EpiphanyTest.php +++ b/tests/Italy/EpiphanyTest.php @@ -31,7 +31,7 @@ class EpiphanyTest extends ItalyBaseTestCase implements YasumiTestCaseInterface * * @dataProvider EpiphanyDataProvider * - * @param int $year the year for which Epiphany needs to be tested + * @param int $year the year for which Epiphany needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Italy/ImmaculateConceptionTest.php b/tests/Italy/ImmaculateConceptionTest.php index 802b9f535..c600c2323 100644 --- a/tests/Italy/ImmaculateConceptionTest.php +++ b/tests/Italy/ImmaculateConceptionTest.php @@ -31,7 +31,7 @@ class ImmaculateConceptionTest extends ItalyBaseTestCase implements YasumiTestCa * * @dataProvider ImmaculateConceptionDataProvider * - * @param int $year the year for which the day of Immaculate Conception needs to be tested + * @param int $year the year for which the day of Immaculate Conception needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Italy/InternationalWorkersDayTest.php b/tests/Italy/InternationalWorkersDayTest.php index 00d0eefd2..96e34ba56 100644 --- a/tests/Italy/InternationalWorkersDayTest.php +++ b/tests/Italy/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends ItalyBaseTestCase implements YasumiTes * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested + * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Italy/ItalyTest.php b/tests/Italy/ItalyTest.php index 9d7d24a94..b6cef8cd7 100644 --- a/tests/Italy/ItalyTest.php +++ b/tests/Italy/ItalyTest.php @@ -85,7 +85,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1949); } diff --git a/tests/Italy/NewYearsDayTest.php b/tests/Italy/NewYearsDayTest.php index 8f9f3e7cf..a46a57c91 100644 --- a/tests/Italy/NewYearsDayTest.php +++ b/tests/Italy/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends ItalyBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Italy/stStephensDayTest.php b/tests/Italy/stStephensDayTest.php index fbbdfcca0..2ec3e3bb4 100644 --- a/tests/Italy/stStephensDayTest.php +++ b/tests/Italy/stStephensDayTest.php @@ -31,7 +31,7 @@ class stStephensDayTest extends ItalyBaseTestCase implements YasumiTestCaseInter * * @dataProvider stStephensDayDataProvider * - * @param int $year the year for which St. Stephen's Day needs to be tested + * @param int $year the year for which St. Stephen's Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Japan/JapanTest.php b/tests/Japan/JapanTest.php index a73d86f97..1edf88652 100644 --- a/tests/Japan/JapanTest.php +++ b/tests/Japan/JapanTest.php @@ -116,7 +116,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(2020, 2150); } diff --git a/tests/Japan/PublicBridgeDayTest.php b/tests/Japan/PublicBridgeDayTest.php index 09ab09c31..d099cf811 100644 --- a/tests/Japan/PublicBridgeDayTest.php +++ b/tests/Japan/PublicBridgeDayTest.php @@ -40,13 +40,13 @@ public function testPublicBridgeDay() { $this->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)) ); @@ -58,7 +58,7 @@ public function testPublicBridgeDay() */ 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 => '国民の休日']); } /** @@ -67,13 +67,13 @@ 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); } /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = 2019; } diff --git a/tests/Japan/SportsDayTest.php b/tests/Japan/SportsDayTest.php index a948842c8..87654a7da 100644 --- a/tests/Japan/SportsDayTest.php +++ b/tests/Japan/SportsDayTest.php @@ -135,7 +135,7 @@ public function testTranslation(): void */ public function testTranslationFrom2020(): void { - $year =2020; + $year = 2020; $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, diff --git a/tests/Latvia/ChristmasDayTest.php b/tests/Latvia/ChristmasDayTest.php index 2e1f26e81..b13788463 100644 --- a/tests/Latvia/ChristmasDayTest.php +++ b/tests/Latvia/ChristmasDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Latvia/ChristmasEveDayTest.php b/tests/Latvia/ChristmasEveDayTest.php index d1e347aff..6b2a65341 100644 --- a/tests/Latvia/ChristmasEveDayTest.php +++ b/tests/Latvia/ChristmasEveDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Latvia/EasterDayTest.php b/tests/Latvia/EasterDayTest.php index 89b8be74e..f1f8b9927 100644 --- a/tests/Latvia/EasterDayTest.php +++ b/tests/Latvia/EasterDayTest.php @@ -42,7 +42,7 @@ public function holidayDataProvider(): array * * @dataProvider holidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Latvia/EasterMondayDayTest.php b/tests/Latvia/EasterMondayDayTest.php index e09bd490c..6483022ea 100644 --- a/tests/Latvia/EasterMondayDayTest.php +++ b/tests/Latvia/EasterMondayDayTest.php @@ -42,7 +42,7 @@ public function holidayDataProvider(): array * * @dataProvider holidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Latvia/GoodFridayDayTest.php b/tests/Latvia/GoodFridayDayTest.php index 7540c9ada..4ec9d62ef 100644 --- a/tests/Latvia/GoodFridayDayTest.php +++ b/tests/Latvia/GoodFridayDayTest.php @@ -42,7 +42,7 @@ public function holidayDataProvider(): array * * @dataProvider holidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Latvia/InternationalWorkersDayTest.php b/tests/Latvia/InternationalWorkersDayTest.php index c62a67c71..b23b2dc97 100644 --- a/tests/Latvia/InternationalWorkersDayTest.php +++ b/tests/Latvia/InternationalWorkersDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Latvia/MidsummerEveDayTest.php b/tests/Latvia/MidsummerEveDayTest.php index 9f06d01c0..48f65b085 100644 --- a/tests/Latvia/MidsummerEveDayTest.php +++ b/tests/Latvia/MidsummerEveDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Latvia/NewYearsDayTest.php b/tests/Latvia/NewYearsDayTest.php index 89c175080..f14bd3599 100644 --- a/tests/Latvia/NewYearsDayTest.php +++ b/tests/Latvia/NewYearsDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Latvia/NewYearsEveDayTest.php b/tests/Latvia/NewYearsEveDayTest.php index 09f19955c..7af954529 100644 --- a/tests/Latvia/NewYearsEveDayTest.php +++ b/tests/Latvia/NewYearsEveDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php index e68cb1a22..24370f310 100644 --- a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php +++ b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php @@ -62,7 +62,7 @@ public function holidayDataProvider(): array * * @dataProvider holidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException @@ -90,7 +90,7 @@ public function testTranslation(): void $this->generateRandomYear(Latvia::PROCLAMATION_OF_INDEPENDENCE_YEAR), [ self::LOCALE => 'Latvijas Republikas proklamēšanas diena', - 'en_US' => 'Proclamation Day of the Republic of Latvia' + 'en_US' => 'Proclamation Day of the Republic of Latvia' ] ); } diff --git a/tests/Latvia/RestorationOfIndependenceDayTest.php b/tests/Latvia/RestorationOfIndependenceDayTest.php index f9ee55aea..2cfbe4485 100644 --- a/tests/Latvia/RestorationOfIndependenceDayTest.php +++ b/tests/Latvia/RestorationOfIndependenceDayTest.php @@ -62,7 +62,7 @@ public function holidayDataProvider(): array * * @dataProvider holidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException @@ -90,7 +90,7 @@ public function testTranslation(): void $this->generateRandomYear(Latvia::RESTORATION_OF_INDEPENDENCE_YEAR), [ self::LOCALE => 'Latvijas Republikas Neatkarības atjaunošanas diena', - 'en_US' => 'Restoration of Independence day' + 'en_US' => 'Restoration of Independence day' ] ); } diff --git a/tests/Latvia/SecondChristmasDayTest.php b/tests/Latvia/SecondChristmasDayTest.php index 7eb0ffce9..c321983b2 100644 --- a/tests/Latvia/SecondChristmasDayTest.php +++ b/tests/Latvia/SecondChristmasDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Latvia/StJohnsDayTest.php b/tests/Latvia/StJohnsDayTest.php index 80dfc2b33..aef33ea08 100644 --- a/tests/Latvia/StJohnsDayTest.php +++ b/tests/Latvia/StJohnsDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Lithuania/AllSaintsDayTest.php b/tests/Lithuania/AllSaintsDayTest.php index 50983d4ac..3ef9da2cf 100644 --- a/tests/Lithuania/AllSaintsDayTest.php +++ b/tests/Lithuania/AllSaintsDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Lithuania/AssumptionOfMaryDayTest.php b/tests/Lithuania/AssumptionOfMaryDayTest.php index 5a358fa91..54f050c42 100644 --- a/tests/Lithuania/AssumptionOfMaryDayTest.php +++ b/tests/Lithuania/AssumptionOfMaryDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Lithuania/ChristmasDayTest.php b/tests/Lithuania/ChristmasDayTest.php index 798b03be3..36934f574 100644 --- a/tests/Lithuania/ChristmasDayTest.php +++ b/tests/Lithuania/ChristmasDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Lithuania/ChristmasEveDayTest.php b/tests/Lithuania/ChristmasEveDayTest.php index b1e25c710..4686f5de6 100644 --- a/tests/Lithuania/ChristmasEveDayTest.php +++ b/tests/Lithuania/ChristmasEveDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Lithuania/EasterDayTest.php b/tests/Lithuania/EasterDayTest.php index 04fea788c..1f3f4e97e 100644 --- a/tests/Lithuania/EasterDayTest.php +++ b/tests/Lithuania/EasterDayTest.php @@ -42,7 +42,7 @@ public function holidayDataProvider(): array * * @dataProvider holidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Lithuania/EasterMondayDayTest.php b/tests/Lithuania/EasterMondayDayTest.php index c88b5e179..f2a17e0a2 100644 --- a/tests/Lithuania/EasterMondayDayTest.php +++ b/tests/Lithuania/EasterMondayDayTest.php @@ -42,7 +42,7 @@ public function holidayDataProvider(): array * * @dataProvider holidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/Lithuania/InternationalWorkersDayTest.php b/tests/Lithuania/InternationalWorkersDayTest.php index 41bc8319e..a68b5b07c 100644 --- a/tests/Lithuania/InternationalWorkersDayTest.php +++ b/tests/Lithuania/InternationalWorkersDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Lithuania/NewYearsDayTest.php b/tests/Lithuania/NewYearsDayTest.php index 74d05a0b0..28e509a65 100644 --- a/tests/Lithuania/NewYearsDayTest.php +++ b/tests/Lithuania/NewYearsDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Lithuania/SecondChristmasDayTest.php b/tests/Lithuania/SecondChristmasDayTest.php index e4922fd99..544461a53 100644 --- a/tests/Lithuania/SecondChristmasDayTest.php +++ b/tests/Lithuania/SecondChristmasDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Lithuania/StJohnsDayTest.php b/tests/Lithuania/StJohnsDayTest.php index f93c97d54..d119c729f 100644 --- a/tests/Lithuania/StJohnsDayTest.php +++ b/tests/Lithuania/StJohnsDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Netherlands/ChristmasDayTest.php b/tests/Netherlands/ChristmasDayTest.php index 5348929bf..e93bc7271 100644 --- a/tests/Netherlands/ChristmasDayTest.php +++ b/tests/Netherlands/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends NetherlandsBaseTestCase implements YasumiTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Netherlands/EpiphanyTest.php b/tests/Netherlands/EpiphanyTest.php index cfdf9f4a9..73b678bbe 100644 --- a/tests/Netherlands/EpiphanyTest.php +++ b/tests/Netherlands/EpiphanyTest.php @@ -31,7 +31,7 @@ class EpiphanyTest extends NetherlandsBaseTestCase implements YasumiTestCaseInte * * @dataProvider EpiphanyDataProvider * - * @param int $year the year for which Epiphany needs to be tested + * @param int $year the year for which Epiphany needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Netherlands/HalloweenTest.php b/tests/Netherlands/HalloweenTest.php index 35585826c..b190966ab 100644 --- a/tests/Netherlands/HalloweenTest.php +++ b/tests/Netherlands/HalloweenTest.php @@ -31,7 +31,7 @@ class HalloweenTest extends NetherlandsBaseTestCase implements YasumiTestCaseInt * * @dataProvider HalloweenDataProvider * - * @param int $year the year for which Halloween needs to be tested + * @param int $year the year for which Halloween needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Netherlands/InternationalWorkersDayTest.php b/tests/Netherlands/InternationalWorkersDayTest.php index 86fad8cde..d49bc4bc2 100644 --- a/tests/Netherlands/InternationalWorkersDayTest.php +++ b/tests/Netherlands/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends NetherlandsBaseTestCase implements Yas * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested + * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Netherlands/NetherlandsTest.php b/tests/Netherlands/NetherlandsTest.php index 35c829d7f..9aace9629 100644 --- a/tests/Netherlands/NetherlandsTest.php +++ b/tests/Netherlands/NetherlandsTest.php @@ -102,7 +102,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(2014); } diff --git a/tests/Netherlands/NewYearsDayTest.php b/tests/Netherlands/NewYearsDayTest.php index 08a40a1dd..93f3cbf8a 100644 --- a/tests/Netherlands/NewYearsDayTest.php +++ b/tests/Netherlands/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseI * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Netherlands/ValentinesDayTest.php b/tests/Netherlands/ValentinesDayTest.php index 9344b667b..b0726a7ad 100644 --- a/tests/Netherlands/ValentinesDayTest.php +++ b/tests/Netherlands/ValentinesDayTest.php @@ -31,7 +31,7 @@ class ValentinesDayTest extends NetherlandsBaseTestCase implements YasumiTestCas * * @dataProvider ValentinesDayDataProvider * - * @param int $year the year for which Valentines Day needs to be tested + * @param int $year the year for which Valentines Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Netherlands/secondChristmasdayTest.php b/tests/Netherlands/secondChristmasdayTest.php index bbcbaee8a..65d8e7ea8 100644 --- a/tests/Netherlands/secondChristmasdayTest.php +++ b/tests/Netherlands/secondChristmasdayTest.php @@ -31,7 +31,7 @@ class secondChristmasdayTest extends NetherlandsBaseTestCase implements YasumiTe * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Netherlands/stMartinsDayTest.php b/tests/Netherlands/stMartinsDayTest.php index 8d83a33e8..1d80e4736 100644 --- a/tests/Netherlands/stMartinsDayTest.php +++ b/tests/Netherlands/stMartinsDayTest.php @@ -31,7 +31,7 @@ class stMartinsDayTest extends NetherlandsBaseTestCase implements YasumiTestCase * * @dataProvider stMartinsDayDataProvider * - * @param int $year the year for which Sint Martins Day needs to be tested + * @param int $year the year for which Sint Martins Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Netherlands/stNicholasDayTest.php b/tests/Netherlands/stNicholasDayTest.php index 13c76dfb0..13df81c84 100644 --- a/tests/Netherlands/stNicholasDayTest.php +++ b/tests/Netherlands/stNicholasDayTest.php @@ -32,7 +32,7 @@ class stNicholasDayTest extends NetherlandsBaseTestCase implements YasumiTestCas * * @dataProvider stNicholasDayDataProvider * - * @param int $year the year for which Sint Nicholas Day needs to be tested + * @param int $year the year for which Sint Nicholas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/NewZealand/AnzacDayTest.php b/tests/NewZealand/AnzacDayTest.php index 5cb489905..aa89eb7bb 100644 --- a/tests/NewZealand/AnzacDayTest.php +++ b/tests/NewZealand/AnzacDayTest.php @@ -37,7 +37,7 @@ class AnzacDayTest extends NewZealandBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/NewZealand/BoxingDayTest.php b/tests/NewZealand/BoxingDayTest.php index bc901a052..7644edd3a 100644 --- a/tests/NewZealand/BoxingDayTest.php +++ b/tests/NewZealand/BoxingDayTest.php @@ -33,7 +33,7 @@ class BoxingDayTest extends NewZealandBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/NewZealand/ChristmasDayTest.php b/tests/NewZealand/ChristmasDayTest.php index 9c5a49d14..5e41b7e5c 100644 --- a/tests/NewZealand/ChristmasDayTest.php +++ b/tests/NewZealand/ChristmasDayTest.php @@ -33,7 +33,7 @@ class ChristmasDayTest extends NewZealandBaseTestCase implements YasumiTestCaseI * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/NewZealand/DayAfterNewYearsDayTest.php b/tests/NewZealand/DayAfterNewYearsDayTest.php index c7f15b83f..ea239cf1b 100644 --- a/tests/NewZealand/DayAfterNewYearsDayTest.php +++ b/tests/NewZealand/DayAfterNewYearsDayTest.php @@ -33,7 +33,7 @@ class DayAfterNewYearsDayTest extends NewZealandBaseTestCase implements YasumiTe * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/NewZealand/EasterMondayTest.php b/tests/NewZealand/EasterMondayTest.php index f6e0fe56c..fdb77c89b 100644 --- a/tests/NewZealand/EasterMondayTest.php +++ b/tests/NewZealand/EasterMondayTest.php @@ -33,7 +33,7 @@ class EasterMondayTest extends NewZealandBaseTestCase implements YasumiTestCaseI * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/NewZealand/GoodFridayTest.php b/tests/NewZealand/GoodFridayTest.php index adeeae15f..99ff9f2ab 100644 --- a/tests/NewZealand/GoodFridayTest.php +++ b/tests/NewZealand/GoodFridayTest.php @@ -33,7 +33,7 @@ class GoodFridayTest extends NewZealandBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/NewZealand/LabourDayTest.php b/tests/NewZealand/LabourDayTest.php index cb554fb23..3944c0fbc 100644 --- a/tests/NewZealand/LabourDayTest.php +++ b/tests/NewZealand/LabourDayTest.php @@ -37,7 +37,7 @@ class LabourDayTest extends NewZealandBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 100; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $expected = new DateTime( (($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 b408bff8b..5ef3395b7 100644 --- a/tests/NewZealand/NewYearsDayTest.php +++ b/tests/NewZealand/NewYearsDayTest.php @@ -33,7 +33,7 @@ class NewYearsDayTest extends NewZealandBaseTestCase implements YasumiTestCaseIn * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/NewZealand/NewZealandTest.php b/tests/NewZealand/NewZealandTest.php index 2cc6f8a0f..54058b068 100644 --- a/tests/NewZealand/NewZealandTest.php +++ b/tests/NewZealand/NewZealandTest.php @@ -82,7 +82,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1987); } diff --git a/tests/NewZealand/QueensBirthdayTest.php b/tests/NewZealand/QueensBirthdayTest.php index 48a8bd3a5..f9b055da1 100644 --- a/tests/NewZealand/QueensBirthdayTest.php +++ b/tests/NewZealand/QueensBirthdayTest.php @@ -37,7 +37,7 @@ class QueensBirthdayTest extends NewZealandBaseTestCase implements YasumiTestCas * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -67,9 +67,9 @@ public function HolidayDataProvider(): array $data = []; for ($y = 1; $y <= 100; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $expected = new DateTime("first monday of june $year", new DateTimeZone(self::TIMEZONE)); - $data[] = [$year, $expected]; + $data[] = [$year, $expected]; } return $data; diff --git a/tests/NewZealand/WaitangiDayTest.php b/tests/NewZealand/WaitangiDayTest.php index b922fb747..bd7708b35 100644 --- a/tests/NewZealand/WaitangiDayTest.php +++ b/tests/NewZealand/WaitangiDayTest.php @@ -37,7 +37,7 @@ class WaitangiDayTest extends NewZealandBaseTestCase implements YasumiTestCaseIn * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Norway/ChristmasDayTest.php b/tests/Norway/ChristmasDayTest.php index 271624175..dd99f9f4c 100644 --- a/tests/Norway/ChristmasDayTest.php +++ b/tests/Norway/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends NorwayBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Norway/InternationalWorkersDayTest.php b/tests/Norway/InternationalWorkersDayTest.php index 084bf38b1..81dc2dab9 100644 --- a/tests/Norway/InternationalWorkersDayTest.php +++ b/tests/Norway/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends NorwayBaseTestCase implements YasumiTe * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested + * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Norway/NewYearsDayTest.php b/tests/Norway/NewYearsDayTest.php index d789a4bc0..2c512c17c 100644 --- a/tests/Norway/NewYearsDayTest.php +++ b/tests/Norway/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends NorwayBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Norway/NorwayTest.php b/tests/Norway/NorwayTest.php index 4ed420f95..d283b6dd6 100644 --- a/tests/Norway/NorwayTest.php +++ b/tests/Norway/NorwayTest.php @@ -85,7 +85,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1836); } diff --git a/tests/Norway/SecondChristmasDayTest.php b/tests/Norway/SecondChristmasDayTest.php index a1147ab4b..86b86bb02 100644 --- a/tests/Norway/SecondChristmasDayTest.php +++ b/tests/Norway/SecondChristmasDayTest.php @@ -31,7 +31,7 @@ class SecondChristmasDayTest extends NorwayBaseTestCase implements YasumiTestCas * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Poland/AllSaintsDayTest.php b/tests/Poland/AllSaintsDayTest.php index 8e03a557a..350686ce6 100644 --- a/tests/Poland/AllSaintsDayTest.php +++ b/tests/Poland/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends PolandBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Poland/AssumptionOfMaryTest.php b/tests/Poland/AssumptionOfMaryTest.php index c83f41ea7..5cc33bd0b 100644 --- a/tests/Poland/AssumptionOfMaryTest.php +++ b/tests/Poland/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends PolandBaseTestCase implements YasumiTestCaseI * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Poland/ChristmasTest.php b/tests/Poland/ChristmasTest.php index e71bfe978..ad1535fd4 100644 --- a/tests/Poland/ChristmasTest.php +++ b/tests/Poland/ChristmasTest.php @@ -31,7 +31,7 @@ class ChristmasTest extends PolandBaseTestCase implements YasumiTestCaseInterfac * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Poland/EpiphanyTest.php b/tests/Poland/EpiphanyTest.php index b64a40362..b8a1d3174 100644 --- a/tests/Poland/EpiphanyTest.php +++ b/tests/Poland/EpiphanyTest.php @@ -31,7 +31,7 @@ class EpiphanyTest extends PolandBaseTestCase implements YasumiTestCaseInterface * * @dataProvider EpiphanyDataProvider * - * @param int $year the year for which Epiphany needs to be tested + * @param int $year the year for which Epiphany needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Poland/InternationalWorkersDayTest.php b/tests/Poland/InternationalWorkersDayTest.php index 77c0e5edc..d516c63a6 100644 --- a/tests/Poland/InternationalWorkersDayTest.php +++ b/tests/Poland/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends PolandBaseTestCase implements YasumiTe * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested + * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Poland/NewYearsDayTest.php b/tests/Poland/NewYearsDayTest.php index d40ac0beb..7f3d00431 100644 --- a/tests/Poland/NewYearsDayTest.php +++ b/tests/Poland/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends PolandBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Poland/PolandTest.php b/tests/Poland/PolandTest.php index 9a4b05c2b..33fc6b9fd 100644 --- a/tests/Poland/PolandTest.php +++ b/tests/Poland/PolandTest.php @@ -86,7 +86,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1918); } diff --git a/tests/Poland/SecondChristmasDayTest.php b/tests/Poland/SecondChristmasDayTest.php index d28404870..c8ceb583a 100644 --- a/tests/Poland/SecondChristmasDayTest.php +++ b/tests/Poland/SecondChristmasDayTest.php @@ -31,7 +31,7 @@ class SecondChristmasDayTest extends PolandBaseTestCase implements YasumiTestCas * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Portugal/AllSaintsDayTest.php b/tests/Portugal/AllSaintsDayTest.php index 7aca56da5..bb3cf8312 100644 --- a/tests/Portugal/AllSaintsDayTest.php +++ b/tests/Portugal/AllSaintsDayTest.php @@ -46,11 +46,11 @@ class AllSaintsDayTest extends PortugalBaseTestCase implements YasumiTestCaseInt */ public function testHoliday() { - $year = 2016; + $year = 2016; $expected = new DateTime("$year-11-01", new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); - $year = 2012; + $year = 2012; $expected = new DateTime("$year-11-01", new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/AssumptionOfMaryTest.php b/tests/Portugal/AssumptionOfMaryTest.php index 63e338766..8a6d3714c 100644 --- a/tests/Portugal/AssumptionOfMaryTest.php +++ b/tests/Portugal/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends PortugalBaseTestCase implements YasumiTestCas * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Portugal/CarnationRevolutionDayTest.php b/tests/Portugal/CarnationRevolutionDayTest.php index b1470c583..6c39b0790 100644 --- a/tests/Portugal/CarnationRevolutionDayTest.php +++ b/tests/Portugal/CarnationRevolutionDayTest.php @@ -39,7 +39,7 @@ class CarnationRevolutionDayTest extends PortugalBaseTestCase implements YasumiT */ public function testHolidayAfterEstablishment() { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); $expected = new DateTime("$year-04-25", new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/ChristmasTest.php b/tests/Portugal/ChristmasTest.php index 50c91ca63..ff67b8335 100644 --- a/tests/Portugal/ChristmasTest.php +++ b/tests/Portugal/ChristmasTest.php @@ -31,7 +31,7 @@ class ChristmasTest extends PortugalBaseTestCase implements YasumiTestCaseInterf * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Portugal/CorpusChristiTest.php b/tests/Portugal/CorpusChristiTest.php index 717c87235..44927db7a 100644 --- a/tests/Portugal/CorpusChristiTest.php +++ b/tests/Portugal/CorpusChristiTest.php @@ -44,7 +44,7 @@ class CorpusChristiTest extends PortugalBaseTestCase implements YasumiTestCaseIn */ public function testHoliday() { - $year = 2016; + $year = 2016; $expected = new DateTime("$year-5-26", new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/ImmaculateConceptionTest.php b/tests/Portugal/ImmaculateConceptionTest.php index e4e930051..9de0ac849 100644 --- a/tests/Portugal/ImmaculateConceptionTest.php +++ b/tests/Portugal/ImmaculateConceptionTest.php @@ -31,7 +31,7 @@ class ImmaculateConceptionTest extends PortugalBaseTestCase implements YasumiTes * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Portugal/InternationalWorkersDayTest.php b/tests/Portugal/InternationalWorkersDayTest.php index 8ccc69266..8df569ac2 100644 --- a/tests/Portugal/InternationalWorkersDayTest.php +++ b/tests/Portugal/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends PortugalBaseTestCase implements Yasumi * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested + * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Portugal/NewYearsDayTest.php b/tests/Portugal/NewYearsDayTest.php index b4feb9b29..96fa861f9 100644 --- a/tests/Portugal/NewYearsDayTest.php +++ b/tests/Portugal/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends PortugalBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Portugal/PortugalDayTest.php b/tests/Portugal/PortugalDayTest.php index 349c1652e..fe0b6c9ea 100644 --- a/tests/Portugal/PortugalDayTest.php +++ b/tests/Portugal/PortugalDayTest.php @@ -40,35 +40,35 @@ class PortugalDayTest extends PortugalBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test before it was abolished. - * @see Portugal::calculatePortugalDay() * @throws \ReflectionException * @throws \Exception + * @see Portugal::calculatePortugalDay() */ public function testHolidayBeforeAbolishment() { - $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR_BEFORE); + $year = $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR_BEFORE); $expected = new DateTime("$year-06-10", new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * Tests the holiday defined in this test after it was restored - * @see Portugal::calculatePortugalDay() * @throws \ReflectionException * @throws \Exception + * @see Portugal::calculatePortugalDay() */ public function testHolidayAfterRestoration() { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR_AFTER); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR_AFTER); $expected = new DateTime("$year-06-10", new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * Tests that the holiday defined in this test does not exist during the period that it was abolished + * @throws \ReflectionException * @see Portugal::calculatePortugalDay() * - * @throws \ReflectionException */ public function testNotHolidayDuringAbolishment() { diff --git a/tests/Portugal/PortugalTest.php b/tests/Portugal/PortugalTest.php index ba6f32174..449180c9e 100644 --- a/tests/Portugal/PortugalTest.php +++ b/tests/Portugal/PortugalTest.php @@ -91,7 +91,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1974); } diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index 2583045b2..26aa38eaf 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -86,7 +86,7 @@ public function testHolidayOnAfterEstablishment() $expected = new DateTime("$year-10-05", new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); - $year = self::ESTABLISHMENT_YEAR; + $year = self::ESTABLISHMENT_YEAR; $expected = new DateTime("$year-10-05", new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Portugal/RestorationOfIndependenceTest.php b/tests/Portugal/RestorationOfIndependenceTest.php index 7e0fd9e23..62c1e53de 100644 --- a/tests/Portugal/RestorationOfIndependenceTest.php +++ b/tests/Portugal/RestorationOfIndependenceTest.php @@ -56,7 +56,7 @@ public function testHolidayOnAfterEstablishment() $expected = new DateTime("$year-12-01", new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); - $year = self::ESTABLISHMENT_YEAR; + $year = self::ESTABLISHMENT_YEAR; $expected = new DateTime("$year-12-01", new DateTimeZone(self::TIMEZONE)); $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } diff --git a/tests/Romania/ChristmasDayTest.php b/tests/Romania/ChristmasDayTest.php index 7e276ce76..1cdadde34 100644 --- a/tests/Romania/ChristmasDayTest.php +++ b/tests/Romania/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Romania/DayAfterNewYearsDayTest.php b/tests/Romania/DayAfterNewYearsDayTest.php index 264dfb4de..cc4388bcc 100644 --- a/tests/Romania/DayAfterNewYearsDayTest.php +++ b/tests/Romania/DayAfterNewYearsDayTest.php @@ -31,7 +31,7 @@ class DayAfterNewYearsDayTest extends RomaniaBaseTestCase implements YasumiTestC * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Romania/InternationalWorkersDayTest.php b/tests/Romania/InternationalWorkersDayTest.php index fe860285a..fe6b4a2d0 100755 --- a/tests/Romania/InternationalWorkersDayTest.php +++ b/tests/Romania/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends RomaniaBaseTestCase implements YasumiT * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested + * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Romania/NewYearsDayTest.php b/tests/Romania/NewYearsDayTest.php index 30766ec45..a454ddea6 100644 --- a/tests/Romania/NewYearsDayTest.php +++ b/tests/Romania/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Romania/RomaniaTest.php b/tests/Romania/RomaniaTest.php index 2ecef9abc..c2b71afcd 100755 --- a/tests/Romania/RomaniaTest.php +++ b/tests/Romania/RomaniaTest.php @@ -104,7 +104,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(2015, 2025); } diff --git a/tests/Romania/SecondChristmasDayTest.php b/tests/Romania/SecondChristmasDayTest.php index c7dacb67f..5a467aec2 100644 --- a/tests/Romania/SecondChristmasDayTest.php +++ b/tests/Romania/SecondChristmasDayTest.php @@ -31,7 +31,7 @@ class SecondChristmasDayTest extends RomaniaBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Russia/InternationalWomensDayTest.php b/tests/Russia/InternationalWomensDayTest.php index bd1a2983e..e47609806 100644 --- a/tests/Russia/InternationalWomensDayTest.php +++ b/tests/Russia/InternationalWomensDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Russia/NewYearHolidaysDay2Test.php b/tests/Russia/NewYearHolidaysDay2Test.php index 71a9580cf..b1f19b345 100644 --- a/tests/Russia/NewYearHolidaysDay2Test.php +++ b/tests/Russia/NewYearHolidaysDay2Test.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Russia/NewYearHolidaysDay3Test.php b/tests/Russia/NewYearHolidaysDay3Test.php index 7e0c11b35..de37ea286 100644 --- a/tests/Russia/NewYearHolidaysDay3Test.php +++ b/tests/Russia/NewYearHolidaysDay3Test.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Russia/NewYearHolidaysDay4Test.php b/tests/Russia/NewYearHolidaysDay4Test.php index f47599133..84a51cb95 100644 --- a/tests/Russia/NewYearHolidaysDay4Test.php +++ b/tests/Russia/NewYearHolidaysDay4Test.php @@ -39,7 +39,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Russia/NewYearHolidaysDay5Test.php b/tests/Russia/NewYearHolidaysDay5Test.php index 1e40951e0..f85a6c442 100644 --- a/tests/Russia/NewYearHolidaysDay5Test.php +++ b/tests/Russia/NewYearHolidaysDay5Test.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Russia/NewYearHolidaysDay6Test.php b/tests/Russia/NewYearHolidaysDay6Test.php index c7f9b50e2..997adfb4e 100644 --- a/tests/Russia/NewYearHolidaysDay6Test.php +++ b/tests/Russia/NewYearHolidaysDay6Test.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Russia/NewYearHolidaysDay8Test.php b/tests/Russia/NewYearHolidaysDay8Test.php index 9c87f5ba7..a81ee7f6f 100644 --- a/tests/Russia/NewYearHolidaysDay8Test.php +++ b/tests/Russia/NewYearHolidaysDay8Test.php @@ -39,7 +39,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Russia/NewYearsDayTest.php b/tests/Russia/NewYearsDayTest.php index 1128da96b..d3b71fd1e 100644 --- a/tests/Russia/NewYearsDayTest.php +++ b/tests/Russia/NewYearsDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Russia/OrthodoxChristmasDayTest.php b/tests/Russia/OrthodoxChristmasDayTest.php index 9b31c8fdd..59a9b441b 100644 --- a/tests/Russia/OrthodoxChristmasDayTest.php +++ b/tests/Russia/OrthodoxChristmasDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Russia/SpringAndLabourDayTest.php b/tests/Russia/SpringAndLabourDayTest.php index 69cdd350a..379599d28 100644 --- a/tests/Russia/SpringAndLabourDayTest.php +++ b/tests/Russia/SpringAndLabourDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Russia/VictoryDayTest.php b/tests/Russia/VictoryDayTest.php index e2cbd3173..f37b4f51c 100644 --- a/tests/Russia/VictoryDayTest.php +++ b/tests/Russia/VictoryDayTest.php @@ -40,7 +40,7 @@ public function holidayDataProvider(): array /** * @dataProvider holidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Slovakia/AllSaintsDayTest.php b/tests/Slovakia/AllSaintsDayTest.php index 2431e02a4..ae43c7bf3 100644 --- a/tests/Slovakia/AllSaintsDayTest.php +++ b/tests/Slovakia/AllSaintsDayTest.php @@ -38,7 +38,7 @@ class AllSaintsDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Slovakia/ChristmasDayTest.php b/tests/Slovakia/ChristmasDayTest.php index af5e75da0..6d12a2940 100644 --- a/tests/Slovakia/ChristmasDayTest.php +++ b/tests/Slovakia/ChristmasDayTest.php @@ -38,7 +38,7 @@ class ChristmasDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Slovakia/ChristmasEveTest.php b/tests/Slovakia/ChristmasEveTest.php index c27288545..d076f842f 100644 --- a/tests/Slovakia/ChristmasEveTest.php +++ b/tests/Slovakia/ChristmasEveTest.php @@ -38,7 +38,7 @@ class ChristmasEveTest extends SlovakiaBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Slovakia/EasterMondayTest.php b/tests/Slovakia/EasterMondayTest.php index a73ddfb79..e6b036874 100644 --- a/tests/Slovakia/EasterMondayTest.php +++ b/tests/Slovakia/EasterMondayTest.php @@ -39,7 +39,7 @@ class EasterMondayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Slovakia/EpiphanyTest.php b/tests/Slovakia/EpiphanyTest.php index 8c4c1352d..0c5991e50 100644 --- a/tests/Slovakia/EpiphanyTest.php +++ b/tests/Slovakia/EpiphanyTest.php @@ -38,7 +38,7 @@ class EpiphanyTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Slovakia/GoodFridayTest.php b/tests/Slovakia/GoodFridayTest.php index 9b757ab0a..33ea3a01c 100644 --- a/tests/Slovakia/GoodFridayTest.php +++ b/tests/Slovakia/GoodFridayTest.php @@ -39,7 +39,7 @@ class GoodFridayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Slovakia/InternationalWorkersDayTest.php b/tests/Slovakia/InternationalWorkersDayTest.php index de8d8d1ad..71850522a 100644 --- a/tests/Slovakia/InternationalWorkersDayTest.php +++ b/tests/Slovakia/InternationalWorkersDayTest.php @@ -38,7 +38,7 @@ class InternationalWorkersDayTest extends SlovakiaBaseTestCase implements Yasumi * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Slovakia/OurLadyOfSorrowsDayTest.php b/tests/Slovakia/OurLadyOfSorrowsDayTest.php index 1758dd32f..957a68c51 100644 --- a/tests/Slovakia/OurLadyOfSorrowsDayTest.php +++ b/tests/Slovakia/OurLadyOfSorrowsDayTest.php @@ -38,7 +38,7 @@ class OurLadyOfSorrowsDayTest extends SlovakiaBaseTestCase implements YasumiTest * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php index 95dbeceb4..ee1b738ec 100644 --- a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php @@ -38,7 +38,7 @@ class SaintsCyrilAndMethodiusDayTest extends SlovakiaBaseTestCase implements Yas * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Slovakia/SecondChristmasDayTest.php b/tests/Slovakia/SecondChristmasDayTest.php index 6f9f9f114..c39085bca 100644 --- a/tests/Slovakia/SecondChristmasDayTest.php +++ b/tests/Slovakia/SecondChristmasDayTest.php @@ -38,7 +38,7 @@ class SecondChristmasDayTest extends SlovakiaBaseTestCase implements YasumiTestC * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Slovakia/SlovakConstitutionDayTest.php b/tests/Slovakia/SlovakConstitutionDayTest.php index 02498edd5..bb3114199 100644 --- a/tests/Slovakia/SlovakConstitutionDayTest.php +++ b/tests/Slovakia/SlovakConstitutionDayTest.php @@ -37,7 +37,7 @@ class SlovakConstitutionDayTest extends SlovakiaBaseTestCase implements YasumiTe * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Slovakia/SlovakIndependeceDayTest.php b/tests/Slovakia/SlovakIndependeceDayTest.php index 1780e17fc..9baefbf6c 100644 --- a/tests/Slovakia/SlovakIndependeceDayTest.php +++ b/tests/Slovakia/SlovakIndependeceDayTest.php @@ -39,7 +39,7 @@ class SlovakIndependeceDayTest extends SlovakiaBaseTestCase implements YasumiTes * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Slovakia/SlovakNationalUprisingDayTest.php b/tests/Slovakia/SlovakNationalUprisingDayTest.php index 5b21fa1b1..d859f94b6 100644 --- a/tests/Slovakia/SlovakNationalUprisingDayTest.php +++ b/tests/Slovakia/SlovakNationalUprisingDayTest.php @@ -38,7 +38,7 @@ class SlovakNationalUprisingDayTest extends SlovakiaBaseTestCase implements Yasu * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Slovakia/SlovakiaTest.php b/tests/Slovakia/SlovakiaTest.php index 23b174f39..2c79c6212 100644 --- a/tests/Slovakia/SlovakiaTest.php +++ b/tests/Slovakia/SlovakiaTest.php @@ -101,7 +101,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { // NOTE: 1993 is the year Slovakia was founded as an independent state $this->year = $this->generateRandomYear(1993, 2100); diff --git a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php index 1bf3aa96b..97800a6fc 100644 --- a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php @@ -38,7 +38,7 @@ class StruggleForFreedomAndDemocracyDayTest extends SlovakiaBaseTestCase impleme * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Slovakia/VictoryInEuropeDayTest.php b/tests/Slovakia/VictoryInEuropeDayTest.php index 4a92c15e1..922a9c0a1 100644 --- a/tests/Slovakia/VictoryInEuropeDayTest.php +++ b/tests/Slovakia/VictoryInEuropeDayTest.php @@ -38,7 +38,7 @@ class VictoryInEuropeDayTest extends SlovakiaBaseTestCase implements YasumiTestC * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/SouthAfrica/ChristmasDayTest.php b/tests/SouthAfrica/ChristmasDayTest.php index 5ce3ba864..9d6be2d3f 100644 --- a/tests/SouthAfrica/ChristmasDayTest.php +++ b/tests/SouthAfrica/ChristmasDayTest.php @@ -42,7 +42,7 @@ class ChristmasDayTest extends SouthAfricaBaseTestCase implements YasumiTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -71,8 +71,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/SouthAfrica/FamilyDayTest.php b/tests/SouthAfrica/FamilyDayTest.php index 8ef2c2e19..8bfaebb16 100644 --- a/tests/SouthAfrica/FamilyDayTest.php +++ b/tests/SouthAfrica/FamilyDayTest.php @@ -42,7 +42,7 @@ class FamilyDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/SouthAfrica/FreedomDayTest.php b/tests/SouthAfrica/FreedomDayTest.php index 81f8acb48..65be912dc 100644 --- a/tests/SouthAfrica/FreedomDayTest.php +++ b/tests/SouthAfrica/FreedomDayTest.php @@ -42,7 +42,7 @@ class FreedomDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseIn * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -71,8 +71,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-4-27", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-4-27", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/SouthAfrica/GoodFridayTest.php b/tests/SouthAfrica/GoodFridayTest.php index 7b7e45be9..2d094c917 100644 --- a/tests/SouthAfrica/GoodFridayTest.php +++ b/tests/SouthAfrica/GoodFridayTest.php @@ -42,7 +42,7 @@ class GoodFridayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseIn * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/SouthAfrica/HeritageDayTest.php b/tests/SouthAfrica/HeritageDayTest.php index b761744f6..46bf7060d 100644 --- a/tests/SouthAfrica/HeritageDayTest.php +++ b/tests/SouthAfrica/HeritageDayTest.php @@ -42,7 +42,7 @@ class HeritageDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseI * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -71,8 +71,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-9-24", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-9-24", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/SouthAfrica/HumanRightsDayTest.php b/tests/SouthAfrica/HumanRightsDayTest.php index cc9fb0e5b..e7e8f4d5c 100644 --- a/tests/SouthAfrica/HumanRightsDayTest.php +++ b/tests/SouthAfrica/HumanRightsDayTest.php @@ -42,7 +42,7 @@ class HumanRightsDayTest extends SouthAfricaBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -71,8 +71,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-3-21", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/SouthAfrica/NationalWomensDayTest.php b/tests/SouthAfrica/NationalWomensDayTest.php index 690890044..7fcd5e411 100644 --- a/tests/SouthAfrica/NationalWomensDayTest.php +++ b/tests/SouthAfrica/NationalWomensDayTest.php @@ -42,7 +42,7 @@ class NationalWomensDayTest extends SouthAfricaBaseTestCase implements YasumiTes * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -71,8 +71,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-8-9", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-8-9", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/SouthAfrica/NewYearsDayTest.php b/tests/SouthAfrica/NewYearsDayTest.php index 89877de56..9c467fbbd 100644 --- a/tests/SouthAfrica/NewYearsDayTest.php +++ b/tests/SouthAfrica/NewYearsDayTest.php @@ -42,7 +42,7 @@ class NewYearsDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseI * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -71,8 +71,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/SouthAfrica/ReconciliationDayTest.php b/tests/SouthAfrica/ReconciliationDayTest.php index d7cf225e5..063e1c32d 100644 --- a/tests/SouthAfrica/ReconciliationDayTest.php +++ b/tests/SouthAfrica/ReconciliationDayTest.php @@ -42,7 +42,7 @@ class ReconciliationDayTest extends SouthAfricaBaseTestCase implements YasumiTes * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -71,8 +71,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-12-16", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-12-16", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/SouthAfrica/SecondChristmasDayTest.php b/tests/SouthAfrica/SecondChristmasDayTest.php index 5c73614bb..80e133b2c 100644 --- a/tests/SouthAfrica/SecondChristmasDayTest.php +++ b/tests/SouthAfrica/SecondChristmasDayTest.php @@ -42,7 +42,7 @@ class SecondChristmasDayTest extends SouthAfricaBaseTestCase implements YasumiTe * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -71,8 +71,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/SouthAfrica/SouthAfricaTest.php b/tests/SouthAfrica/SouthAfricaTest.php index 263104f8b..bdbd7164c 100644 --- a/tests/SouthAfrica/SouthAfricaTest.php +++ b/tests/SouthAfrica/SouthAfricaTest.php @@ -96,7 +96,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1994); } diff --git a/tests/SouthAfrica/WorkersDayTest.php b/tests/SouthAfrica/WorkersDayTest.php index 7acfe18a8..fed33a087 100644 --- a/tests/SouthAfrica/WorkersDayTest.php +++ b/tests/SouthAfrica/WorkersDayTest.php @@ -42,7 +42,7 @@ class WorkersDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseIn * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -71,8 +71,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/SouthAfrica/YouthDayTest.php b/tests/SouthAfrica/YouthDayTest.php index d586f1d97..8691179b1 100644 --- a/tests/SouthAfrica/YouthDayTest.php +++ b/tests/SouthAfrica/YouthDayTest.php @@ -42,7 +42,7 @@ class YouthDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -71,8 +71,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); - $date = new DateTime("$year-6-16", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-6-16", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/SouthKorea/SouthKoreaTest.php b/tests/SouthKorea/SouthKoreaTest.php index 96b07ba7e..4e81817d6 100644 --- a/tests/SouthKorea/SouthKoreaTest.php +++ b/tests/SouthKorea/SouthKoreaTest.php @@ -127,7 +127,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1949, 2050); } diff --git a/tests/Spain/AllSaintsDayTest.php b/tests/Spain/AllSaintsDayTest.php index fe5d1de6c..80f84c637 100644 --- a/tests/Spain/AllSaintsDayTest.php +++ b/tests/Spain/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends SpainBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Spain/Andalusia/AndalusiaTest.php b/tests/Spain/Andalusia/AndalusiaTest.php index 3ec3fcc60..d17e430ec 100644 --- a/tests/Spain/Andalusia/AndalusiaTest.php +++ b/tests/Spain/Andalusia/AndalusiaTest.php @@ -87,7 +87,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1981); } diff --git a/tests/Spain/Aragon/AragonTest.php b/tests/Spain/Aragon/AragonTest.php index 928c7d1de..7f573590c 100644 --- a/tests/Spain/Aragon/AragonTest.php +++ b/tests/Spain/Aragon/AragonTest.php @@ -87,7 +87,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1981); } diff --git a/tests/Spain/AssumptionOfMaryTest.php b/tests/Spain/AssumptionOfMaryTest.php index ca52d3132..b772cae88 100644 --- a/tests/Spain/AssumptionOfMaryTest.php +++ b/tests/Spain/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends SpainBaseTestCase implements YasumiTestCaseIn * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Spain/Asturias/AsturiasTest.php b/tests/Spain/Asturias/AsturiasTest.php index d4532a20f..c8118bd94 100644 --- a/tests/Spain/Asturias/AsturiasTest.php +++ b/tests/Spain/Asturias/AsturiasTest.php @@ -88,7 +88,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1984); } diff --git a/tests/Spain/BalearicIslands/BalearicIslandsTest.php b/tests/Spain/BalearicIslands/BalearicIslandsTest.php index 8850fc865..87666ce0e 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsTest.php @@ -90,7 +90,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1981); } diff --git a/tests/Spain/BasqueCountry/BasqueCountryTest.php b/tests/Spain/BasqueCountry/BasqueCountryTest.php index 742121110..c73977296 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryTest.php @@ -88,7 +88,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(2011, 2013); } diff --git a/tests/Spain/CanaryIslands/CanaryIslandsTest.php b/tests/Spain/CanaryIslands/CanaryIslandsTest.php index 8ab7983a8..0fd627452 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsTest.php @@ -87,7 +87,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1984); } diff --git a/tests/Spain/Cantabria/CantabriaTest.php b/tests/Spain/Cantabria/CantabriaTest.php index ebff05205..876fb89b8 100644 --- a/tests/Spain/Cantabria/CantabriaTest.php +++ b/tests/Spain/Cantabria/CantabriaTest.php @@ -87,7 +87,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1981); } diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php index adfadbb2c..d9f1a9bb4 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php @@ -87,7 +87,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1981); } diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php index fe3037e7d..233e1ed38 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php @@ -88,7 +88,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1984); } diff --git a/tests/Spain/Catalonia/CataloniaTest.php b/tests/Spain/Catalonia/CataloniaTest.php index 9880c198d..1f2caa6fc 100644 --- a/tests/Spain/Catalonia/CataloniaTest.php +++ b/tests/Spain/Catalonia/CataloniaTest.php @@ -89,7 +89,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1981); } diff --git a/tests/Spain/Catalonia/stJohnsDayTest.php b/tests/Spain/Catalonia/stJohnsDayTest.php index 75e48ebe4..da662d073 100644 --- a/tests/Spain/Catalonia/stJohnsDayTest.php +++ b/tests/Spain/Catalonia/stJohnsDayTest.php @@ -31,7 +31,7 @@ class stJohnsDayTest extends CataloniaBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Spain/Ceuta/CeutaTest.php b/tests/Spain/Ceuta/CeutaTest.php index cf3144196..1ea76015a 100644 --- a/tests/Spain/Ceuta/CeutaTest.php +++ b/tests/Spain/Ceuta/CeutaTest.php @@ -87,7 +87,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1981); } diff --git a/tests/Spain/ChristmasTest.php b/tests/Spain/ChristmasTest.php index af54f26e8..817631502 100644 --- a/tests/Spain/ChristmasTest.php +++ b/tests/Spain/ChristmasTest.php @@ -31,7 +31,7 @@ class ChristmasTest extends SpainBaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php index 2fe035e41..6388660a4 100644 --- a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php +++ b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php @@ -89,7 +89,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1981); } diff --git a/tests/Spain/EpiphanyTest.php b/tests/Spain/EpiphanyTest.php index 23f02c78d..f9392c81d 100644 --- a/tests/Spain/EpiphanyTest.php +++ b/tests/Spain/EpiphanyTest.php @@ -31,7 +31,7 @@ class EpiphanyTest extends SpainBaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Spain/Extremadura/ExtremaduraTest.php b/tests/Spain/Extremadura/ExtremaduraTest.php index e1bbfcf2e..2a545e985 100644 --- a/tests/Spain/Extremadura/ExtremaduraTest.php +++ b/tests/Spain/Extremadura/ExtremaduraTest.php @@ -87,7 +87,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1984); } diff --git a/tests/Spain/Galicia/GaliciaTest.php b/tests/Spain/Galicia/GaliciaTest.php index 9027603fd..af75d1559 100644 --- a/tests/Spain/Galicia/GaliciaTest.php +++ b/tests/Spain/Galicia/GaliciaTest.php @@ -89,7 +89,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(2000); } diff --git a/tests/Spain/ImmaculateConceptionTest.php b/tests/Spain/ImmaculateConceptionTest.php index 8fe5cc655..b7b4ae7c3 100644 --- a/tests/Spain/ImmaculateConceptionTest.php +++ b/tests/Spain/ImmaculateConceptionTest.php @@ -31,7 +31,7 @@ class ImmaculateConceptionTest extends SpainBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Spain/InternationalWorkersDayTest.php b/tests/Spain/InternationalWorkersDayTest.php index 7be3c7971..d3e8d4f74 100644 --- a/tests/Spain/InternationalWorkersDayTest.php +++ b/tests/Spain/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends SpainBaseTestCase implements YasumiTes * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Spain/LaRioja/LaRiojaTest.php b/tests/Spain/LaRioja/LaRiojaTest.php index 9dff92452..0e440930c 100644 --- a/tests/Spain/LaRioja/LaRiojaTest.php +++ b/tests/Spain/LaRioja/LaRiojaTest.php @@ -87,7 +87,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1983); } diff --git a/tests/Spain/Melilla/MelillaTest.php b/tests/Spain/Melilla/MelillaTest.php index eaab2d2f0..fb4bb1154 100644 --- a/tests/Spain/Melilla/MelillaTest.php +++ b/tests/Spain/Melilla/MelillaTest.php @@ -87,7 +87,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1981); } diff --git a/tests/Spain/Navarre/NavarreTest.php b/tests/Spain/Navarre/NavarreTest.php index 080f68977..e70a52efd 100644 --- a/tests/Spain/Navarre/NavarreTest.php +++ b/tests/Spain/Navarre/NavarreTest.php @@ -88,7 +88,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1981); } diff --git a/tests/Spain/NewYearsDayTest.php b/tests/Spain/NewYearsDayTest.php index 4475813e8..206ccee3d 100644 --- a/tests/Spain/NewYearsDayTest.php +++ b/tests/Spain/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends SpainBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php index b462ff338..cb93e9c7d 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php @@ -88,7 +88,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1981); } diff --git a/tests/Spain/SpainTest.php b/tests/Spain/SpainTest.php index e6ac37ac7..c9de57ff5 100644 --- a/tests/Spain/SpainTest.php +++ b/tests/Spain/SpainTest.php @@ -83,7 +83,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(2000); } diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php index 16ee3f717..033668cca 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php @@ -88,7 +88,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1981); } diff --git a/tests/Spain/ValentinesDayTest.php b/tests/Spain/ValentinesDayTest.php index 64f3f128a..2c9e61191 100644 --- a/tests/Spain/ValentinesDayTest.php +++ b/tests/Spain/ValentinesDayTest.php @@ -31,7 +31,7 @@ class ValentinesDayTest extends SpainBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Spain/stJosephsDayTest.php b/tests/Spain/stJosephsDayTest.php index 0e82eecf8..d2aa621a2 100644 --- a/tests/Spain/stJosephsDayTest.php +++ b/tests/Spain/stJosephsDayTest.php @@ -37,7 +37,7 @@ class stJosephsDayTest extends SpainBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Sweden/AllSaintsDayTest.php b/tests/Sweden/AllSaintsDayTest.php index f53e8cf12..94a2cbc94 100644 --- a/tests/Sweden/AllSaintsDayTest.php +++ b/tests/Sweden/AllSaintsDayTest.php @@ -33,7 +33,7 @@ class AllSaintsDayTest extends SwedenBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Sweden/AllSaintsEveTest.php b/tests/Sweden/AllSaintsEveTest.php index 3897206ba..bf86c24e7 100644 --- a/tests/Sweden/AllSaintsEveTest.php +++ b/tests/Sweden/AllSaintsEveTest.php @@ -33,7 +33,7 @@ class AllSaintsEveTest extends SwedenBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Sweden/ChristmasDayTest.php b/tests/Sweden/ChristmasDayTest.php index 1d98ea646..fce72e791 100644 --- a/tests/Sweden/ChristmasDayTest.php +++ b/tests/Sweden/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends SwedenBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Sweden/ChristmasEveTest.php b/tests/Sweden/ChristmasEveTest.php index 2502f163e..dde6accbe 100644 --- a/tests/Sweden/ChristmasEveTest.php +++ b/tests/Sweden/ChristmasEveTest.php @@ -31,7 +31,7 @@ class ChristmasEveTest extends SwedenBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Sweden/EpiphanyEveTest.php b/tests/Sweden/EpiphanyEveTest.php index ab72505f2..f7a72a16b 100644 --- a/tests/Sweden/EpiphanyEveTest.php +++ b/tests/Sweden/EpiphanyEveTest.php @@ -31,7 +31,7 @@ class EpiphanyEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Sweden/EpiphanyTest.php b/tests/Sweden/EpiphanyTest.php index 1547e9fee..a27b19fb4 100644 --- a/tests/Sweden/EpiphanyTest.php +++ b/tests/Sweden/EpiphanyTest.php @@ -31,7 +31,7 @@ class EpiphanyTest extends SwedenBaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Sweden/InternationalWorkersDayTest.php b/tests/Sweden/InternationalWorkersDayTest.php index 8ec4003ee..532d75155 100644 --- a/tests/Sweden/InternationalWorkersDayTest.php +++ b/tests/Sweden/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends SwedenBaseTestCase implements YasumiTe * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested + * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Sweden/NewYearsDayTest.php b/tests/Sweden/NewYearsDayTest.php index f87db7cf8..5137f2f0c 100644 --- a/tests/Sweden/NewYearsDayTest.php +++ b/tests/Sweden/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Sweden/NewYearsEveTest.php b/tests/Sweden/NewYearsEveTest.php index 33508ffbd..70fa18c8e 100644 --- a/tests/Sweden/NewYearsEveTest.php +++ b/tests/Sweden/NewYearsEveTest.php @@ -31,7 +31,7 @@ class NewYearsEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Sweden/SecondChristmasDayTest.php b/tests/Sweden/SecondChristmasDayTest.php index 967d5aa9f..8000756fc 100644 --- a/tests/Sweden/SecondChristmasDayTest.php +++ b/tests/Sweden/SecondChristmasDayTest.php @@ -31,7 +31,7 @@ class SecondChristmasDayTest extends SwedenBaseTestCase implements YasumiTestCas * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Sweden/StJohnsDayTest.php b/tests/Sweden/StJohnsDayTest.php index a3039c38d..2131473c8 100644 --- a/tests/Sweden/StJohnsDayTest.php +++ b/tests/Sweden/StJohnsDayTest.php @@ -35,7 +35,7 @@ public function testHoliday() $year = $this->generateRandomYear(); $holidays = Yasumi::create(self::REGION, $year); - $holiday = $holidays->getHoliday(self::HOLIDAY); + $holiday = $holidays->getHoliday(self::HOLIDAY); // Some basic assertions $this->assertInstanceOf('Yasumi\Provider\\' . \str_replace('/', '\\', self::REGION), $holidays); diff --git a/tests/Sweden/StJohnsEveTest.php b/tests/Sweden/StJohnsEveTest.php index 6f030e8d9..b85f20f58 100644 --- a/tests/Sweden/StJohnsEveTest.php +++ b/tests/Sweden/StJohnsEveTest.php @@ -35,7 +35,7 @@ public function testHoliday() $year = $this->generateRandomYear(); $holidays = Yasumi::create(self::REGION, $year); - $holiday = $holidays->getHoliday(self::HOLIDAY); + $holiday = $holidays->getHoliday(self::HOLIDAY); // Some basic assertions $this->assertInstanceOf('Yasumi\Provider\\' . \str_replace('/', '\\', self::REGION), $holidays); diff --git a/tests/Sweden/SwedenTest.php b/tests/Sweden/SwedenTest.php index f58706af6..5d5453208 100644 --- a/tests/Sweden/SwedenTest.php +++ b/tests/Sweden/SwedenTest.php @@ -93,7 +93,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1916); } diff --git a/tests/Sweden/WalpurgisEveTest.php b/tests/Sweden/WalpurgisEveTest.php index 86916f8b6..cf077d0c3 100644 --- a/tests/Sweden/WalpurgisEveTest.php +++ b/tests/Sweden/WalpurgisEveTest.php @@ -31,7 +31,7 @@ class WalpurgisEveTest extends SwedenBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Aargau/AargauTest.php b/tests/Switzerland/Aargau/AargauTest.php index 01df0d9ad..4d44ddbdb 100644 --- a/tests/Switzerland/Aargau/AargauTest.php +++ b/tests/Switzerland/Aargau/AargauTest.php @@ -101,7 +101,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Aargau/ChristmasDayTest.php b/tests/Switzerland/Aargau/ChristmasDayTest.php index c63e6c89a..81d53c642 100644 --- a/tests/Switzerland/Aargau/ChristmasDayTest.php +++ b/tests/Switzerland/Aargau/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends AargauBaseTestCase implements YasumiTestCaseInter * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Aargau/NewYearsDayTest.php b/tests/Switzerland/Aargau/NewYearsDayTest.php index fd9a6118c..6ee1fa4ad 100644 --- a/tests/Switzerland/Aargau/NewYearsDayTest.php +++ b/tests/Switzerland/Aargau/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends AargauBaseTestCase implements YasumiTestCaseInterf * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php index 657bed6bb..5b8d03b93 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php @@ -98,7 +98,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php index 5c9e93b8f..f45787fbe 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends AppenzellAusserrhodenBaseTestCase implements Yasu * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php index 584b3962f..4baddbc33 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends AppenzellAusserrhodenBaseTestCase implements Yasum * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php index a841297bf..c86ae6370 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends AppenzellAusserrhodenBaseTestCase implements Yas * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php index 8bfb8ce38..7c7e4db0e 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends AppenzellInnerrhodenBaseTestCase implements Yasum * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested + * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php index af30e4757..3f4c500ef 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php @@ -102,7 +102,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php index 29a0bad27..73920fae3 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends AppenzellInnerrhodenBaseTestCase implements Y * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php index b4f6023c1..bb6e1ac3c 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends AppenzellInnerrhodenBaseTestCase implements Yasum * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php index f88f023f6..a2d7c5fd1 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php @@ -31,7 +31,7 @@ class ImmaculateConceptionTest extends AppenzellInnerrhodenBaseTestCase implemen * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php index b2a0b9ba3..ea553eee9 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends AppenzellInnerrhodenBaseTestCase implements Yasumi * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php index b25e3c361..533491349 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends AppenzellInnerrhodenBaseTestCase implements Yasu * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php index 88f245081..c58869126 100644 --- a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php +++ b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php @@ -99,7 +99,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php index 8fca557d6..67eef40de 100644 --- a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php +++ b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends BaselLandschaftBaseTestCase implements YasumiTest * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php index 675ce200e..ef42d8b89 100644 --- a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php +++ b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends BaselLandschaftBaseTestCase implements YasumiTestC * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php index 280a1271f..a1ca7cd10 100644 --- a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php +++ b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends BaselLandschaftBaseTestCase implements YasumiTes * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php index 14b758716..b671d4706 100644 --- a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php +++ b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php @@ -32,7 +32,7 @@ class WorkersDayTest extends BaselLandschaftBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -55,8 +55,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(); + $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Switzerland/BaselStadt/BaselStadtTest.php b/tests/Switzerland/BaselStadt/BaselStadtTest.php index b0c82a2f4..51157162d 100644 --- a/tests/Switzerland/BaselStadt/BaselStadtTest.php +++ b/tests/Switzerland/BaselStadt/BaselStadtTest.php @@ -99,7 +99,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/BaselStadt/ChristmasDayTest.php b/tests/Switzerland/BaselStadt/ChristmasDayTest.php index e0c89c661..67476f736 100644 --- a/tests/Switzerland/BaselStadt/ChristmasDayTest.php +++ b/tests/Switzerland/BaselStadt/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends BaselStadtBaseTestCase implements YasumiTestCaseI * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/BaselStadt/NewYearsDayTest.php b/tests/Switzerland/BaselStadt/NewYearsDayTest.php index 772db2b7b..c7c4e1fb1 100644 --- a/tests/Switzerland/BaselStadt/NewYearsDayTest.php +++ b/tests/Switzerland/BaselStadt/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends BaselStadtBaseTestCase implements YasumiTestCaseIn * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/BaselStadt/StStephensDayTest.php b/tests/Switzerland/BaselStadt/StStephensDayTest.php index 2fdfcd171..c8eff1e1a 100644 --- a/tests/Switzerland/BaselStadt/StStephensDayTest.php +++ b/tests/Switzerland/BaselStadt/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends BaselStadtBaseTestCase implements YasumiTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/BaselStadt/WorkersDayTest.php b/tests/Switzerland/BaselStadt/WorkersDayTest.php index be327dde3..f723c4b4e 100644 --- a/tests/Switzerland/BaselStadt/WorkersDayTest.php +++ b/tests/Switzerland/BaselStadt/WorkersDayTest.php @@ -32,7 +32,7 @@ class WorkersDayTest extends BaselStadtBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -55,8 +55,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(); + $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Switzerland/Bern/BernTest.php b/tests/Switzerland/Bern/BernTest.php index 4d2efd5a6..e43aade14 100644 --- a/tests/Switzerland/Bern/BernTest.php +++ b/tests/Switzerland/Bern/BernTest.php @@ -99,7 +99,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Bern/ChristmasDayTest.php b/tests/Switzerland/Bern/ChristmasDayTest.php index d95cbea52..6b6c8a7ef 100644 --- a/tests/Switzerland/Bern/ChristmasDayTest.php +++ b/tests/Switzerland/Bern/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends BernBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Bern/NewYearsDayTest.php b/tests/Switzerland/Bern/NewYearsDayTest.php index 03b8cddc5..968bd3078 100644 --- a/tests/Switzerland/Bern/NewYearsDayTest.php +++ b/tests/Switzerland/Bern/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends BernBaseTestCase implements YasumiTestCaseInterfac * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Bern/StStephensDayTest.php b/tests/Switzerland/Bern/StStephensDayTest.php index 9fc26b02d..d0ce536a4 100644 --- a/tests/Switzerland/Bern/StStephensDayTest.php +++ b/tests/Switzerland/Bern/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends BernBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Fribourg/ChristmasDayTest.php b/tests/Switzerland/Fribourg/ChristmasDayTest.php index be07daa19..3e218f977 100644 --- a/tests/Switzerland/Fribourg/ChristmasDayTest.php +++ b/tests/Switzerland/Fribourg/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends FribourgBaseTestCase implements YasumiTestCaseInt * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Fribourg/FribourgTest.php b/tests/Switzerland/Fribourg/FribourgTest.php index da67975a6..d104885a2 100644 --- a/tests/Switzerland/Fribourg/FribourgTest.php +++ b/tests/Switzerland/Fribourg/FribourgTest.php @@ -97,7 +97,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Fribourg/NewYearsDayTest.php b/tests/Switzerland/Fribourg/NewYearsDayTest.php index a6b28e393..69bb74d3e 100644 --- a/tests/Switzerland/Fribourg/NewYearsDayTest.php +++ b/tests/Switzerland/Fribourg/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends FribourgBaseTestCase implements YasumiTestCaseInte * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Geneva/ChristmasDayTest.php b/tests/Switzerland/Geneva/ChristmasDayTest.php index 60fc758b2..6d347067a 100644 --- a/tests/Switzerland/Geneva/ChristmasDayTest.php +++ b/tests/Switzerland/Geneva/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends GenevaBaseTestCase implements YasumiTestCaseInter * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Geneva/GenevaTest.php b/tests/Switzerland/Geneva/GenevaTest.php index 693db8309..8576e74f8 100644 --- a/tests/Switzerland/Geneva/GenevaTest.php +++ b/tests/Switzerland/Geneva/GenevaTest.php @@ -112,7 +112,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Geneva/NewYearsDayTest.php b/tests/Switzerland/Geneva/NewYearsDayTest.php index 5314017e0..dcd6763c4 100644 --- a/tests/Switzerland/Geneva/NewYearsDayTest.php +++ b/tests/Switzerland/Geneva/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends GenevaBaseTestCase implements YasumiTestCaseInterf * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Glarus/AllSaintsDayTest.php b/tests/Switzerland/Glarus/AllSaintsDayTest.php index 337400a3d..8cf5c0f1a 100644 --- a/tests/Switzerland/Glarus/AllSaintsDayTest.php +++ b/tests/Switzerland/Glarus/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends GlarusBaseTestCase implements YasumiTestCaseInter * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested + * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Glarus/ChristmasDayTest.php b/tests/Switzerland/Glarus/ChristmasDayTest.php index d3e0df6bd..ae3b395c4 100644 --- a/tests/Switzerland/Glarus/ChristmasDayTest.php +++ b/tests/Switzerland/Glarus/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends GlarusBaseTestCase implements YasumiTestCaseInter * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Glarus/GlarusTest.php b/tests/Switzerland/Glarus/GlarusTest.php index fba0312a6..ade009b5a 100644 --- a/tests/Switzerland/Glarus/GlarusTest.php +++ b/tests/Switzerland/Glarus/GlarusTest.php @@ -101,7 +101,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Glarus/NewYearsDayTest.php b/tests/Switzerland/Glarus/NewYearsDayTest.php index 915c4f1d1..bfea1dd0c 100644 --- a/tests/Switzerland/Glarus/NewYearsDayTest.php +++ b/tests/Switzerland/Glarus/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends GlarusBaseTestCase implements YasumiTestCaseInterf * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Glarus/StStephensDayTest.php b/tests/Switzerland/Glarus/StStephensDayTest.php index 46d666862..2ec0027f2 100644 --- a/tests/Switzerland/Glarus/StStephensDayTest.php +++ b/tests/Switzerland/Glarus/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends GlarusBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Grisons/ChristmasDayTest.php b/tests/Switzerland/Grisons/ChristmasDayTest.php index 753da15ca..b18f547dd 100644 --- a/tests/Switzerland/Grisons/ChristmasDayTest.php +++ b/tests/Switzerland/Grisons/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends GrisonsBaseTestCase implements YasumiTestCaseInte * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Grisons/GrisonsTest.php b/tests/Switzerland/Grisons/GrisonsTest.php index 4ac400833..9b0cd7ad4 100644 --- a/tests/Switzerland/Grisons/GrisonsTest.php +++ b/tests/Switzerland/Grisons/GrisonsTest.php @@ -98,7 +98,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Grisons/NewYearsDayTest.php b/tests/Switzerland/Grisons/NewYearsDayTest.php index bc4079d29..49dd96157 100644 --- a/tests/Switzerland/Grisons/NewYearsDayTest.php +++ b/tests/Switzerland/Grisons/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends GrisonsBaseTestCase implements YasumiTestCaseInter * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Grisons/StStephensDayTest.php b/tests/Switzerland/Grisons/StStephensDayTest.php index a6f8ec8c0..922528591 100644 --- a/tests/Switzerland/Grisons/StStephensDayTest.php +++ b/tests/Switzerland/Grisons/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends GrisonsBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Jura/AllSaintsDayTest.php b/tests/Switzerland/Jura/AllSaintsDayTest.php index 541ffc4ee..6748b39ac 100644 --- a/tests/Switzerland/Jura/AllSaintsDayTest.php +++ b/tests/Switzerland/Jura/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends JuraBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested + * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Jura/AssumptionOfMaryTest.php b/tests/Switzerland/Jura/AssumptionOfMaryTest.php index ee32521bd..9575776e4 100644 --- a/tests/Switzerland/Jura/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Jura/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends JuraBaseTestCase implements YasumiTestCaseInt * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Jura/ChristmasDayTest.php b/tests/Switzerland/Jura/ChristmasDayTest.php index aff31ae7c..be317e71e 100644 --- a/tests/Switzerland/Jura/ChristmasDayTest.php +++ b/tests/Switzerland/Jura/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends JuraBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Jura/JuraTest.php b/tests/Switzerland/Jura/JuraTest.php index ee7ca33b1..21ce77f7b 100644 --- a/tests/Switzerland/Jura/JuraTest.php +++ b/tests/Switzerland/Jura/JuraTest.php @@ -103,7 +103,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1975); } diff --git a/tests/Switzerland/Jura/NewYearsDayTest.php b/tests/Switzerland/Jura/NewYearsDayTest.php index 017e2a4b2..659161275 100644 --- a/tests/Switzerland/Jura/NewYearsDayTest.php +++ b/tests/Switzerland/Jura/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends JuraBaseTestCase implements YasumiTestCaseInterfac * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Jura/WorkersDayTest.php b/tests/Switzerland/Jura/WorkersDayTest.php index 7a6ed5708..3b498657e 100644 --- a/tests/Switzerland/Jura/WorkersDayTest.php +++ b/tests/Switzerland/Jura/WorkersDayTest.php @@ -32,7 +32,7 @@ class WorkersDayTest extends JuraBaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -55,8 +55,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(); + $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Switzerland/Lucerne/AllSaintsDayTest.php b/tests/Switzerland/Lucerne/AllSaintsDayTest.php index 4e1d37d98..a2cbdfd74 100644 --- a/tests/Switzerland/Lucerne/AllSaintsDayTest.php +++ b/tests/Switzerland/Lucerne/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends LucerneBaseTestCase implements YasumiTestCaseInte * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested + * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php index bc2adedd1..504a21139 100644 --- a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends LucerneBaseTestCase implements YasumiTestCase * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Lucerne/ChristmasDayTest.php b/tests/Switzerland/Lucerne/ChristmasDayTest.php index 83681619b..b21b71350 100644 --- a/tests/Switzerland/Lucerne/ChristmasDayTest.php +++ b/tests/Switzerland/Lucerne/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends LucerneBaseTestCase implements YasumiTestCaseInte * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php index 0eab721c1..882f05615 100644 --- a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php @@ -31,7 +31,7 @@ class ImmaculateConceptionTest extends LucerneBaseTestCase implements YasumiTest * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Lucerne/LucerneTest.php b/tests/Switzerland/Lucerne/LucerneTest.php index 947429551..01a875e61 100644 --- a/tests/Switzerland/Lucerne/LucerneTest.php +++ b/tests/Switzerland/Lucerne/LucerneTest.php @@ -103,7 +103,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Lucerne/NewYearsDayTest.php b/tests/Switzerland/Lucerne/NewYearsDayTest.php index eee351c8f..183b000f0 100644 --- a/tests/Switzerland/Lucerne/NewYearsDayTest.php +++ b/tests/Switzerland/Lucerne/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends LucerneBaseTestCase implements YasumiTestCaseInter * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Lucerne/StStephensDayTest.php b/tests/Switzerland/Lucerne/StStephensDayTest.php index 3d6dfff95..11cf5000e 100644 --- a/tests/Switzerland/Lucerne/StStephensDayTest.php +++ b/tests/Switzerland/Lucerne/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends LucerneBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Neuchatel/ChristmasDayTest.php b/tests/Switzerland/Neuchatel/ChristmasDayTest.php index 0b679cc59..eae9f527d 100644 --- a/tests/Switzerland/Neuchatel/ChristmasDayTest.php +++ b/tests/Switzerland/Neuchatel/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends NeuchatelBaseTestCase implements YasumiTestCaseIn * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Neuchatel/NeuchatelTest.php b/tests/Switzerland/Neuchatel/NeuchatelTest.php index 46c5f75f5..116322e89 100644 --- a/tests/Switzerland/Neuchatel/NeuchatelTest.php +++ b/tests/Switzerland/Neuchatel/NeuchatelTest.php @@ -101,7 +101,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Neuchatel/NewYearsDayTest.php b/tests/Switzerland/Neuchatel/NewYearsDayTest.php index efd18d79b..c8af9d383 100644 --- a/tests/Switzerland/Neuchatel/NewYearsDayTest.php +++ b/tests/Switzerland/Neuchatel/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends NeuchatelBaseTestCase implements YasumiTestCaseInt * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Neuchatel/WorkersDayTest.php b/tests/Switzerland/Neuchatel/WorkersDayTest.php index d1106f94f..c393d56ce 100644 --- a/tests/Switzerland/Neuchatel/WorkersDayTest.php +++ b/tests/Switzerland/Neuchatel/WorkersDayTest.php @@ -32,7 +32,7 @@ class WorkersDayTest extends NeuchatelBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -55,8 +55,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(); + $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php index fb2fb6643..0dba265bd 100644 --- a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseIn * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested + * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php index 0b4138cb5..be7b8a42b 100644 --- a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends NidwaldenBaseTestCase implements YasumiTestCa * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Nidwalden/ChristmasDayTest.php b/tests/Switzerland/Nidwalden/ChristmasDayTest.php index 025a37302..9c8128b78 100644 --- a/tests/Switzerland/Nidwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Nidwalden/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseIn * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php index c8af8ea48..e987e7ce6 100644 --- a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php @@ -31,7 +31,7 @@ class ImmaculateConceptionTest extends NidwaldenBaseTestCase implements YasumiTe * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Nidwalden/NewYearsDayTest.php b/tests/Switzerland/Nidwalden/NewYearsDayTest.php index 1680220a9..4973739f4 100644 --- a/tests/Switzerland/Nidwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Nidwalden/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInt * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Nidwalden/NidwaldenTest.php b/tests/Switzerland/Nidwalden/NidwaldenTest.php index 5805ccbbf..d89afd12d 100644 --- a/tests/Switzerland/Nidwalden/NidwaldenTest.php +++ b/tests/Switzerland/Nidwalden/NidwaldenTest.php @@ -103,7 +103,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Nidwalden/StJosephDayTest.php b/tests/Switzerland/Nidwalden/StJosephDayTest.php index 7f7827a82..192a6018a 100644 --- a/tests/Switzerland/Nidwalden/StJosephDayTest.php +++ b/tests/Switzerland/Nidwalden/StJosephDayTest.php @@ -33,7 +33,7 @@ class StJosephDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInt * * @dataProvider StJosephDayDataProvider * - * @param int $year the year for which St. Joseph's Day needs to be tested + * @param int $year the year for which St. Joseph's Day needs to be tested * @param \DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Nidwalden/StStephensDayTest.php b/tests/Switzerland/Nidwalden/StStephensDayTest.php index 3442684aa..3a7df9a24 100644 --- a/tests/Switzerland/Nidwalden/StStephensDayTest.php +++ b/tests/Switzerland/Nidwalden/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseI * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Obwalden/AllSaintsDayTest.php b/tests/Switzerland/Obwalden/AllSaintsDayTest.php index 439286f8b..0ad35f822 100644 --- a/tests/Switzerland/Obwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Obwalden/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInt * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested + * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php index 3e64b2056..f1f4a6260 100644 --- a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends ObwaldenBaseTestCase implements YasumiTestCas * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Obwalden/ChristmasDayTest.php b/tests/Switzerland/Obwalden/ChristmasDayTest.php index b73fab73b..eb2183586 100644 --- a/tests/Switzerland/Obwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Obwalden/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInt * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php index d5176261a..43e99fa2e 100644 --- a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php @@ -31,7 +31,7 @@ class ImmaculateConceptionTest extends ObwaldenBaseTestCase implements YasumiTes * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Obwalden/NewYearsDayTest.php b/tests/Switzerland/Obwalden/NewYearsDayTest.php index 49688e464..cceebab50 100644 --- a/tests/Switzerland/Obwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Obwalden/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInte * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Obwalden/ObwaldenTest.php b/tests/Switzerland/Obwalden/ObwaldenTest.php index d33445a5b..70ac0bac8 100644 --- a/tests/Switzerland/Obwalden/ObwaldenTest.php +++ b/tests/Switzerland/Obwalden/ObwaldenTest.php @@ -104,7 +104,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Obwalden/StStephensDayTest.php b/tests/Switzerland/Obwalden/StStephensDayTest.php index 5d406dd8e..12bcf300d 100644 --- a/tests/Switzerland/Obwalden/StStephensDayTest.php +++ b/tests/Switzerland/Obwalden/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseIn * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php index fe3f72334..2a3da075e 100644 --- a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php +++ b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends SchaffhausenBaseTestCase implements YasumiTestCas * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php index 53e0e0175..01ce89980 100644 --- a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php +++ b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends SchaffhausenBaseTestCase implements YasumiTestCase * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php index 42a8f7f81..2617669e7 100644 --- a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php +++ b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php @@ -100,7 +100,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Schaffhausen/StStephensDayTest.php b/tests/Switzerland/Schaffhausen/StStephensDayTest.php index 92154dd17..65f16dd57 100644 --- a/tests/Switzerland/Schaffhausen/StStephensDayTest.php +++ b/tests/Switzerland/Schaffhausen/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends SchaffhausenBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Schaffhausen/WorkersDayTest.php b/tests/Switzerland/Schaffhausen/WorkersDayTest.php index 7077f3246..ace4f852a 100644 --- a/tests/Switzerland/Schaffhausen/WorkersDayTest.php +++ b/tests/Switzerland/Schaffhausen/WorkersDayTest.php @@ -32,7 +32,7 @@ class WorkersDayTest extends SchaffhausenBaseTestCase implements YasumiTestCaseI * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -55,8 +55,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(); + $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Switzerland/Schwyz/AllSaintsDayTest.php b/tests/Switzerland/Schwyz/AllSaintsDayTest.php index 7a138abf2..37a6d1931 100644 --- a/tests/Switzerland/Schwyz/AllSaintsDayTest.php +++ b/tests/Switzerland/Schwyz/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInter * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested + * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php index 71e59624a..cd0d11848 100644 --- a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends SchwyzBaseTestCase implements YasumiTestCaseI * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Schwyz/ChristmasDayTest.php b/tests/Switzerland/Schwyz/ChristmasDayTest.php index ea2376d53..dcfd0efd4 100644 --- a/tests/Switzerland/Schwyz/ChristmasDayTest.php +++ b/tests/Switzerland/Schwyz/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInter * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Schwyz/EpiphanyTest.php b/tests/Switzerland/Schwyz/EpiphanyTest.php index 2914041a9..4cf85a8dd 100644 --- a/tests/Switzerland/Schwyz/EpiphanyTest.php +++ b/tests/Switzerland/Schwyz/EpiphanyTest.php @@ -32,7 +32,7 @@ class EpiphanyTest extends SchwyzBaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php index cd9e40bfb..b0b9ddf1e 100644 --- a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php @@ -31,7 +31,7 @@ class ImmaculateConceptionTest extends SchwyzBaseTestCase implements YasumiTestC * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Schwyz/NewYearsDayTest.php b/tests/Switzerland/Schwyz/NewYearsDayTest.php index aeb1675c1..eca9293b5 100644 --- a/tests/Switzerland/Schwyz/NewYearsDayTest.php +++ b/tests/Switzerland/Schwyz/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterf * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Schwyz/SchwyzTest.php b/tests/Switzerland/Schwyz/SchwyzTest.php index 5e533ea18..e561e2545 100644 --- a/tests/Switzerland/Schwyz/SchwyzTest.php +++ b/tests/Switzerland/Schwyz/SchwyzTest.php @@ -104,7 +104,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Schwyz/StJosephDayTest.php b/tests/Switzerland/Schwyz/StJosephDayTest.php index fa70f9eec..57d35de3f 100644 --- a/tests/Switzerland/Schwyz/StJosephDayTest.php +++ b/tests/Switzerland/Schwyz/StJosephDayTest.php @@ -33,7 +33,7 @@ class StJosephDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterf * * @dataProvider StJosephDayDataProvider * - * @param int $year the year for which St. Joseph's Day needs to be tested + * @param int $year the year for which St. Joseph's Day needs to be tested * @param \DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Schwyz/StStephensDayTest.php b/tests/Switzerland/Schwyz/StStephensDayTest.php index 00d31bf8b..f312c7943 100644 --- a/tests/Switzerland/Schwyz/StStephensDayTest.php +++ b/tests/Switzerland/Schwyz/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Solothurn/ChristmasDayTest.php b/tests/Switzerland/Solothurn/ChristmasDayTest.php index 6d74b17c7..82a5662af 100644 --- a/tests/Switzerland/Solothurn/ChristmasDayTest.php +++ b/tests/Switzerland/Solothurn/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends SolothurnBaseTestCase implements YasumiTestCaseIn * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Solothurn/NewYearsDayTest.php b/tests/Switzerland/Solothurn/NewYearsDayTest.php index 475ba6535..69e4f45ef 100644 --- a/tests/Switzerland/Solothurn/NewYearsDayTest.php +++ b/tests/Switzerland/Solothurn/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends SolothurnBaseTestCase implements YasumiTestCaseInt * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Solothurn/SolothurnTest.php b/tests/Switzerland/Solothurn/SolothurnTest.php index 0cd0d5bdc..58229e95c 100644 --- a/tests/Switzerland/Solothurn/SolothurnTest.php +++ b/tests/Switzerland/Solothurn/SolothurnTest.php @@ -97,7 +97,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/StGallen/AllSaintsDayTest.php b/tests/Switzerland/StGallen/AllSaintsDayTest.php index c304112f4..dd66b9ffb 100644 --- a/tests/Switzerland/StGallen/AllSaintsDayTest.php +++ b/tests/Switzerland/StGallen/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends StGallenBaseTestCase implements YasumiTestCaseInt * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested + * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/StGallen/ChristmasDayTest.php b/tests/Switzerland/StGallen/ChristmasDayTest.php index dcca16403..8e895f031 100644 --- a/tests/Switzerland/StGallen/ChristmasDayTest.php +++ b/tests/Switzerland/StGallen/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends StGallenBaseTestCase implements YasumiTestCaseInt * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/StGallen/NewYearsDayTest.php b/tests/Switzerland/StGallen/NewYearsDayTest.php index fee4f1e5d..e21ca07ea 100644 --- a/tests/Switzerland/StGallen/NewYearsDayTest.php +++ b/tests/Switzerland/StGallen/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends StGallenBaseTestCase implements YasumiTestCaseInte * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/StGallen/StGallenTest.php b/tests/Switzerland/StGallen/StGallenTest.php index bd15f6b47..5857b0f8a 100644 --- a/tests/Switzerland/StGallen/StGallenTest.php +++ b/tests/Switzerland/StGallen/StGallenTest.php @@ -99,7 +99,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/StGallen/StStephensDayTest.php b/tests/Switzerland/StGallen/StStephensDayTest.php index 8471ab718..00c23a711 100644 --- a/tests/Switzerland/StGallen/StStephensDayTest.php +++ b/tests/Switzerland/StGallen/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends StGallenBaseTestCase implements YasumiTestCaseIn * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/SwitzerlandTest.php b/tests/Switzerland/SwitzerlandTest.php index f0528bd8a..a1a180172 100644 --- a/tests/Switzerland/SwitzerlandTest.php +++ b/tests/Switzerland/SwitzerlandTest.php @@ -81,7 +81,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Thurgau/ChristmasDayTest.php b/tests/Switzerland/Thurgau/ChristmasDayTest.php index b795c814b..639b9a21e 100644 --- a/tests/Switzerland/Thurgau/ChristmasDayTest.php +++ b/tests/Switzerland/Thurgau/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInte * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Thurgau/NewYearsDayTest.php b/tests/Switzerland/Thurgau/NewYearsDayTest.php index aff521353..35dabd6b4 100644 --- a/tests/Switzerland/Thurgau/NewYearsDayTest.php +++ b/tests/Switzerland/Thurgau/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInter * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Thurgau/StStephensDayTest.php b/tests/Switzerland/Thurgau/StStephensDayTest.php index d67c193f5..036d74525 100644 --- a/tests/Switzerland/Thurgau/StStephensDayTest.php +++ b/tests/Switzerland/Thurgau/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInt * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Thurgau/ThurgauTest.php b/tests/Switzerland/Thurgau/ThurgauTest.php index 3547ae651..8e092ca96 100644 --- a/tests/Switzerland/Thurgau/ThurgauTest.php +++ b/tests/Switzerland/Thurgau/ThurgauTest.php @@ -100,7 +100,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Thurgau/WorkersDayTest.php b/tests/Switzerland/Thurgau/WorkersDayTest.php index fb9203023..74344547e 100644 --- a/tests/Switzerland/Thurgau/WorkersDayTest.php +++ b/tests/Switzerland/Thurgau/WorkersDayTest.php @@ -32,7 +32,7 @@ class WorkersDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInterf * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -55,8 +55,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(); + $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Switzerland/Ticino/AllSaintsDayTest.php b/tests/Switzerland/Ticino/AllSaintsDayTest.php index 4fcb01d7d..6ed2f48f9 100644 --- a/tests/Switzerland/Ticino/AllSaintsDayTest.php +++ b/tests/Switzerland/Ticino/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends TicinoBaseTestCase implements YasumiTestCaseInter * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested + * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php index 48d45d636..93dadacd1 100644 --- a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends TicinoBaseTestCase implements YasumiTestCaseI * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Ticino/ChristmasDayTest.php b/tests/Switzerland/Ticino/ChristmasDayTest.php index 23b1c82c1..f717c2b66 100644 --- a/tests/Switzerland/Ticino/ChristmasDayTest.php +++ b/tests/Switzerland/Ticino/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends TicinoBaseTestCase implements YasumiTestCaseInter * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Ticino/EpiphanyTest.php b/tests/Switzerland/Ticino/EpiphanyTest.php index 7e5493c69..8e05ca73b 100644 --- a/tests/Switzerland/Ticino/EpiphanyTest.php +++ b/tests/Switzerland/Ticino/EpiphanyTest.php @@ -32,7 +32,7 @@ class EpiphanyTest extends TicinoBaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php index 0147e3fac..ba686645c 100644 --- a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php @@ -31,7 +31,7 @@ class ImmaculateConceptionTest extends TicinoBaseTestCase implements YasumiTestC * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Ticino/NewYearsDayTest.php b/tests/Switzerland/Ticino/NewYearsDayTest.php index 0af7ab9bb..3e9d8afb8 100644 --- a/tests/Switzerland/Ticino/NewYearsDayTest.php +++ b/tests/Switzerland/Ticino/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends TicinoBaseTestCase implements YasumiTestCaseInterf * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Ticino/StJosephDayTest.php b/tests/Switzerland/Ticino/StJosephDayTest.php index df9c545a5..3e112d5f4 100644 --- a/tests/Switzerland/Ticino/StJosephDayTest.php +++ b/tests/Switzerland/Ticino/StJosephDayTest.php @@ -33,7 +33,7 @@ class StJosephDayTest extends TicinoBaseTestCase implements YasumiTestCaseInterf * * @dataProvider StJosephDayDataProvider * - * @param int $year the year for which St. Joseph's Day needs to be tested + * @param int $year the year for which St. Joseph's Day needs to be tested * @param \DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Ticino/StPeterPaulTest.php b/tests/Switzerland/Ticino/StPeterPaulTest.php index 0e2c04469..18de20e92 100644 --- a/tests/Switzerland/Ticino/StPeterPaulTest.php +++ b/tests/Switzerland/Ticino/StPeterPaulTest.php @@ -31,7 +31,7 @@ class StPeterPaulTest extends TicinoBaseTestCase implements YasumiTestCaseInterf * * @dataProvider StPeterPaulDataProvider * - * @param int $year the year for which Feast of Saints Peter and Paul needs to be tested + * @param int $year the year for which Feast of Saints Peter and Paul needs to be tested * @param \DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Ticino/StStephensDayTest.php b/tests/Switzerland/Ticino/StStephensDayTest.php index 763766d60..bdf073dbc 100644 --- a/tests/Switzerland/Ticino/StStephensDayTest.php +++ b/tests/Switzerland/Ticino/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends TicinoBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Ticino/TicinoTest.php b/tests/Switzerland/Ticino/TicinoTest.php index a38db9a5f..337bace26 100644 --- a/tests/Switzerland/Ticino/TicinoTest.php +++ b/tests/Switzerland/Ticino/TicinoTest.php @@ -105,7 +105,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Ticino/WorkersDayTest.php b/tests/Switzerland/Ticino/WorkersDayTest.php index ad7b04c10..b12d47322 100644 --- a/tests/Switzerland/Ticino/WorkersDayTest.php +++ b/tests/Switzerland/Ticino/WorkersDayTest.php @@ -32,7 +32,7 @@ class WorkersDayTest extends TicinoBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -55,8 +55,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(); + $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Switzerland/Uri/AllSaintsDayTest.php b/tests/Switzerland/Uri/AllSaintsDayTest.php index 1220e627a..eaf34c447 100644 --- a/tests/Switzerland/Uri/AllSaintsDayTest.php +++ b/tests/Switzerland/Uri/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends UriBaseTestCase implements YasumiTestCaseInterfac * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested + * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Uri/AssumptionOfMaryTest.php b/tests/Switzerland/Uri/AssumptionOfMaryTest.php index 3e72fa663..8e548de37 100644 --- a/tests/Switzerland/Uri/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Uri/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends UriBaseTestCase implements YasumiTestCaseInte * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Uri/ChristmasDayTest.php b/tests/Switzerland/Uri/ChristmasDayTest.php index 43d3da16c..06025e5ad 100644 --- a/tests/Switzerland/Uri/ChristmasDayTest.php +++ b/tests/Switzerland/Uri/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends UriBaseTestCase implements YasumiTestCaseInterfac * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Uri/EpiphanyTest.php b/tests/Switzerland/Uri/EpiphanyTest.php index 3f6e1c4cb..1cd11e41b 100644 --- a/tests/Switzerland/Uri/EpiphanyTest.php +++ b/tests/Switzerland/Uri/EpiphanyTest.php @@ -32,7 +32,7 @@ class EpiphanyTest extends UriBaseTestCase implements YasumiTestCaseInterface * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Uri/ImmaculateConceptionTest.php b/tests/Switzerland/Uri/ImmaculateConceptionTest.php index 1245fe344..d7354d808 100644 --- a/tests/Switzerland/Uri/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Uri/ImmaculateConceptionTest.php @@ -31,7 +31,7 @@ class ImmaculateConceptionTest extends UriBaseTestCase implements YasumiTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Uri/NewYearsDayTest.php b/tests/Switzerland/Uri/NewYearsDayTest.php index 96b3a51b6..1b4f16b1e 100644 --- a/tests/Switzerland/Uri/NewYearsDayTest.php +++ b/tests/Switzerland/Uri/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends UriBaseTestCase implements YasumiTestCaseInterface * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Uri/StJosephDayTest.php b/tests/Switzerland/Uri/StJosephDayTest.php index 51b907e06..815fbea58 100644 --- a/tests/Switzerland/Uri/StJosephDayTest.php +++ b/tests/Switzerland/Uri/StJosephDayTest.php @@ -33,7 +33,7 @@ class StJosephDayTest extends UriBaseTestCase implements YasumiTestCaseInterface * * @dataProvider StJosephDayDataProvider * - * @param int $year the year for which St. Joseph's Day needs to be tested + * @param int $year the year for which St. Joseph's Day needs to be tested * @param \DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Uri/StStephensDayTest.php b/tests/Switzerland/Uri/StStephensDayTest.php index ca9559829..14ff58b25 100644 --- a/tests/Switzerland/Uri/StStephensDayTest.php +++ b/tests/Switzerland/Uri/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends UriBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Uri/UriTest.php b/tests/Switzerland/Uri/UriTest.php index 0ac7d594c..330988644 100644 --- a/tests/Switzerland/Uri/UriTest.php +++ b/tests/Switzerland/Uri/UriTest.php @@ -104,7 +104,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Valais/AllSaintsDayTest.php b/tests/Switzerland/Valais/AllSaintsDayTest.php index c6e869f56..7baac5504 100644 --- a/tests/Switzerland/Valais/AllSaintsDayTest.php +++ b/tests/Switzerland/Valais/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends ValaisBaseTestCase implements YasumiTestCaseInter * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested + * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Valais/AssumptionOfMaryTest.php b/tests/Switzerland/Valais/AssumptionOfMaryTest.php index 54bca2957..9fb73937d 100644 --- a/tests/Switzerland/Valais/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Valais/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends ValaisBaseTestCase implements YasumiTestCaseI * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Valais/ChristmasDayTest.php b/tests/Switzerland/Valais/ChristmasDayTest.php index 72d0a8891..a126da580 100644 --- a/tests/Switzerland/Valais/ChristmasDayTest.php +++ b/tests/Switzerland/Valais/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends ValaisBaseTestCase implements YasumiTestCaseInter * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Valais/ImmaculateConceptionTest.php b/tests/Switzerland/Valais/ImmaculateConceptionTest.php index 924835a1f..7c8434c0a 100644 --- a/tests/Switzerland/Valais/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Valais/ImmaculateConceptionTest.php @@ -31,7 +31,7 @@ class ImmaculateConceptionTest extends ValaisBaseTestCase implements YasumiTestC * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Valais/NewYearsDayTest.php b/tests/Switzerland/Valais/NewYearsDayTest.php index d104b7548..67b30a505 100644 --- a/tests/Switzerland/Valais/NewYearsDayTest.php +++ b/tests/Switzerland/Valais/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends ValaisBaseTestCase implements YasumiTestCaseInterf * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Valais/StJosephDayTest.php b/tests/Switzerland/Valais/StJosephDayTest.php index 33054209f..e1b1293d0 100644 --- a/tests/Switzerland/Valais/StJosephDayTest.php +++ b/tests/Switzerland/Valais/StJosephDayTest.php @@ -33,7 +33,7 @@ class StJosephDayTest extends ValaisBaseTestCase implements YasumiTestCaseInterf * * @dataProvider StJosephDayDataProvider * - * @param int $year the year for which St. Joseph's Day needs to be tested + * @param int $year the year for which St. Joseph's Day needs to be tested * @param \DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Valais/ValaisTest.php b/tests/Switzerland/Valais/ValaisTest.php index f00e96384..6f384617e 100644 --- a/tests/Switzerland/Valais/ValaisTest.php +++ b/tests/Switzerland/Valais/ValaisTest.php @@ -99,7 +99,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Vaud/ChristmasDayTest.php b/tests/Switzerland/Vaud/ChristmasDayTest.php index 10d93f9d5..598c8e399 100644 --- a/tests/Switzerland/Vaud/ChristmasDayTest.php +++ b/tests/Switzerland/Vaud/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends VaudBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Vaud/NewYearsDayTest.php b/tests/Switzerland/Vaud/NewYearsDayTest.php index 09c87662a..801e15859 100644 --- a/tests/Switzerland/Vaud/NewYearsDayTest.php +++ b/tests/Switzerland/Vaud/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends VaudBaseTestCase implements YasumiTestCaseInterfac * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Vaud/VaudTest.php b/tests/Switzerland/Vaud/VaudTest.php index 107814d94..e274caa07 100644 --- a/tests/Switzerland/Vaud/VaudTest.php +++ b/tests/Switzerland/Vaud/VaudTest.php @@ -99,7 +99,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Zug/AllSaintsDayTest.php b/tests/Switzerland/Zug/AllSaintsDayTest.php index 7a0e23ccc..e6145d636 100644 --- a/tests/Switzerland/Zug/AllSaintsDayTest.php +++ b/tests/Switzerland/Zug/AllSaintsDayTest.php @@ -31,7 +31,7 @@ class AllSaintsDayTest extends ZugBaseTestCase implements YasumiTestCaseInterfac * * @dataProvider AllSaintsDayDataProvider * - * @param int $year the year for which All Saints' Day needs to be tested + * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Zug/AssumptionOfMaryTest.php b/tests/Switzerland/Zug/AssumptionOfMaryTest.php index 695e01bd7..757a2c862 100644 --- a/tests/Switzerland/Zug/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Zug/AssumptionOfMaryTest.php @@ -31,7 +31,7 @@ class AssumptionOfMaryTest extends ZugBaseTestCase implements YasumiTestCaseInte * * @dataProvider AssumptionOfMaryDataProvider * - * @param int $year the year for which the day of the Assumption of Mary needs to be tested + * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Zug/ChristmasDayTest.php b/tests/Switzerland/Zug/ChristmasDayTest.php index 879ba97c2..556269d28 100644 --- a/tests/Switzerland/Zug/ChristmasDayTest.php +++ b/tests/Switzerland/Zug/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends ZugBaseTestCase implements YasumiTestCaseInterfac * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Zug/ImmaculateConceptionTest.php b/tests/Switzerland/Zug/ImmaculateConceptionTest.php index 2e861114d..d9e1a7a00 100644 --- a/tests/Switzerland/Zug/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Zug/ImmaculateConceptionTest.php @@ -31,7 +31,7 @@ class ImmaculateConceptionTest extends ZugBaseTestCase implements YasumiTestCase * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Zug/NewYearsDayTest.php b/tests/Switzerland/Zug/NewYearsDayTest.php index e248d0a4c..81dc85a09 100644 --- a/tests/Switzerland/Zug/NewYearsDayTest.php +++ b/tests/Switzerland/Zug/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends ZugBaseTestCase implements YasumiTestCaseInterface * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Zug/StStephensDayTest.php b/tests/Switzerland/Zug/StStephensDayTest.php index c6a349bfd..904aecb43 100644 --- a/tests/Switzerland/Zug/StStephensDayTest.php +++ b/tests/Switzerland/Zug/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends ZugBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Zug/ZugTest.php b/tests/Switzerland/Zug/ZugTest.php index 71888781a..3456b0451 100644 --- a/tests/Switzerland/Zug/ZugTest.php +++ b/tests/Switzerland/Zug/ZugTest.php @@ -103,7 +103,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/Switzerland/Zurich/ChristmasDayTest.php b/tests/Switzerland/Zurich/ChristmasDayTest.php index 91d74048b..026e1ffe1 100644 --- a/tests/Switzerland/Zurich/ChristmasDayTest.php +++ b/tests/Switzerland/Zurich/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends ZurichBaseTestCase implements YasumiTestCaseInter * * @dataProvider ChristmasDayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Zurich/NewYearsDayTest.php b/tests/Switzerland/Zurich/NewYearsDayTest.php index 8fa6c83f1..cbbfc0441 100644 --- a/tests/Switzerland/Zurich/NewYearsDayTest.php +++ b/tests/Switzerland/Zurich/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends ZurichBaseTestCase implements YasumiTestCaseInterf * * @dataProvider NewYearsDayDataProvider * - * @param int $year the year for which New Years Day needs to be tested + * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Zurich/StStephensDayTest.php b/tests/Switzerland/Zurich/StStephensDayTest.php index a8806e6d4..6d71a17d1 100644 --- a/tests/Switzerland/Zurich/StStephensDayTest.php +++ b/tests/Switzerland/Zurich/StStephensDayTest.php @@ -31,7 +31,7 @@ class StStephensDayTest extends ZurichBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Switzerland/Zurich/WorkersDayTest.php b/tests/Switzerland/Zurich/WorkersDayTest.php index 716fbcc67..3dc8e1a9c 100644 --- a/tests/Switzerland/Zurich/WorkersDayTest.php +++ b/tests/Switzerland/Zurich/WorkersDayTest.php @@ -32,7 +32,7 @@ class WorkersDayTest extends ZurichBaseTestCase implements YasumiTestCaseInterfa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException @@ -55,8 +55,8 @@ public function HolidayDataProvider(): array $data = []; for ($y = 0; $y < 50; $y++) { - $year = $this->generateRandomYear(); - $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); + $year = $this->generateRandomYear(); + $date = new DateTime("$year-5-1", new DateTimeZone(self::TIMEZONE)); $data[] = [$year, $date->format('Y-m-d')]; } diff --git a/tests/Switzerland/Zurich/ZurichTest.php b/tests/Switzerland/Zurich/ZurichTest.php index 77e890eed..d0aa36997 100644 --- a/tests/Switzerland/Zurich/ZurichTest.php +++ b/tests/Switzerland/Zurich/ZurichTest.php @@ -100,7 +100,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1945); } diff --git a/tests/USA/NewYearsDayTest.php b/tests/USA/NewYearsDayTest.php index f89498420..e97d65e30 100644 --- a/tests/USA/NewYearsDayTest.php +++ b/tests/USA/NewYearsDayTest.php @@ -66,7 +66,7 @@ public function testNewYearsDaySubstitutedMonday() */ public function testNewYearsDaySubstitutedFriday() { - $year = 1938; + $year = 1938; $subYear = $year - 1; $this->assertHoliday( self::REGION, diff --git a/tests/USA/USATest.php b/tests/USA/USATest.php index 644451df2..561faa2ff 100644 --- a/tests/USA/USATest.php +++ b/tests/USA/USATest.php @@ -83,7 +83,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1986); } diff --git a/tests/USA/VeteransDayTest.php b/tests/USA/VeteransDayTest.php index fda3edb72..d593ca06d 100644 --- a/tests/USA/VeteransDayTest.php +++ b/tests/USA/VeteransDayTest.php @@ -103,7 +103,7 @@ public function testVeteransDayNameBefore1954() $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1953); $holidays = Yasumi::create(self::REGION, $year); - $holiday = $holidays->getHoliday(self::HOLIDAY); + $holiday = $holidays->getHoliday(self::HOLIDAY); $this->assertEquals('Armistice Day', $holiday->getName()); } @@ -116,7 +116,7 @@ public function testVeteransDayNameAfter1954() $year = $this->generateRandomYear(1954); $holidays = Yasumi::create(self::REGION, $year); - $holiday = $holidays->getHoliday(self::HOLIDAY); + $holiday = $holidays->getHoliday(self::HOLIDAY); $this->assertEquals('Veterans Day', $holiday->getName()); } diff --git a/tests/Ukraine/ChristmasDayTest.php b/tests/Ukraine/ChristmasDayTest.php index 89bec1935..063ca7f7d 100644 --- a/tests/Ukraine/ChristmasDayTest.php +++ b/tests/Ukraine/ChristmasDayTest.php @@ -31,7 +31,7 @@ class ChristmasDayTest extends UkraineBaseTestCase implements YasumiTestCaseInte * * @dataProvider HolidayDataProvider * - * @param int $year the year for which Christmas Day needs to be tested + * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Ukraine/InternationalWomensDayTest.php b/tests/Ukraine/InternationalWomensDayTest.php index 82a551dc0..28d10bee6 100644 --- a/tests/Ukraine/InternationalWomensDayTest.php +++ b/tests/Ukraine/InternationalWomensDayTest.php @@ -29,7 +29,7 @@ class InternationalWomensDayTest extends UkraineBaseTestCase implements YasumiTe /** * @dataProvider HolidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/Ukraine/InternationalWorkersDayTest.php b/tests/Ukraine/InternationalWorkersDayTest.php index 8aa671ecc..3e679d048 100644 --- a/tests/Ukraine/InternationalWorkersDayTest.php +++ b/tests/Ukraine/InternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class InternationalWorkersDayTest extends UkraineBaseTestCase implements YasumiT * * @dataProvider InternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested + * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Ukraine/NewYearsDayTest.php b/tests/Ukraine/NewYearsDayTest.php index 3854db7b0..414368adf 100644 --- a/tests/Ukraine/NewYearsDayTest.php +++ b/tests/Ukraine/NewYearsDayTest.php @@ -31,7 +31,7 @@ class NewYearsDayTest extends UkraineBaseTestCase implements YasumiTestCaseInter * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param \DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Ukraine/SecondInternationalWorkersDayTest.php b/tests/Ukraine/SecondInternationalWorkersDayTest.php index a8ea256a7..327096ff7 100644 --- a/tests/Ukraine/SecondInternationalWorkersDayTest.php +++ b/tests/Ukraine/SecondInternationalWorkersDayTest.php @@ -31,7 +31,7 @@ class SecondInternationalWorkersDayTest extends UkraineBaseTestCase implements Y * * @dataProvider SecondInternationalWorkersDayDataProvider * - * @param int $year the year for which International Workers' Day needs to be tested + * @param int $year the year for which International Workers' Day needs to be tested * @param \DateTime $expected the expected date * * @throws \ReflectionException diff --git a/tests/Ukraine/UkraineTest.php b/tests/Ukraine/UkraineTest.php index afc9bde7c..b977d9149 100644 --- a/tests/Ukraine/UkraineTest.php +++ b/tests/Ukraine/UkraineTest.php @@ -85,7 +85,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(2015, 2025); } diff --git a/tests/Ukraine/VictoryDayTest.php b/tests/Ukraine/VictoryDayTest.php index d08286646..31995caf4 100644 --- a/tests/Ukraine/VictoryDayTest.php +++ b/tests/Ukraine/VictoryDayTest.php @@ -29,7 +29,7 @@ class VictoryDayTest extends UkraineBaseTestCase implements YasumiTestCaseInterf /** * @dataProvider HolidayDataProvider * - * @param int $year + * @param int $year * @param \DateTime $expected * * @throws \ReflectionException diff --git a/tests/UnitedKingdom/BoxingDayTest.php b/tests/UnitedKingdom/BoxingDayTest.php index f5b6f1924..1e7598e50 100644 --- a/tests/UnitedKingdom/BoxingDayTest.php +++ b/tests/UnitedKingdom/BoxingDayTest.php @@ -33,7 +33,7 @@ class BoxingDayTest extends UnitedKingdomBaseTestCase implements YasumiTestCaseI * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/UnitedKingdom/ChristmasDayTest.php b/tests/UnitedKingdom/ChristmasDayTest.php index 096cfc9b1..47da67472 100644 --- a/tests/UnitedKingdom/ChristmasDayTest.php +++ b/tests/UnitedKingdom/ChristmasDayTest.php @@ -33,7 +33,7 @@ class ChristmasDayTest extends UnitedKingdomBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/UnitedKingdom/EasterMondayTest.php b/tests/UnitedKingdom/EasterMondayTest.php index 565062311..e2182b80a 100644 --- a/tests/UnitedKingdom/EasterMondayTest.php +++ b/tests/UnitedKingdom/EasterMondayTest.php @@ -33,7 +33,7 @@ class EasterMondayTest extends UnitedKingdomBaseTestCase implements YasumiTestCa * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/UnitedKingdom/NewYearsDayTest.php b/tests/UnitedKingdom/NewYearsDayTest.php index d2650e2b5..2d332c4d4 100644 --- a/tests/UnitedKingdom/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NewYearsDayTest.php @@ -42,7 +42,7 @@ class NewYearsDayTest extends UnitedKingdomBaseTestCase implements YasumiTestCas * * @dataProvider HolidayDataProvider * - * @param int $year the year for which the holiday defined in this test needs to be tested + * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * * @throws \ReflectionException diff --git a/tests/UnitedKingdom/UnitedKingdomTest.php b/tests/UnitedKingdom/UnitedKingdomTest.php index 67834127b..b5c80c732 100644 --- a/tests/UnitedKingdom/UnitedKingdomTest.php +++ b/tests/UnitedKingdom/UnitedKingdomTest.php @@ -81,7 +81,7 @@ public function testOtherHolidays(): void /** * Initial setup of this Test Case */ - protected function setUp() + protected function setUp(): void { $this->year = $this->generateRandomYear(1978); } diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index b7b16756b..dfa011313 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -34,11 +34,11 @@ trait YasumiBase /** * Asserts that the expected holidays are indeed a holiday for the given provider and year * - * @param array $expectedHolidays list of all known holidays of the given provider - * @param string $provider the holiday provider (i.e. country/state) for which the holidays need to be + * @param array $expectedHolidays list of all known holidays of the given provider + * @param string $provider the holiday provider (i.e. country/state) for which the holidays need to be * tested - * @param int $year holiday calendar year - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, + * @param int $year holiday calendar year + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, * TYPE_OBSERVANCE, TYPE_SEASON, TYPE_BANK or TYPE_OTHER. * * @throws \InvalidArgumentException @@ -79,10 +79,10 @@ public function assertDefinedHolidays($expectedHolidays, $provider, $year, $type /** * Asserts that the expected date is indeed a holiday for that given year and name * - * @param string $provider the holiday provider (i.e. country/state) for which the holiday need to be tested - * @param string $shortName string the short name of the holiday to be checked against - * @param int $year holiday calendar year - * @param DateTime $expected the date to be checked against + * @param string $provider the holiday provider (i.e. country/state) for which the holiday need to be tested + * @param string $shortName string the short name of the holiday to be checked against + * @param int $year holiday calendar year + * @param DateTime $expected the date to be checked against * * @throws \Yasumi\Exception\UnknownLocaleException * @throws \Yasumi\Exception\InvalidDateException @@ -94,7 +94,7 @@ public function assertDefinedHolidays($expectedHolidays, $provider, $year, $type public function assertHoliday($provider, $shortName, $year, $expected): void { $holidays = Yasumi::create($provider, $year); - $holiday = $holidays->getHoliday($shortName); + $holiday = $holidays->getHoliday($shortName); $this->assertInstanceOf('Yasumi\Provider\\' . \str_replace('/', '\\', $provider), $holidays); $this->assertInstanceOf(Holiday::class, $holiday); @@ -108,9 +108,9 @@ public function assertHoliday($provider, $shortName, $year, $expected): void /** * Asserts that the given holiday for that given year does not exist. * - * @param string $provider the holiday provider (i.e. country/state) for which the holiday need to be tested + * @param string $provider the holiday provider (i.e. country/state) for which the holiday need to be tested * @param string $shortName the short name of the holiday to be checked against - * @param int $year holiday calendar year + * @param int $year holiday calendar year * * @throws \InvalidArgumentException * @throws \RuntimeException @@ -122,7 +122,7 @@ public function assertHoliday($provider, $shortName, $year, $expected): void public function assertNotHoliday($provider, $shortName, $year): void { $holidays = Yasumi::create($provider, $year); - $holiday = $holidays->getHoliday($shortName); + $holiday = $holidays->getHoliday($shortName); $this->assertInstanceOf('Yasumi\Provider\\' . \str_replace('/', '\\', $provider), $holidays); $this->assertNull($holiday); @@ -133,10 +133,10 @@ public function assertNotHoliday($provider, $shortName, $year): void /** * Asserts that the expected name is indeed provided as a translated holiday name for that given year and name * - * @param string $provider the holiday provider (i.e. country/state) for which the holiday need to be tested - * @param string $shortName string the short name of the holiday to be checked against - * @param int $year holiday calendar year - * @param array $translations the translations to be checked against + * @param string $provider the holiday provider (i.e. country/state) for which the holiday need to be tested + * @param string $shortName string the short name of the holiday to be checked against + * @param int $year holiday calendar year + * @param array $translations the translations to be checked against * * @throws \InvalidArgumentException * @throws \RuntimeException @@ -147,14 +147,14 @@ public function assertNotHoliday($provider, $shortName, $year): void public function assertTranslatedHolidayName($provider, $shortName, $year, $translations): void { $holidays = Yasumi::create($provider, $year); - $holiday = $holidays->getHoliday($shortName); + $holiday = $holidays->getHoliday($shortName); $this->assertInstanceOf('Yasumi\Provider\\' . \str_replace('/', '\\', $provider), $holidays); $this->assertInstanceOf(Holiday::class, $holiday); $this->assertNotNull($holiday); $this->assertTrue($holidays->isHoliday($holiday)); - if (\is_array($translations) && ! empty($translations)) { + if (\is_array($translations) && !empty($translations)) { foreach ($translations as $locale => $name) { $translationExists = isset($holiday->translations[$locale]) ? true : false; @@ -169,10 +169,10 @@ public function assertTranslatedHolidayName($provider, $shortName, $year, $trans /** * Asserts that the expected type is indeed the associated type of the given holiday * - * @param string $provider the holiday provider (i.e. country/region) for which the holiday need to be tested + * @param string $provider the holiday provider (i.e. country/region) for which the holiday need to be tested * @param string $shortName string the short name of the holiday to be checked against - * @param int $year holiday calendar year - * @param string $type the type to be checked against + * @param int $year holiday calendar year + * @param string $type the type to be checked against * * @throws \InvalidArgumentException * @throws \RuntimeException @@ -183,7 +183,7 @@ public function assertTranslatedHolidayName($provider, $shortName, $year, $trans public function assertHolidayType($provider, $shortName, $year, $type): void { $holidays = Yasumi::create($provider, $year); - $holiday = $holidays->getHoliday($shortName); + $holiday = $holidays->getHoliday($shortName); $this->assertInstanceOf('Yasumi\Provider\\' . \str_replace('/', '\\', $provider), $holidays); $this->assertInstanceOf(Holiday::class, $holiday); @@ -196,10 +196,10 @@ public function assertHolidayType($provider, $shortName, $year, $type): void /** * Asserts that the expected week day is indeed the week day for the given holiday and year * - * @param string $provider the holiday provider (i.e. country/state) for which the holiday need to be + * @param string $provider the holiday provider (i.e. country/state) for which the holiday need to be * tested - * @param string $shortName string the short name of the holiday to be checked against - * @param int $year holiday calendar year + * @param string $shortName string the short name of the holiday to be checked against + * @param int $year holiday calendar year * @param string $expectedDayOfWeek the expected week day (i.e. "Saturday", "Sunday", etc.) * * @throws \PHPUnit\Framework\AssertionFailedError @@ -211,7 +211,7 @@ public function assertHolidayType($provider, $shortName, $year, $type): void public function assertDayOfWeek($provider, $shortName, $year, $expectedDayOfWeek): void { $holidays = Yasumi::create($provider, $year); - $holiday = $holidays->getHoliday($shortName); + $holiday = $holidays->getHoliday($shortName); $this->assertInstanceOf('Yasumi\Provider\\' . \str_replace('/', '\\', $provider), $holidays); $this->assertInstanceOf(Holiday::class, $holiday); @@ -225,11 +225,11 @@ public function assertDayOfWeek($provider, $shortName, $year, $expectedDayOfWeek /** * Returns a list of random test dates used for assertion of holidays. * - * @param int $month month (number) for which the test date needs to be generated - * @param int $day day (number) for which the test date needs to be generated - * @param string $timezone name of the timezone for which the dates need to be generated - * @param int $iterations number of iterations (i.e. samples) that need to be generated (default: 10) - * @param int $range year range from which dates will be generated (default: 1000) + * @param int $month month (number) for which the test date needs to be generated + * @param int $day day (number) for which the test date needs to be generated + * @param string $timezone name of the timezone for which the dates need to be generated + * @param int $iterations number of iterations (i.e. samples) that need to be generated (default: 10) + * @param int $range year range from which dates will be generated (default: 1000) * * @return array list of random test dates used for assertion of holidays. * @throws \Exception @@ -238,7 +238,7 @@ public function generateRandomDates($month, $day, $timezone = 'UTC', $iterations { $data = []; for ($y = 1; $y <= $iterations; $y++) { - $year = Faker::create()->dateTimeBetween("-$range years", "+$range years")->format('Y'); + $year = Faker::create()->dateTimeBetween("-$range years", "+$range years")->format('Y'); $data[] = [$year, new DateTime("$year-$month-$day", new DateTimeZone($timezone))]; } @@ -248,9 +248,9 @@ public function generateRandomDates($month, $day, $timezone = 'UTC', $iterations /** * Returns a list of random easter test dates used for assertion of holidays. * - * @param string $timezone name of the timezone for which the dates need to be generated - * @param int $iterations number of iterations (i.e. samples) that need to be generated (default: 10) - * @param int $range year range from which dates will be generated (default: 1000) + * @param string $timezone name of the timezone for which the dates need to be generated + * @param int $iterations number of iterations (i.e. samples) that need to be generated (default: 10) + * @param int $range year range from which dates will be generated (default: 1000) * * @return array list of random easter test dates used for assertion of holidays. * @throws \Exception @@ -281,17 +281,17 @@ public function generateRandomEasterDates($timezone = 'UTC', $iterations = 10, $ * * Note: In calendrical calculations, frequently operations called integer division are used. * + * @param int $year the year for which Easter needs to be calculated + * @param string $timezone the timezone in which Easter is celebrated + * + * @return \DateTime date of Easter + * @throws \Exception * @see easter_days * * @link https://github.com/php/php-src/blob/c8aa6f3a9a3d2c114d0c5e0c9fdd0a465dbb54a5/ext/calendar/easter.c * @link http://www.gmarts.org/index.php?go=415#EasterMallen * @link http://www.tondering.dk/claus/cal/easter.php * - * @param int $year the year for which Easter needs to be calculated - * @param string $timezone the timezone in which Easter is celebrated - * - * @return \DateTime date of Easter - * @throws \Exception */ protected function calculateEaster(int $year, string $timezone): DateTime { @@ -351,9 +351,9 @@ protected function calculateEaster(int $year, string $timezone): DateTime /** * Returns a list of random Easter Monday test dates used for assertion of holidays. * - * @param string $timezone name of the timezone for which the dates need to be generated - * @param int $iterations number of iterations (i.e. samples) that need to be generated (default: 10) - * @param int $range year range from which dates will be generated (default: 1000) + * @param string $timezone name of the timezone for which the dates need to be generated + * @param int $iterations number of iterations (i.e. samples) that need to be generated (default: 10) + * @param int $range year range from which dates will be generated (default: 1000) * * @return array list of random Easter Monday test dates used for assertion of holidays. * @@ -369,10 +369,10 @@ public function generateRandomEasterMondayDates($timezone = 'UTC', $iterations = /** * Returns a list of random modified Easter day test dates for assertion of holidays. * - * @param callable $cb callback(DateTime $date) to modify $date by custom rules - * @param string $timezone name of the timezone for which the dates need to be generated - * @param int $iterations number of iterations (i.e. samples) that need to be generated (default: 10) - * @param int $range year range from which dates will be generated (default: 1000) + * @param callable $cb callback(DateTime $date) to modify $date by custom rules + * @param string $timezone name of the timezone for which the dates need to be generated + * @param int $iterations number of iterations (i.e. samples) that need to be generated (default: 10) + * @param int $range year range from which dates will be generated (default: 1000) * * @return array list of random modified Easter day test dates for assertion of holidays. * @throws \Exception @@ -382,7 +382,8 @@ public function generateRandomModifiedEasterDates( $timezone = 'UTC', $iterations = 10, $range = 1000 - ): array { + ): array + { $data = []; for ($i = 1; $i <= $iterations; ++$i) { @@ -400,9 +401,9 @@ public function generateRandomModifiedEasterDates( /** * Returns a list of random Good Friday test dates used for assertion of holidays. * - * @param string $timezone name of the timezone for which the dates need to be generated - * @param int $iterations number of iterations (i.e. samples) that need to be generated (default: 10) - * @param int $range year range from which dates will be generated (default: 1000) + * @param string $timezone name of the timezone for which the dates need to be generated + * @param int $iterations number of iterations (i.e. samples) that need to be generated (default: 10) + * @param int $range year range from which dates will be generated (default: 1000) * * @return array list of random Good Friday test dates used for assertion of holidays. * @@ -418,9 +419,9 @@ public function generateRandomGoodFridayDates($timezone = 'UTC', $iterations = 1 /** * Returns a list of random Pentecost test dates used for assertion of holidays. * - * @param string $timezone name of the timezone for which the dates need to be generated - * @param int $iterations number of iterations (i.e. samples) that need to be generated (default: 10) - * @param int $range year range from which dates will be generated (default: 1000) + * @param string $timezone name of the timezone for which the dates need to be generated + * @param int $iterations number of iterations (i.e. samples) that need to be generated (default: 10) + * @param int $range year range from which dates will be generated (default: 1000) * * @return array list of random Pentecost test dates used for assertion of holidays. * @@ -437,11 +438,11 @@ public function generateRandomPentecostDates($timezone = 'UTC', $iterations = 10 * Returns a list of random test dates used for assertion of holidays. If the date falls in a weekend, random * holiday day is moved to to Monday. * - * @param int $month month (number) for which the test date needs to be generated - * @param int $day day (number) for which the test date needs to be generated - * @param string $timezone name of the timezone for which the dates need to be generated - * @param int $iterations number of iterations (i.e. samples) that need to be generated (default: 10) - * @param int $range year range from which dates will be generated (default: 1000) + * @param int $month month (number) for which the test date needs to be generated + * @param int $day day (number) for which the test date needs to be generated + * @param string $timezone name of the timezone for which the dates need to be generated + * @param int $iterations number of iterations (i.e. samples) that need to be generated (default: 10) + * @param int $range year range from which dates will be generated (default: 1000) * * @return array list of random test dates used for assertion of holidays. * @throws \Exception @@ -452,7 +453,8 @@ public function generateRandomDatesWithHolidayMovedToMonday( $timezone = 'UTC', $iterations = 10, $range = 1000 - ): array { + ): array + { return $this->generateRandomDatesWithModifier($month, $day, function ($year, \DateTime $date) { if ($this->isWeekend($date)) { $date->modify('next monday'); @@ -463,12 +465,12 @@ public function generateRandomDatesWithHolidayMovedToMonday( /** * Returns a list of random test dates used for assertion of holidays with applied callback. * - * @param int $month month (number) for which the test date needs to be generated - * @param int $day day (number) for which the test date needs to be generated - * @param callable $callback callback(int $year, \DateTime $dateTime) to modify $dateTime by custom rules - * @param string $timezone name of the timezone for which the dates need to be generated - * @param int $iterations number of iterations (i.e. samples) that need to be generated (default: 10) - * @param int $range year range from which dates will be generated (default: 1000) + * @param int $month month (number) for which the test date needs to be generated + * @param int $day day (number) for which the test date needs to be generated + * @param callable $callback callback(int $year, \DateTime $dateTime) to modify $dateTime by custom rules + * @param string $timezone name of the timezone for which the dates need to be generated + * @param int $iterations number of iterations (i.e. samples) that need to be generated (default: 10) + * @param int $range year range from which dates will be generated (default: 1000) * * @return array list of random test dates used for assertion of holidays with applied callback. * @throws \Exception @@ -480,7 +482,8 @@ public function generateRandomDatesWithModifier( $timezone = 'UTC', $iterations, $range - ): array { + ): array + { $data = []; for ($i = 1; $i <= $iterations; ++$i) { @@ -511,8 +514,8 @@ public function generateRandomYear($lowerLimit = 1000, $upperLimit = 9999): int /** * Checks if given $dateTime is a weekend. * - * @param \DateTimeInterface $dateTime date for which weekend will be checked. - * @param array $weekendDays weekend days. Saturday and Sunday are used by default. + * @param \DateTimeInterface $dateTime date for which weekend will be checked. + * @param array $weekendDays weekend days. Saturday and Sunday are used by default. * * @return bool true if $dateTime is a weekend, false otherwise */ From 87d6c9717097fdf42514951b1dd5ec37809ac244 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 10:54:49 +0900 Subject: [PATCH 063/133] Added additional Code Style fixers. Aligned SyleCI and PHP-CS configuration. Fixed styling issues. Signed-off-by: Sacha Telgenhof --- .php_cs | 7 ++++++- .styleci.yml | 12 +++++++++++- tests/SouthKorea/SeollalTest.php | 6 +++--- tests/UnitedKingdom/MayDayBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/SpringBankHolidayTest.php | 4 ++-- tests/UnitedKingdom/SummerBankHolidayTest.php | 12 ++++++------ tests/YasumiBase.php | 9 +++------ 7 files changed, 33 insertions(+), 21 deletions(-) diff --git a/.php_cs b/.php_cs index 8a3e9dce8..d6037492b 100644 --- a/.php_cs +++ b/.php_cs @@ -14,5 +14,10 @@ $finder = PhpCsFixer\Finder::create()->in(__DIR__); return PhpCsFixer\Config::create()->setRiskyAllowed(true)->setRules([ '@PSR2' => true, - 'native_function_invocation' => true + 'array_syntax' => ['syntax' => 'short'], + 'native_function_invocation' => true, + 'ordered_imports' => ['sortAlgorithm' => 'alpha'], + 'no_unused_imports' => true, + 'single_quote' => true, + 'space_after_semicolon' => true ])->setFinder($finder); \ No newline at end of file diff --git a/.styleci.yml b/.styleci.yml index b46b01df6..29d6b06ca 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -1 +1,11 @@ -preset: psr2 \ No newline at end of file +preset: psr2 + +risky: true + +enabled: + - short_array_syntax + - native_function_invocation + - alpha_ordered_imports + - no_unused_imports + - single_quote + - space_after_semicolon \ No newline at end of file diff --git a/tests/SouthKorea/SeollalTest.php b/tests/SouthKorea/SeollalTest.php index 80b705e4d..ac291d544 100644 --- a/tests/SouthKorea/SeollalTest.php +++ b/tests/SouthKorea/SeollalTest.php @@ -80,19 +80,19 @@ public function testSubstituteHolidayBySunday() self::REGION, 'substituteHoliday:dayBeforeSeollal', 2016, - new DateTime("2016-2-10", new DateTimeZone(self::TIMEZONE)) + new DateTime('2016-2-10', new DateTimeZone(self::TIMEZONE)) ); $this->assertHoliday( self::REGION, 'substituteHoliday:seollal', 2034, - new DateTime("2034-2-21", new DateTimeZone(self::TIMEZONE)) + new DateTime('2034-2-21', new DateTimeZone(self::TIMEZONE)) ); $this->assertHoliday( self::REGION, 'substituteHoliday:dayAfterSeollal', 2024, - new DateTime("2024-2-12", new DateTimeZone(self::TIMEZONE)) + new DateTime('2024-2-12', new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/MayDayBankHolidayTest.php b/tests/UnitedKingdom/MayDayBankHolidayTest.php index 24578db20..942be93e7 100644 --- a/tests/UnitedKingdom/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/MayDayBankHolidayTest.php @@ -58,14 +58,14 @@ public function testHolidayExceptions() self::REGION, self::HOLIDAY, 1995, - new DateTime("1995-5-8", new DateTimeZone(self::TIMEZONE)) + new DateTime('1995-5-8', new DateTimeZone(self::TIMEZONE)) ); $this->assertHoliday( self::REGION, self::HOLIDAY, 2020, - new DateTime("2020-5-8", new DateTimeZone(self::TIMEZONE)) + new DateTime('2020-5-8', new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/SpringBankHolidayTest.php b/tests/UnitedKingdom/SpringBankHolidayTest.php index 3c4db82e1..5c731c75c 100644 --- a/tests/UnitedKingdom/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/SpringBankHolidayTest.php @@ -58,14 +58,14 @@ public function testHolidayException() self::REGION, self::HOLIDAY, 2002, - new DateTime("2002-6-4", new DateTimeZone(self::TIMEZONE)) + new DateTime('2002-6-4', new DateTimeZone(self::TIMEZONE)) ); $this->assertHoliday( self::REGION, self::HOLIDAY, 2012, - new DateTime("2012-6-4", new DateTimeZone(self::TIMEZONE)) + new DateTime('2012-6-4', new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/UnitedKingdom/SummerBankHolidayTest.php b/tests/UnitedKingdom/SummerBankHolidayTest.php index 931fbe4a1..d836fb110 100644 --- a/tests/UnitedKingdom/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/SummerBankHolidayTest.php @@ -73,37 +73,37 @@ public function testHolidayTrialPeriod() self::REGION, self::HOLIDAY, 1965, - new DateTime("1965-8-30", new DateTimeZone(self::TIMEZONE)) + new DateTime('1965-8-30', new DateTimeZone(self::TIMEZONE)) ); $this->assertHoliday( self::REGION, self::HOLIDAY, 1966, - new DateTime("1966-8-29", new DateTimeZone(self::TIMEZONE)) + new DateTime('1966-8-29', new DateTimeZone(self::TIMEZONE)) ); $this->assertHoliday( self::REGION, self::HOLIDAY, 1967, - new DateTime("1967-8-28", new DateTimeZone(self::TIMEZONE)) + new DateTime('1967-8-28', new DateTimeZone(self::TIMEZONE)) ); $this->assertHoliday( self::REGION, self::HOLIDAY, 1968, - new DateTime("1968-9-2", new DateTimeZone(self::TIMEZONE)) + new DateTime('1968-9-2', new DateTimeZone(self::TIMEZONE)) ); $this->assertHoliday( self::REGION, self::HOLIDAY, 1969, - new DateTime("1969-9-1", new DateTimeZone(self::TIMEZONE)) + new DateTime('1969-9-1', new DateTimeZone(self::TIMEZONE)) ); $this->assertHoliday( self::REGION, self::HOLIDAY, 1970, - new DateTime("1970-8-31", new DateTimeZone(self::TIMEZONE)) + new DateTime('1970-8-31', new DateTimeZone(self::TIMEZONE)) ); } diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index dfa011313..3039114e5 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -382,8 +382,7 @@ public function generateRandomModifiedEasterDates( $timezone = 'UTC', $iterations = 10, $range = 1000 - ): array - { + ): array { $data = []; for ($i = 1; $i <= $iterations; ++$i) { @@ -453,8 +452,7 @@ public function generateRandomDatesWithHolidayMovedToMonday( $timezone = 'UTC', $iterations = 10, $range = 1000 - ): array - { + ): array { return $this->generateRandomDatesWithModifier($month, $day, function ($year, \DateTime $date) { if ($this->isWeekend($date)) { $date->modify('next monday'); @@ -482,8 +480,7 @@ public function generateRandomDatesWithModifier( $timezone = 'UTC', $iterations, $range - ): array - { + ): array { $data = []; for ($i = 1; $i <= $iterations; ++$i) { From 226cf90eb151b04a83104d53b28f75ab269d50d9 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 11:08:44 +0900 Subject: [PATCH 064/133] Added PHP7.4snapshot with the upcoming 7.4 release in mind. In addition 7.1 is allowed to fail due to the fact PHPUnit 8 requires PHP >= 7.2. Likely will drop 7.1 support in Yasumi once 7.1 has reached its end of life (December 2019). Bumped version of PHPStan. Signed-off-by: Sacha Telgenhof --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c206d55c4..288d5033c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ php: - 7.1 - 7.2 - 7.3 + - 7.4snapshot - nightly dist: trusty @@ -22,13 +23,15 @@ before_script: - composer install --no-interaction script: - - if [[ $PHPSTAN = 1 ]]; then composer require --dev phpstan/phpstan:^0.10 && vendor/bin/phpstan analyse -l 5 src; fi + - if [[ $PHPSTAN = 1 ]]; then composer require --dev phpstan/phpstan:^0.11 && vendor/bin/phpstan analyse -l 5 src; fi - ./vendor/bin/phpunit - phpenv config-rm xdebug.ini || return 0 - ./vendor/bin/php-cs-fixer --diff --dry-run -v fix matrix: allow_failures: + - php: 7.1 + - php: 7.4snapshot - php: hhvm - php: nightly @@ -39,5 +42,7 @@ matrix: env: PHPSTAN=1 - php: 7.3 env: PHPSTAN=1 + - php: 7.4snapshot + env: PHPSTAN=1 - php: hhvm env: HHVM=true From 295f966dd349b1f582cad20a0664eda9a27ebb32 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 11:09:23 +0900 Subject: [PATCH 065/133] Set proper line ending. Signed-off-by: Sacha Telgenhof --- .php_cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.php_cs b/.php_cs index d6037492b..5265511d1 100644 --- a/.php_cs +++ b/.php_cs @@ -20,4 +20,4 @@ return PhpCsFixer\Config::create()->setRiskyAllowed(true)->setRules([ 'no_unused_imports' => true, 'single_quote' => true, 'space_after_semicolon' => true - ])->setFinder($finder); \ No newline at end of file + ])->setLineEnding("\n")->setFinder($finder); \ No newline at end of file From 7121a4284ba8432fea5e663ab407dc2c3b3837f4 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 11:23:25 +0900 Subject: [PATCH 066/133] Added parentheses to group conditions that belong together. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Portugal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/Portugal.php b/src/Yasumi/Provider/Portugal.php index 1a485fdfd..4248f4dd1 100644 --- a/src/Yasumi/Provider/Portugal.php +++ b/src/Yasumi/Provider/Portugal.php @@ -164,7 +164,7 @@ private function calculatePortugalDay(): void */ private function calculatePortugueseRepublicDay(): void { - if ($this->year >= 1910 && $this->year <= 2012 || $this->year >= 2016) { + if (($this->year >= 1910 && $this->year <= 2012) || $this->year >= 2016) { $this->addHoliday(new Holiday( 'portugueseRepublic', ['pt_PT' => 'Implantação da República Portuguesa'], From 27c6e817366609cdc0a72461912886e31c29d04e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 11:59:46 +0900 Subject: [PATCH 067/133] Used imports rather than FQN. Signed-off-by: Sacha Telgenhof --- tests/Australia/ACT/ACTTest.php | 3 +- tests/Australia/ACT/CanberraDayTest.php | 10 +- tests/Australia/ACT/EasterSaturdayTest.php | 12 +- tests/Australia/ACT/EasterSundayTest.php | 12 +- tests/Australia/ACT/LabourDayTest.php | 10 +- tests/Australia/ACT/QueensBirthdayTest.php | 10 +- tests/Australia/ACT/ReconciliationDayTest.php | 10 +- tests/Australia/AnzacDayTest.php | 12 +- tests/Australia/AustraliaDayTest.php | 10 +- tests/Australia/AustraliaTest.php | 11 +- tests/Australia/BoxingDayTest.php | 10 +- tests/Australia/ChristmasDayTest.php | 10 +- tests/Australia/EasterMondayTest.php | 16 +-- tests/Australia/GoodFridayTest.php | 12 +- tests/Australia/NSW/BankHolidayTest.php | 10 +- tests/Australia/NSW/EasterSaturdayTest.php | 12 +- tests/Australia/NSW/EasterSundayTest.php | 12 +- tests/Australia/NSW/LabourDayTest.php | 10 +- tests/Australia/NSW/NSWTest.php | 5 +- tests/Australia/NSW/QueensBirthdayTest.php | 10 +- tests/Australia/NT/EasterSaturdayTest.php | 12 +- tests/Australia/NT/MayDayTest.php | 10 +- tests/Australia/NT/NTTest.php | 3 +- tests/Australia/NT/PicnicDayTest.php | 10 +- tests/Australia/NT/QueensBirthdayTest.php | 10 +- tests/Australia/NewYearsDayTest.php | 10 +- .../Queensland/Brisbane/BrisbaneTest.php | 3 +- .../Queensland/Brisbane/PeoplesDayTest.php | 10 +- tests/Australia/Queensland/LabourDayTest.php | 10 +- .../Queensland/QueensBirthdayTest.php | 10 +- tests/Australia/Queensland/QueenslandTest.php | 3 +- tests/Australia/SA/AdelaideCupDayTest.php | 10 +- tests/Australia/SA/ChristmasDayTest.php | 10 +- tests/Australia/SA/EasterSaturdayTest.php | 12 +- tests/Australia/SA/LabourDayTest.php | 10 +- tests/Australia/SA/ProclamationDayTest.php | 10 +- tests/Australia/SA/QueensBirthdayTest.php | 10 +- tests/Australia/SA/SATest.php | 3 +- .../CentralNorth/CentralNorthTest.php | 3 +- .../CentralNorth/DevonportShowTest.php | 10 +- tests/Australia/Tasmania/EightHourDayTest.php | 10 +- .../FlindersIsland/FlindersIslandShowTest.php | 10 +- .../FlindersIsland/FlindersIslandTest.php | 3 +- .../KingIsland/KingIslandShowTest.php | 10 +- .../Tasmania/KingIsland/KingIslandTest.php | 3 +- .../Tasmania/Northeast/LauncestonShowTest.php | 10 +- .../Tasmania/Northeast/NortheastTest.php | 3 +- .../Tasmania/Northwest/BurnieShowTest.php | 10 +- .../Northwest/CircularHead/AGFESTTest.php | 10 +- .../CircularHead/CircularHeadTest.php | 3 +- .../Tasmania/Northwest/NorthwestTest.php | 3 +- .../Australia/Tasmania/QueensBirthdayTest.php | 10 +- .../Australia/Tasmania/RecreationDayTest.php | 10 +- .../Tasmania/South/HobartShowTest.php | 10 +- tests/Australia/Tasmania/South/SouthTest.php | 3 +- .../South/Southeast/HobartRegattaTest.php | 10 +- .../South/Southeast/SoutheastTest.php | 3 +- tests/Australia/Tasmania/TasmaniaTest.php | 3 +- .../Victoria/AFLGrandFinalFridayTest.php | 12 +- .../Australia/Victoria/EasterSaturdayTest.php | 12 +- tests/Australia/Victoria/EasterSundayTest.php | 12 +- tests/Australia/Victoria/LabourDayTest.php | 10 +- .../Victoria/MelbourneCupDayTest.php | 10 +- .../Australia/Victoria/QueensBirthdayTest.php | 10 +- tests/Australia/Victoria/VictoriaTest.php | 3 +- tests/Australia/WA/LabourDayTest.php | 10 +- tests/Australia/WA/QueensBirthdayTest.php | 10 +- tests/Australia/WA/WATest.php | 3 +- .../Australia/WA/WesternAustraliaDayTest.php | 10 +- tests/Austria/AllSaintsDayTest.php | 10 +- tests/Austria/AscensionDayTest.php | 10 +- tests/Austria/AssumptionOfMaryTest.php | 10 +- tests/Austria/AustriaTest.php | 11 +- tests/Austria/ChristmasTest.php | 10 +- tests/Austria/CorpusChristiTest.php | 10 +- tests/Austria/EasterMondayTest.php | 10 +- tests/Austria/EasterTest.php | 10 +- tests/Austria/EpiphanyTest.php | 10 +- tests/Austria/ImmaculateConceptionTest.php | 10 +- tests/Austria/InternationalWorkersDayTest.php | 10 +- tests/Austria/NationalDayTest.php | 12 +- tests/Austria/NewYearsDayTest.php | 10 +- tests/Austria/PentecostMondayTest.php | 10 +- tests/Austria/PentecostTest.php | 10 +- tests/Austria/SecondChristmasDayTest.php | 10 +- tests/Base/HolidayBetweenFilterTest.php | 51 ++++---- tests/Base/HolidayFiltersTest.php | 11 +- tests/Base/HolidayOnFilterTest.php | 14 ++- tests/Base/HolidayTest.php | 24 ++-- tests/Base/YasumiTest.php | 115 ++++++++++-------- tests/Base/YasumiWorkdayTest.php | 41 ++++--- tests/Belgium/AllSaintsDayTest.php | 10 +- tests/Belgium/ArmisticeDayTest.php | 10 +- tests/Belgium/AscensionDayTest.php | 10 +- tests/Belgium/AssumptionOfMaryTest.php | 10 +- tests/Belgium/BelgiumTest.php | 11 +- tests/Belgium/ChristmasTest.php | 10 +- tests/Belgium/EasterMondayTest.php | 10 +- tests/Belgium/EasterTest.php | 10 +- tests/Belgium/InternationalWorkersDayTest.php | 10 +- tests/Belgium/NationalDayTest.php | 10 +- tests/Belgium/NewYearsDayTest.php | 10 +- tests/Belgium/PentecostTest.php | 10 +- tests/Belgium/pentecostMondayTest.php | 10 +- tests/Bosnia/BosniaTest.php | 11 +- tests/Bosnia/ChristmasDayTest.php | 10 +- tests/Bosnia/DayAfterNewYearsDay.php | 10 +- tests/Bosnia/EasterTest.php | 10 +- tests/Bosnia/IndependenceDayTest.php | 12 +- tests/Bosnia/InternationalWorkersDayTest.php | 10 +- tests/Bosnia/NewYearsDayTest.php | 10 +- tests/Bosnia/OrthodoxChristmasDay.php | 15 ++- tests/Bosnia/SecondLabourDay.php | 10 +- tests/Bosnia/StatehoodDayTest.php | 12 +- tests/Brazil/AllSoulsDayTest.php | 12 +- tests/Brazil/AshWednesdayTest.php | 10 +- tests/Brazil/BrazilTest.php | 11 +- tests/Brazil/CarnavalMondayTest.php | 12 +- tests/Brazil/CarnavalTuesdayTest.php | 12 +- tests/Brazil/ChristmasDayTest.php | 10 +- tests/Brazil/CorpusChristiTest.php | 10 +- tests/Brazil/EasterTest.php | 10 +- tests/Brazil/GoodFridayTest.php | 10 +- tests/Brazil/IndependenceDayTest.php | 12 +- tests/Brazil/InternationalWorkersDayTest.php | 10 +- tests/Brazil/NewYearsDayTest.php | 10 +- tests/Brazil/OurLadyOfAparecidaDayTest.php | 12 +- .../Brazil/ProclamationOfRepublicDayTest.php | 12 +- tests/Brazil/TiradentesDayTest.php | 12 +- tests/Croatia/AllSaintsDayTest.php | 10 +- tests/Croatia/AntifascistStruggleDayTest.php | 12 +- tests/Croatia/AssumptionOfMaryTest.php | 10 +- tests/Croatia/ChristmasDayTest.php | 10 +- tests/Croatia/CorpusChristiTest.php | 10 +- tests/Croatia/EasterMondayTest.php | 10 +- tests/Croatia/EasterTest.php | 10 +- tests/Croatia/EpiphanyTest.php | 10 +- tests/Croatia/HomelandThanksgivingDayTest.php | 12 +- tests/Croatia/IndependenceDayTest.php | 12 +- tests/Croatia/InternationalWorkersDayTest.php | 10 +- tests/Croatia/NewYearsDayTest.php | 10 +- tests/Croatia/StStephensDayTest.php | 10 +- tests/Croatia/StatehoodDayTest.php | 12 +- tests/CzechRepublic/ChristmasDayTest.php | 10 +- tests/CzechRepublic/ChristmasEveTest.php | 10 +- tests/CzechRepublic/CzechRepublicTest.php | 11 +- tests/CzechRepublic/CzechStateHoodDayTest.php | 10 +- tests/CzechRepublic/EasterMondayTest.php | 10 +- tests/CzechRepublic/GoodFridayTest.php | 10 +- .../IndependentCzechoslovakStateDayTest.php | 10 +- .../InternationalWorkersDayTest.php | 10 +- tests/CzechRepublic/JanHusDayTest.php | 10 +- tests/CzechRepublic/NewYearsDayTest.php | 10 +- .../RenewalOfIndependentCzechStateDayTest.php | 10 +- .../SaintsCyrilAndMethodiusDayTest.php | 10 +- .../CzechRepublic/SecondChristmasDayTest.php | 10 +- .../StruggleForFreedomAndDemocracyDayTest.php | 10 +- .../CzechRepublic/VictoryInEuropeDayTest.php | 10 +- tests/Denmark/AscensionDayTest.php | 10 +- tests/Denmark/ChristmasDayTest.php | 10 +- tests/Denmark/ChristmasEveTest.php | 10 +- tests/Denmark/ConstitutionDayTest.php | 12 +- tests/Denmark/DenmarkTest.php | 11 +- tests/Denmark/EasterMondayTest.php | 10 +- tests/Denmark/EasterTest.php | 10 +- tests/Denmark/GoodFridayTest.php | 10 +- tests/Denmark/GreatPrayerDayTest.php | 12 +- tests/Denmark/InternationalWorkersDayTest.php | 10 +- tests/Denmark/MaundyThursdayTest.php | 10 +- tests/Denmark/NewYearsDayTest.php | 10 +- tests/Denmark/NewYearsEveTest.php | 10 +- tests/Denmark/PentecostMondayTest.php | 10 +- tests/Denmark/PentecostTest.php | 10 +- tests/Denmark/SecondChristmasDayTest.php | 10 +- tests/Denmark/SummerTimeTest.php | 10 +- tests/Denmark/WinterTimeTest.php | 10 +- tests/Estonia/ChristmasDayTest.php | 15 ++- tests/Estonia/ChristmasEveDayTest.php | 15 ++- tests/Estonia/EasterDayTest.php | 16 ++- tests/Estonia/EstoniaTest.php | 11 +- tests/Estonia/GoodFridayDayTest.php | 16 ++- tests/Estonia/IndependenceDayTest.php | 16 ++- tests/Estonia/InternationalWorkersDayTest.php | 15 ++- tests/Estonia/NewYearsDayTest.php | 15 ++- tests/Estonia/PentecostTest.php | 16 ++- .../RestorationOfIndependenceDayTest.php | 16 ++- tests/Estonia/SecondChristmasDayTest.php | 15 ++- tests/Estonia/StJohnsDayTest.php | 15 ++- tests/Estonia/VictoryDayTest.php | 16 ++- tests/Finland/AllSaintsDayTest.php | 10 +- tests/Finland/AscensionDayTest.php | 10 +- tests/Finland/ChristmasDayTest.php | 10 +- tests/Finland/EasterMondayTest.php | 10 +- tests/Finland/EasterTest.php | 10 +- tests/Finland/EpiphanyTest.php | 10 +- tests/Finland/FinlandTest.php | 11 +- tests/Finland/GoodFridayTest.php | 10 +- tests/Finland/IndependenceDayTest.php | 12 +- tests/Finland/InternationalWorkersDayTest.php | 10 +- tests/Finland/NewYearsDayTest.php | 10 +- tests/Finland/PentecostTest.php | 10 +- tests/Finland/SecondChristmasDayTest.php | 10 +- tests/Finland/stJohnsDayTest.php | 12 +- tests/France/AllSaintsDayTest.php | 10 +- tests/France/ArmisticeDayTest.php | 12 +- tests/France/AscensionDayTest.php | 10 +- tests/France/AssumptionOfMaryTest.php | 10 +- tests/France/BasRhin/BasRhinTest.php | 11 +- tests/France/BasRhin/GoodFridayTest.php | 10 +- tests/France/BasRhin/stStephensDayTest.php | 10 +- tests/France/BastilleDayTest.php | 12 +- tests/France/ChristmasDayTest.php | 10 +- tests/France/EasterMondayTest.php | 10 +- tests/France/FranceTest.php | 11 +- tests/France/HautRhin/GoodFridayTest.php | 10 +- tests/France/HautRhin/HautRhinTest.php | 11 +- tests/France/HautRhin/stStephensDayTest.php | 10 +- tests/France/InternationalWorkersDayTest.php | 10 +- tests/France/Moselle/GoodFridayTest.php | 10 +- tests/France/Moselle/MoselleTest.php | 11 +- tests/France/Moselle/stStephensDayTest.php | 10 +- tests/France/NewYearsDayTest.php | 10 +- tests/France/PentecostMondayTest.php | 10 +- tests/France/VictoryInEuropeDayTest.php | 12 +- tests/Germany/AscensionDayTest.php | 10 +- .../BadenWurttemberg/AllSaintsDayTest.php | 10 +- .../BadenWurttemberg/BadenWurttembergTest.php | 11 +- .../BadenWurttemberg/CorpusChristiTest.php | 10 +- .../Germany/BadenWurttemberg/EpiphanyTest.php | 10 +- tests/Germany/Bavaria/AllSaintsDayTest.php | 10 +- tests/Germany/Bavaria/BavariaTest.php | 11 +- tests/Germany/Bavaria/CorpusChristiTest.php | 10 +- tests/Germany/Bavaria/EpiphanyTest.php | 10 +- tests/Germany/Berlin/BerlinTest.php | 11 +- .../Berlin/InternationalWomensDay2019Test.php | 14 ++- tests/Germany/Brandenburg/BrandenburgTest.php | 11 +- .../Brandenburg/ReformationDayTest.php | 12 +- tests/Germany/Bremen/BremenTest.php | 11 +- tests/Germany/Bremen/ReformationDayTest.php | 12 +- tests/Germany/ChristmasTest.php | 10 +- tests/Germany/EasterMondayTest.php | 10 +- tests/Germany/GermanUnityDayTest.php | 12 +- tests/Germany/GermanyTest.php | 11 +- tests/Germany/GoodFridayTest.php | 10 +- .../Germany/Hamburg/DayOfReformationTest.php | 12 +- tests/Germany/Hamburg/HamburgTest.php | 11 +- tests/Germany/Hesse/CorpusChristiTest.php | 10 +- tests/Germany/Hesse/HesseTest.php | 11 +- tests/Germany/InternationalWorkersDayTest.php | 10 +- tests/Germany/LowerSaxony/LowerSaxonyTest.php | 11 +- .../LowerSaxony/ReformationDayTest.php | 12 +- .../MecklenburgWesternPomeraniaTest.php | 11 +- .../ReformationDayTest.php | 10 +- tests/Germany/NewYearsDayTest.php | 10 +- .../NorthRhineWestphalia/AllSaintsDayTest.php | 10 +- .../CorpusChristiTest.php | 10 +- .../NorthRhineWestphaliaTest.php | 11 +- tests/Germany/PentecostMondayTest.php | 10 +- tests/Germany/ReformationDay2017Test.php | 14 ++- .../RhinelandPalatinate/AllSaintsDayTest.php | 10 +- .../RhinelandPalatinate/CorpusChristiTest.php | 10 +- .../RhinelandPalatinateTest.php | 11 +- tests/Germany/Saarland/AllSaintsDayTest.php | 10 +- .../Germany/Saarland/AssumptionOfMaryTest.php | 10 +- tests/Germany/Saarland/CorpusChristiTest.php | 10 +- tests/Germany/Saarland/SaarlandTest.php | 11 +- tests/Germany/Saxony/ReformationDayTest.php | 12 +- .../Saxony/RepentanceAndPrayerDayTest.php | 12 +- tests/Germany/Saxony/SaxonyTest.php | 11 +- tests/Germany/SaxonyAnhalt/EpiphanyTest.php | 10 +- .../SaxonyAnhalt/ReformationDayTest.php | 12 +- .../Germany/SaxonyAnhalt/SaxonyAnhaltTest.php | 11 +- .../SchleswigHolstein/ReformationDayTest.php | 12 +- .../SchleswigHolsteinTest.php | 11 +- tests/Germany/SecondChristmasDayTest.php | 10 +- .../Germany/Thuringia/ReformationDayTest.php | 12 +- tests/Germany/Thuringia/ThuringiaTest.php | 11 +- tests/Greece/AnnunciationTest.php | 10 +- tests/Greece/AscensionDayTest.php | 10 +- tests/Greece/AssumptionOfMaryTest.php | 10 +- tests/Greece/ChristmasDayTest.php | 10 +- tests/Greece/CleanMondayTest.php | 10 +- tests/Greece/EasterMondayTest.php | 10 +- tests/Greece/EasterTest.php | 10 +- tests/Greece/EpiphanyTest.php | 10 +- tests/Greece/GreeceTest.php | 11 +- tests/Greece/IndepencenceDayTest.php | 12 +- tests/Greece/InternationalWorkersDayTest.php | 10 +- tests/Greece/NewYearsDayTest.php | 10 +- tests/Greece/OhiDayTest.php | 12 +- tests/Greece/PentecostMondayTest.php | 10 +- tests/Greece/PentecostTest.php | 10 +- tests/Greece/PolytechnioTest.php | 12 +- tests/Greece/ThreeHolyHierarchsTest.php | 10 +- tests/Greece/goodFridayTest.php | 10 +- tests/Hungary/AllSaintsDayTest.php | 10 +- tests/Hungary/ChristmasTest.php | 10 +- tests/Hungary/EasterMondayTest.php | 10 +- tests/Hungary/EasterTest.php | 10 +- tests/Hungary/HungaryTest.php | 11 +- tests/Hungary/InternationalWorkersDayTest.php | 10 +- tests/Hungary/MemorialDay1848Test.php | 12 +- tests/Hungary/MemorialDay1956Test.php | 12 +- tests/Hungary/NewYearsDayTest.php | 10 +- tests/Hungary/PentecostMondayTest.php | 10 +- tests/Hungary/PentecostTest.php | 10 +- tests/Hungary/SecondChristmasDayTest.php | 10 +- tests/Hungary/StateFoundationDayTest.php | 12 +- tests/Ireland/AugustHolidayTest.php | 12 +- tests/Ireland/ChristmasDayTest.php | 12 +- tests/Ireland/EasterMondayTest.php | 12 +- tests/Ireland/EasterTest.php | 12 +- tests/Ireland/GoodFridayTest.php | 12 +- tests/Ireland/IrelandTest.php | 11 +- tests/Ireland/JuneHolidayTest.php | 14 ++- tests/Ireland/MayDayTest.php | 14 ++- tests/Ireland/NewYearsDayTest.php | 14 ++- tests/Ireland/OctoberHolidayTest.php | 14 ++- tests/Ireland/PentecostTest.php | 12 +- tests/Ireland/StPatricksDayTest.php | 14 ++- tests/Ireland/StStephensDayTest.php | 12 +- tests/Ireland/pentecostMondayTest.php | 14 ++- tests/Italy/AllSaintsDayTest.php | 10 +- tests/Italy/AssumptionOfMaryTest.php | 10 +- tests/Italy/ChristmasTest.php | 10 +- tests/Italy/EasterMondayTest.php | 10 +- tests/Italy/EasterTest.php | 10 +- tests/Italy/EpiphanyTest.php | 10 +- tests/Italy/ImmaculateConceptionTest.php | 10 +- tests/Italy/InternationalWorkersDayTest.php | 10 +- tests/Italy/ItalyTest.php | 11 +- tests/Italy/LiberationDayTest.php | 12 +- tests/Italy/NewYearsDayTest.php | 10 +- tests/Italy/RepublicDayTest.php | 12 +- tests/Italy/stStephensDayTest.php | 10 +- tests/Japan/AutumnalEquinoxDayTest.php | 16 +-- tests/Japan/ChildrensDayTest.php | 16 +-- tests/Japan/ComingOfAgeDayTest.php | 16 +-- tests/Japan/ConstitutionMemorialDayTest.php | 16 +-- tests/Japan/CoronationDayTest.php | 14 ++- tests/Japan/CultureDayTest.php | 16 +-- tests/Japan/EmperorsBirthdayTest.php | 26 ++-- .../EnthronementProclamationCeremonyTest.php | 14 ++- tests/Japan/GreeneryDayTest.php | 24 ++-- tests/Japan/JapanTest.php | 13 +- tests/Japan/LabourThanksgivingDayTest.php | 16 +-- tests/Japan/MarineDayTest.php | 24 ++-- tests/Japan/MountainDayTest.php | 20 +-- tests/Japan/NationalFoundationDayTest.php | 16 +-- tests/Japan/NewYearsDayTest.php | 16 +-- tests/Japan/PublicBridgeDayTest.php | 10 +- tests/Japan/RespectForTheAgedDayTest.php | 20 +-- tests/Japan/ShowaDayTest.php | 16 +-- tests/Japan/SportsDayTest.php | 26 ++-- tests/Japan/VernalEquinoxDayTest.php | 16 +-- tests/Latvia/ChristmasDayTest.php | 15 ++- tests/Latvia/ChristmasEveDayTest.php | 15 ++- tests/Latvia/EasterDayTest.php | 16 ++- tests/Latvia/EasterMondayDayTest.php | 16 ++- tests/Latvia/GoodFridayDayTest.php | 16 ++- tests/Latvia/InternationalWorkersDayTest.php | 15 ++- tests/Latvia/LatviaTest.php | 11 +- tests/Latvia/MidsummerEveDayTest.php | 15 ++- tests/Latvia/NewYearsDayTest.php | 15 ++- tests/Latvia/NewYearsEveDayTest.php | 15 ++- ...oclamationOfTheRepublicOfLatviaDayTest.php | 18 +-- .../RestorationOfIndependenceDayTest.php | 18 +-- tests/Latvia/SecondChristmasDayTest.php | 15 ++- tests/Latvia/StJohnsDayTest.php | 15 ++- tests/Lithuania/AllSaintsDayTest.php | 15 ++- tests/Lithuania/AssumptionOfMaryDayTest.php | 15 ++- tests/Lithuania/ChristmasDayTest.php | 15 ++- tests/Lithuania/ChristmasEveDayTest.php | 15 ++- tests/Lithuania/EasterDayTest.php | 16 ++- tests/Lithuania/EasterMondayDayTest.php | 16 ++- .../Lithuania/InternationalWorkersDayTest.php | 15 ++- tests/Lithuania/LithuaniaTest.php | 11 +- tests/Lithuania/NewYearsDayTest.php | 15 ++- ...rationOfIndependenceOfLithuaniaDayTest.php | 16 ++- ...estorationOfTheStateOfLithuaniaDayTest.php | 16 ++- tests/Lithuania/SecondChristmasDayTest.php | 15 ++- tests/Lithuania/StJohnsDayTest.php | 15 ++- tests/Lithuania/StatehoodDayTest.php | 16 ++- tests/Netherlands/AscensionDayTest.php | 10 +- tests/Netherlands/AshWednesdayTest.php | 10 +- tests/Netherlands/ChristmasDayTest.php | 10 +- tests/Netherlands/CommemorationDayTest.php | 12 +- tests/Netherlands/EasterMondayTest.php | 10 +- tests/Netherlands/EasterTest.php | 10 +- tests/Netherlands/EpiphanyTest.php | 10 +- tests/Netherlands/FathersDayTest.php | 10 +- tests/Netherlands/GoodFridayTest.php | 10 +- tests/Netherlands/HalloweenTest.php | 10 +- .../InternationalWorkersDayTest.php | 10 +- tests/Netherlands/KingsDayTest.php | 16 +-- tests/Netherlands/LiberationDayTest.php | 12 +- tests/Netherlands/MothersDayTest.php | 10 +- tests/Netherlands/NetherlandsTest.php | 11 +- tests/Netherlands/NewYearsDayTest.php | 10 +- tests/Netherlands/PentecostTest.php | 10 +- tests/Netherlands/QueensDayTest.php | 30 ++--- tests/Netherlands/SummertimeTest.php | 10 +- tests/Netherlands/ValentinesDayTest.php | 10 +- tests/Netherlands/WintertimeTest.php | 10 +- tests/Netherlands/WorldAnimalDayTest.php | 12 +- tests/Netherlands/carnivalDayTest.php | 10 +- tests/Netherlands/pentecostMondayTest.php | 10 +- tests/Netherlands/princesDayTest.php | 10 +- tests/Netherlands/secondCarnivalDay.php | 38 +++--- tests/Netherlands/secondChristmasdayTest.php | 10 +- tests/Netherlands/stMartinsDayTest.php | 10 +- tests/Netherlands/stNicholasDayTest.php | 10 +- tests/Netherlands/thirdCarnivalDay.php | 38 +++--- tests/NewZealand/AnzacDayTest.php | 14 ++- tests/NewZealand/BoxingDayTest.php | 12 +- tests/NewZealand/ChristmasDayTest.php | 12 +- tests/NewZealand/DayAfterNewYearsDayTest.php | 12 +- tests/NewZealand/EasterMondayTest.php | 12 +- tests/NewZealand/GoodFridayTest.php | 12 +- tests/NewZealand/LabourDayTest.php | 14 ++- tests/NewZealand/NewYearsDayTest.php | 12 +- tests/NewZealand/NewZealandTest.php | 11 +- tests/NewZealand/QueensBirthdayTest.php | 12 +- tests/NewZealand/WaitangiDayTest.php | 14 ++- tests/Norway/AscensionDayTest.php | 10 +- tests/Norway/ChristmasDayTest.php | 10 +- tests/Norway/ConstitutionDayTest.php | 12 +- tests/Norway/EasterMondayTest.php | 10 +- tests/Norway/EasterTest.php | 10 +- tests/Norway/GoodFridayTest.php | 10 +- tests/Norway/InternationalWorkersDayTest.php | 10 +- tests/Norway/MaundyThursdayTest.php | 10 +- tests/Norway/NewYearsDayTest.php | 10 +- tests/Norway/NorwayTest.php | 11 +- tests/Norway/PentecostMondayTest.php | 10 +- tests/Norway/PentecostTest.php | 10 +- tests/Norway/SecondChristmasDayTest.php | 10 +- tests/Poland/AllSaintsDayTest.php | 10 +- tests/Poland/AssumptionOfMaryTest.php | 10 +- tests/Poland/ChristmasTest.php | 10 +- tests/Poland/ConstitutionDayTest.php | 12 +- tests/Poland/CorpusChristiTest.php | 10 +- tests/Poland/EasterMondayTest.php | 10 +- tests/Poland/EasterTest.php | 10 +- tests/Poland/EpiphanyTest.php | 10 +- tests/Poland/IndependenceDayTest.php | 12 +- tests/Poland/InternationalWorkersDayTest.php | 10 +- tests/Poland/NewYearsDayTest.php | 10 +- tests/Poland/PentecostTest.php | 10 +- tests/Poland/PolandTest.php | 11 +- tests/Poland/SecondChristmasDayTest.php | 10 +- tests/Portugal/AllSaintsDayTest.php | 16 +-- tests/Portugal/AssumptionOfMaryTest.php | 10 +- tests/Portugal/CarnationRevolutionDayTest.php | 12 +- tests/Portugal/ChristmasTest.php | 10 +- tests/Portugal/CorpusChristiTest.php | 12 +- tests/Portugal/EasterTest.php | 10 +- tests/Portugal/GoodFridayTest.php | 10 +- tests/Portugal/ImmaculateConceptionTest.php | 10 +- .../Portugal/InternationalWorkersDayTest.php | 10 +- tests/Portugal/NewYearsDayTest.php | 10 +- tests/Portugal/PortugalDayTest.php | 16 +-- tests/Portugal/PortugalTest.php | 11 +- tests/Portugal/PortugueseRepublicDayTest.php | 26 ++-- .../RestorationOfIndependenceTest.php | 26 ++-- tests/Romania/AssumptionOfMaryTest.php | 12 +- tests/Romania/ChildrensDayTest.php | 12 +- tests/Romania/ChristmasDayTest.php | 10 +- tests/Romania/ConstantinBrancusiDayTest.php | 12 +- tests/Romania/DayAfterNewYearsDayTest.php | 10 +- tests/Romania/EasterMondayTest.php | 10 +- tests/Romania/EasterTest.php | 10 +- tests/Romania/InternationalWorkersDayTest.php | 13 +- tests/Romania/NationalDayTest.php | 20 +-- tests/Romania/NewYearsDayTest.php | 10 +- tests/Romania/PentecostMondayTest.php | 12 +- tests/Romania/PentecostTest.php | 12 +- tests/Romania/RomaniaTest.php | 11 +- tests/Romania/SecondChristmasDayTest.php | 10 +- tests/Romania/StAndrewDayTest.php | 12 +- tests/Romania/UnitedPrincipalitiesDayTest.php | 12 +- .../Russia/DefenceOfTheFatherlandDayTest.php | 16 ++- tests/Russia/InternationalWomensDayTest.php | 15 ++- tests/Russia/NewYearHolidaysDay2Test.php | 15 ++- tests/Russia/NewYearHolidaysDay3Test.php | 15 ++- tests/Russia/NewYearHolidaysDay4Test.php | 15 ++- tests/Russia/NewYearHolidaysDay5Test.php | 15 ++- tests/Russia/NewYearHolidaysDay6Test.php | 15 ++- tests/Russia/NewYearHolidaysDay8Test.php | 15 ++- tests/Russia/NewYearsDayTest.php | 15 ++- tests/Russia/OrthodoxChristmasDayTest.php | 15 ++- tests/Russia/RussiaDayTest.php | 16 ++- tests/Russia/RussiaTest.php | 11 +- tests/Russia/SpringAndLabourDayTest.php | 15 ++- tests/Russia/UnityDayTest.php | 16 ++- tests/Russia/VictoryDayTest.php | 15 ++- tests/Slovakia/AllSaintsDayTest.php | 10 +- tests/Slovakia/ChristmasDayTest.php | 10 +- tests/Slovakia/ChristmasEveTest.php | 10 +- tests/Slovakia/EasterMondayTest.php | 10 +- tests/Slovakia/EpiphanyTest.php | 10 +- tests/Slovakia/GoodFridayTest.php | 10 +- .../Slovakia/InternationalWorkersDayTest.php | 10 +- tests/Slovakia/OurLadyOfSorrowsDayTest.php | 10 +- .../SaintsCyrilAndMethodiusDayTest.php | 10 +- tests/Slovakia/SecondChristmasDayTest.php | 10 +- tests/Slovakia/SlovakConstitutionDayTest.php | 10 +- tests/Slovakia/SlovakIndependeceDayTest.php | 10 +- .../SlovakNationalUprisingDayTest.php | 10 +- tests/Slovakia/SlovakiaTest.php | 11 +- .../StruggleForFreedomAndDemocracyDayTest.php | 10 +- tests/Slovakia/VictoryInEuropeDayTest.php | 10 +- tests/SouthAfrica/ChristmasDayTest.php | 14 ++- tests/SouthAfrica/FamilyDayTest.php | 14 ++- tests/SouthAfrica/FreedomDayTest.php | 14 ++- tests/SouthAfrica/GoodFridayTest.php | 14 ++- tests/SouthAfrica/HeritageDayTest.php | 14 ++- tests/SouthAfrica/HumanRightsDayTest.php | 14 ++- .../MunicipalElections2016DayTest.php | 14 ++- tests/SouthAfrica/NationalWomensDayTest.php | 14 ++- tests/SouthAfrica/NewYearsDayTest.php | 14 ++- tests/SouthAfrica/ReconciliationDayTest.php | 14 ++- tests/SouthAfrica/SecondChristmasDayTest.php | 14 ++- tests/SouthAfrica/SouthAfricaTest.php | 11 +- .../SubstituteDayOfGoodwillTest.php | 14 ++- tests/SouthAfrica/WorkersDayTest.php | 14 ++- tests/SouthAfrica/YouthDayTest.php | 14 ++- tests/SouthKorea/ArborDayTest.php | 14 ++- tests/SouthKorea/ArmedForcesDayTest.php | 14 ++- tests/SouthKorea/BuddhasBirthdayTest.php | 12 +- tests/SouthKorea/ChildrensDayTest.php | 24 ++-- tests/SouthKorea/ChristmasDayTest.php | 12 +- tests/SouthKorea/ChuseokTest.php | 20 +-- tests/SouthKorea/ConstitutionDayTest.php | 14 ++- tests/SouthKorea/GaecheonjeolTest.php | 12 +- tests/SouthKorea/HangulDayTest.php | 12 +- .../IndependenceMovementDayTest.php | 12 +- tests/SouthKorea/LiberationDayTest.php | 12 +- tests/SouthKorea/MemorialDayTest.php | 12 +- tests/SouthKorea/NewYearsDayTest.php | 14 ++- tests/SouthKorea/SeollalTest.php | 16 +-- tests/SouthKorea/SouthKoreaTest.php | 11 +- tests/Spain/AllSaintsDayTest.php | 10 +- tests/Spain/Andalusia/AndalusiaDayTest.php | 12 +- tests/Spain/Andalusia/AndalusiaTest.php | 11 +- tests/Spain/Aragon/AragonTest.php | 11 +- tests/Spain/Aragon/StGeorgesDayTest.php | 10 +- tests/Spain/AssumptionOfMaryTest.php | 10 +- tests/Spain/Asturias/AsturiasDayTest.php | 12 +- tests/Spain/Asturias/AsturiasTest.php | 11 +- .../BalearicIslandsDayTest.php | 12 +- .../BalearicIslands/BalearicIslandsTest.php | 11 +- .../BasqueCountry/BasqueCountryDayTest.php | 14 ++- .../Spain/BasqueCountry/BasqueCountryTest.php | 11 +- .../CanaryIslands/CanaryIslandsDayTest.php | 12 +- .../Spain/CanaryIslands/CanaryIslandsTest.php | 11 +- tests/Spain/Cantabria/CantabriaDayTest.php | 12 +- tests/Spain/Cantabria/CantabriaTest.php | 11 +- .../CastileAndLeon/CastileAndLeonDayTest.php | 12 +- .../CastileAndLeon/CastileAndLeonTest.php | 11 +- .../CastillaLaManchaDayTest.php | 12 +- .../CastillaLaMancha/CastillaLaManchaTest.php | 11 +- tests/Spain/Catalonia/CataloniaTest.php | 11 +- .../Catalonia/nationalCataloniaDayTest.php | 12 +- tests/Spain/Catalonia/stJohnsDayTest.php | 10 +- tests/Spain/Ceuta/CeutaTest.php | 11 +- tests/Spain/Ceuta/ceutaDayTest.php | 12 +- tests/Spain/ChristmasTest.php | 10 +- .../CommunityOfMadridTest.php | 11 +- .../DosdeMayoUprisingDayTest.php | 10 +- tests/Spain/ConstitutionDayTest.php | 12 +- tests/Spain/EasterMondayTest.php | 10 +- tests/Spain/EpiphanyTest.php | 10 +- .../Spain/Extremadura/ExtremaduraDayTest.php | 12 +- tests/Spain/Extremadura/ExtremaduraTest.php | 11 +- tests/Spain/Galicia/GaliciaTest.php | 11 +- .../Galicia/GalicianLiteratureDayTest.php | 12 +- tests/Spain/Galicia/stJamesDayTest.php | 12 +- tests/Spain/GoodFridayTest.php | 10 +- tests/Spain/ImmaculateConceptionTest.php | 10 +- tests/Spain/InternationalWorkersDayTest.php | 10 +- tests/Spain/LaRioja/LaRiojaDayTest.php | 12 +- tests/Spain/LaRioja/LaRiojaTest.php | 11 +- tests/Spain/MaundyThursdayTest.php | 10 +- tests/Spain/Melilla/MelillaTest.php | 11 +- tests/Spain/NationalDayTest.php | 12 +- tests/Spain/Navarre/NavarreTest.php | 11 +- tests/Spain/NewYearsDayTest.php | 10 +- .../RegionOfMurcia/RegionOfMurciaDayTest.php | 12 +- .../RegionOfMurcia/RegionOfMurciaTest.php | 11 +- tests/Spain/SpainTest.php | 11 +- .../ValencianCommunityDayTest.php | 12 +- .../ValencianCommunityTest.php | 11 +- tests/Spain/ValentinesDayTest.php | 10 +- tests/Spain/stJosephsDayTest.php | 10 +- tests/Sweden/AllSaintsDayTest.php | 10 +- tests/Sweden/AllSaintsEveTest.php | 10 +- tests/Sweden/AscensionDayTest.php | 10 +- tests/Sweden/ChristmasDayTest.php | 10 +- tests/Sweden/ChristmasEveTest.php | 10 +- tests/Sweden/EasterMondayTest.php | 10 +- tests/Sweden/EasterTest.php | 10 +- tests/Sweden/EpiphanyEveTest.php | 10 +- tests/Sweden/EpiphanyTest.php | 10 +- tests/Sweden/GoodFridayTest.php | 10 +- tests/Sweden/InternationalWorkersDayTest.php | 10 +- tests/Sweden/NationalDayTest.php | 14 ++- tests/Sweden/NewYearsDayTest.php | 10 +- tests/Sweden/NewYearsEveTest.php | 10 +- tests/Sweden/PentecostTest.php | 10 +- tests/Sweden/SecondChristmasDayTest.php | 10 +- tests/Sweden/StJohnsDayTest.php | 7 +- tests/Sweden/StJohnsEveTest.php | 7 +- tests/Sweden/SwedenTest.php | 11 +- tests/Sweden/WalpurgisEveTest.php | 10 +- tests/Switzerland/Aargau/AargauTest.php | 13 +- tests/Switzerland/Aargau/AscensionDayTest.php | 10 +- tests/Switzerland/Aargau/ChristmasDayTest.php | 10 +- tests/Switzerland/Aargau/GoodFridayTest.php | 10 +- tests/Switzerland/Aargau/NewYearsDayTest.php | 10 +- .../AppenzellAusserrhodenTest.php | 13 +- .../AscensionDayTest.php | 10 +- .../ChristmasDayTest.php | 10 +- .../EasterMondayTest.php | 10 +- .../AppenzellAusserrhoden/GoodFridayTest.php | 10 +- .../AppenzellAusserrhoden/NewYearsDayTest.php | 10 +- .../PentecostMondayTest.php | 10 +- .../StStephensDayTest.php | 10 +- .../AppenzellInnerrhoden/AllSaintsDayTest.php | 10 +- .../AppenzellInnerrhodenTest.php | 13 +- .../AppenzellInnerrhoden/AscensionDayTest.php | 10 +- .../AssumptionOfMaryTest.php | 10 +- .../AppenzellInnerrhoden/ChristmasDayTest.php | 10 +- .../CorpusChristiTest.php | 10 +- .../AppenzellInnerrhoden/EasterMondayTest.php | 10 +- .../AppenzellInnerrhoden/GoodFridayTest.php | 10 +- .../ImmaculateConceptionTest.php | 10 +- .../AppenzellInnerrhoden/NewYearsDayTest.php | 10 +- .../PentecostMondayTest.php | 10 +- .../StStephensDayTest.php | 10 +- .../BaselLandschaft/AscensionDayTest.php | 10 +- .../BaselLandschaft/BaselLandschaftTest.php | 13 +- .../BaselLandschaft/ChristmasDayTest.php | 10 +- .../BaselLandschaft/EasterMondayTest.php | 10 +- .../BaselLandschaft/GoodFridayTest.php | 10 +- .../BaselLandschaft/NewYearsDayTest.php | 10 +- .../BaselLandschaft/PentecostMondayTest.php | 10 +- .../BaselLandschaft/StStephensDayTest.php | 10 +- .../BaselLandschaft/WorkersDayTest.php | 12 +- .../BaselStadt/AscensionDayTest.php | 10 +- .../Switzerland/BaselStadt/BaselStadtTest.php | 13 +- .../BaselStadt/ChristmasDayTest.php | 10 +- .../BaselStadt/EasterMondayTest.php | 10 +- .../Switzerland/BaselStadt/GoodFridayTest.php | 10 +- .../BaselStadt/NewYearsDayTest.php | 10 +- .../BaselStadt/PentecostMondayTest.php | 10 +- .../BaselStadt/StStephensDayTest.php | 10 +- .../Switzerland/BaselStadt/WorkersDayTest.php | 12 +- tests/Switzerland/Bern/AscensionDayTest.php | 10 +- tests/Switzerland/Bern/BerchtoldsTagTest.php | 10 +- tests/Switzerland/Bern/BernTest.php | 13 +- tests/Switzerland/Bern/ChristmasDayTest.php | 10 +- tests/Switzerland/Bern/EasterMondayTest.php | 10 +- tests/Switzerland/Bern/GoodFridayTest.php | 10 +- tests/Switzerland/Bern/NewYearsDayTest.php | 10 +- .../Switzerland/Bern/PentecostMondayTest.php | 10 +- tests/Switzerland/Bern/StStephensDayTest.php | 10 +- .../Switzerland/Fribourg/AscensionDayTest.php | 10 +- .../Switzerland/Fribourg/ChristmasDayTest.php | 10 +- .../Switzerland/Fribourg/EasterMondayTest.php | 10 +- tests/Switzerland/Fribourg/FribourgTest.php | 13 +- tests/Switzerland/Fribourg/GoodFridayTest.php | 10 +- .../Switzerland/Fribourg/NewYearsDayTest.php | 10 +- .../Fribourg/PentecostMondayTest.php | 10 +- tests/Switzerland/Geneva/AscensionDayTest.php | 10 +- tests/Switzerland/Geneva/ChristmasDayTest.php | 10 +- tests/Switzerland/Geneva/EasterMondayTest.php | 10 +- tests/Switzerland/Geneva/GenevaTest.php | 13 +- tests/Switzerland/Geneva/GoodFridayTest.php | 10 +- .../Switzerland/Geneva/JeuneGenevoisTest.php | 20 +-- tests/Switzerland/Geneva/NewYearsDayTest.php | 10 +- .../Geneva/PentecostMondayTest.php | 10 +- .../Geneva/RestaurationGenevoiseTest.php | 10 +- tests/Switzerland/Glarus/AllSaintsDayTest.php | 10 +- tests/Switzerland/Glarus/AscensionDayTest.php | 10 +- .../Switzerland/Glarus/BerchtoldsTagTest.php | 10 +- tests/Switzerland/Glarus/ChristmasDayTest.php | 10 +- tests/Switzerland/Glarus/EasterMondayTest.php | 10 +- tests/Switzerland/Glarus/GlarusTest.php | 13 +- tests/Switzerland/Glarus/GoodFridayTest.php | 10 +- .../Switzerland/Glarus/NafelserFahrtTest.php | 12 +- tests/Switzerland/Glarus/NewYearsDayTest.php | 10 +- .../Glarus/PentecostMondayTest.php | 10 +- .../Switzerland/Glarus/StStephensDayTest.php | 10 +- .../Switzerland/Grisons/AscensionDayTest.php | 10 +- .../Switzerland/Grisons/ChristmasDayTest.php | 10 +- .../Switzerland/Grisons/EasterMondayTest.php | 10 +- tests/Switzerland/Grisons/GoodFridayTest.php | 10 +- tests/Switzerland/Grisons/GrisonsTest.php | 13 +- tests/Switzerland/Grisons/NewYearsDayTest.php | 10 +- .../Grisons/PentecostMondayTest.php | 10 +- .../Switzerland/Grisons/StStephensDayTest.php | 10 +- tests/Switzerland/Jura/AllSaintsDayTest.php | 10 +- tests/Switzerland/Jura/AscensionDayTest.php | 10 +- .../Switzerland/Jura/AssumptionOfMaryTest.php | 10 +- tests/Switzerland/Jura/BerchtoldsTagTest.php | 10 +- tests/Switzerland/Jura/ChristmasDayTest.php | 10 +- tests/Switzerland/Jura/CorpusChristiTest.php | 10 +- tests/Switzerland/Jura/EasterMondayTest.php | 10 +- tests/Switzerland/Jura/GoodFridayTest.php | 10 +- tests/Switzerland/Jura/JuraTest.php | 13 +- tests/Switzerland/Jura/NewYearsDayTest.php | 10 +- .../Switzerland/Jura/PentecostMondayTest.php | 10 +- .../Jura/PlebisciteJurassienTest.php | 12 +- tests/Switzerland/Jura/WorkersDayTest.php | 12 +- .../Switzerland/Lucerne/AllSaintsDayTest.php | 10 +- .../Switzerland/Lucerne/AscensionDayTest.php | 10 +- .../Lucerne/AssumptionOfMaryTest.php | 10 +- .../Switzerland/Lucerne/BerchtoldsTagTest.php | 10 +- .../Switzerland/Lucerne/ChristmasDayTest.php | 10 +- .../Switzerland/Lucerne/CorpusChristiTest.php | 10 +- .../Switzerland/Lucerne/EasterMondayTest.php | 10 +- tests/Switzerland/Lucerne/GoodFridayTest.php | 10 +- .../Lucerne/ImmaculateConceptionTest.php | 10 +- tests/Switzerland/Lucerne/LucerneTest.php | 13 +- tests/Switzerland/Lucerne/NewYearsDayTest.php | 10 +- .../Lucerne/PentecostMondayTest.php | 10 +- .../Switzerland/Lucerne/StStephensDayTest.php | 10 +- .../Neuchatel/AscensionDayTest.php | 10 +- .../Neuchatel/BerchtoldsTagTest.php | 10 +- .../Neuchatel/BettagsMontagTest.php | 12 +- .../Neuchatel/ChristmasDayTest.php | 10 +- .../Neuchatel/EasterMondayTest.php | 10 +- .../Switzerland/Neuchatel/GoodFridayTest.php | 10 +- .../Neuchatel/InstaurationRepubliqueTest.php | 12 +- tests/Switzerland/Neuchatel/NeuchatelTest.php | 13 +- .../Switzerland/Neuchatel/NewYearsDayTest.php | 10 +- .../Neuchatel/PentecostMondayTest.php | 10 +- .../Switzerland/Neuchatel/WorkersDayTest.php | 12 +- .../Nidwalden/AllSaintsDayTest.php | 10 +- .../Nidwalden/AscensionDayTest.php | 10 +- .../Nidwalden/AssumptionOfMaryTest.php | 10 +- .../Nidwalden/ChristmasDayTest.php | 10 +- .../Nidwalden/CorpusChristiTest.php | 10 +- .../Nidwalden/EasterMondayTest.php | 10 +- .../Switzerland/Nidwalden/GoodFridayTest.php | 10 +- .../Nidwalden/ImmaculateConceptionTest.php | 10 +- .../Switzerland/Nidwalden/NewYearsDayTest.php | 10 +- tests/Switzerland/Nidwalden/NidwaldenTest.php | 13 +- .../Nidwalden/PentecostMondayTest.php | 10 +- .../Switzerland/Nidwalden/StJosephDayTest.php | 13 +- .../Nidwalden/StStephensDayTest.php | 10 +- .../Switzerland/Obwalden/AllSaintsDayTest.php | 10 +- .../Switzerland/Obwalden/AscensionDayTest.php | 10 +- .../Obwalden/AssumptionOfMaryTest.php | 10 +- .../Obwalden/BerchtoldsTagTest.php | 10 +- .../Obwalden/BruderKlausenFestTest.php | 16 +-- .../Switzerland/Obwalden/ChristmasDayTest.php | 10 +- .../Obwalden/CorpusChristiTest.php | 10 +- .../Switzerland/Obwalden/EasterMondayTest.php | 10 +- tests/Switzerland/Obwalden/GoodFridayTest.php | 10 +- .../Obwalden/ImmaculateConceptionTest.php | 10 +- .../Switzerland/Obwalden/NewYearsDayTest.php | 10 +- tests/Switzerland/Obwalden/ObwaldenTest.php | 13 +- .../Obwalden/PentecostMondayTest.php | 10 +- .../Obwalden/StStephensDayTest.php | 10 +- .../Schaffhausen/AscensionDayTest.php | 10 +- .../Schaffhausen/BerchtoldsTagTest.php | 10 +- .../Schaffhausen/ChristmasDayTest.php | 10 +- .../Schaffhausen/EasterMondayTest.php | 10 +- .../Schaffhausen/GoodFridayTest.php | 10 +- .../Schaffhausen/NewYearsDayTest.php | 10 +- .../Schaffhausen/PentecostMondayTest.php | 10 +- .../Schaffhausen/SchaffhausenTest.php | 13 +- .../Schaffhausen/StStephensDayTest.php | 10 +- .../Schaffhausen/WorkersDayTest.php | 12 +- tests/Switzerland/Schwyz/AllSaintsDayTest.php | 10 +- tests/Switzerland/Schwyz/AscensionDayTest.php | 10 +- .../Schwyz/AssumptionOfMaryTest.php | 10 +- tests/Switzerland/Schwyz/ChristmasDayTest.php | 10 +- .../Switzerland/Schwyz/CorpusChristiTest.php | 10 +- tests/Switzerland/Schwyz/EasterMondayTest.php | 10 +- tests/Switzerland/Schwyz/EpiphanyTest.php | 10 +- tests/Switzerland/Schwyz/GoodFridayTest.php | 10 +- .../Schwyz/ImmaculateConceptionTest.php | 10 +- tests/Switzerland/Schwyz/NewYearsDayTest.php | 10 +- .../Schwyz/PentecostMondayTest.php | 10 +- tests/Switzerland/Schwyz/SchwyzTest.php | 13 +- tests/Switzerland/Schwyz/StJosephDayTest.php | 13 +- .../Switzerland/Schwyz/StStephensDayTest.php | 10 +- .../Solothurn/AscensionDayTest.php | 10 +- .../Solothurn/BerchtoldsTagTest.php | 10 +- .../Solothurn/ChristmasDayTest.php | 10 +- .../Switzerland/Solothurn/GoodFridayTest.php | 10 +- .../Switzerland/Solothurn/NewYearsDayTest.php | 10 +- tests/Switzerland/Solothurn/SolothurnTest.php | 13 +- .../Switzerland/StGallen/AllSaintsDayTest.php | 10 +- .../Switzerland/StGallen/AscensionDayTest.php | 10 +- .../Switzerland/StGallen/ChristmasDayTest.php | 10 +- .../Switzerland/StGallen/EasterMondayTest.php | 10 +- tests/Switzerland/StGallen/GoodFridayTest.php | 10 +- .../Switzerland/StGallen/NewYearsDayTest.php | 10 +- .../StGallen/PentecostMondayTest.php | 10 +- tests/Switzerland/StGallen/StGallenTest.php | 13 +- .../StGallen/StStephensDayTest.php | 10 +- tests/Switzerland/SwissNationalDayTest.php | 26 ++-- tests/Switzerland/SwitzerlandTest.php | 11 +- .../Switzerland/Thurgau/AscensionDayTest.php | 10 +- .../Switzerland/Thurgau/BerchtoldsTagTest.php | 10 +- .../Switzerland/Thurgau/ChristmasDayTest.php | 10 +- .../Switzerland/Thurgau/EasterMondayTest.php | 10 +- tests/Switzerland/Thurgau/GoodFridayTest.php | 10 +- tests/Switzerland/Thurgau/NewYearsDayTest.php | 10 +- .../Thurgau/PentecostMondayTest.php | 10 +- .../Switzerland/Thurgau/StStephensDayTest.php | 10 +- tests/Switzerland/Thurgau/ThurgauTest.php | 13 +- tests/Switzerland/Thurgau/WorkersDayTest.php | 12 +- tests/Switzerland/Ticino/AllSaintsDayTest.php | 10 +- tests/Switzerland/Ticino/AscensionDayTest.php | 10 +- .../Ticino/AssumptionOfMaryTest.php | 10 +- tests/Switzerland/Ticino/ChristmasDayTest.php | 10 +- .../Switzerland/Ticino/CorpusChristiTest.php | 10 +- tests/Switzerland/Ticino/EasterMondayTest.php | 10 +- tests/Switzerland/Ticino/EpiphanyTest.php | 10 +- .../Ticino/ImmaculateConceptionTest.php | 10 +- tests/Switzerland/Ticino/NewYearsDayTest.php | 10 +- .../Ticino/PentecostMondayTest.php | 10 +- tests/Switzerland/Ticino/StJosephDayTest.php | 13 +- tests/Switzerland/Ticino/StPeterPaulTest.php | 13 +- .../Switzerland/Ticino/StStephensDayTest.php | 10 +- tests/Switzerland/Ticino/TicinoTest.php | 13 +- tests/Switzerland/Ticino/WorkersDayTest.php | 12 +- tests/Switzerland/Uri/AllSaintsDayTest.php | 10 +- tests/Switzerland/Uri/AscensionDayTest.php | 10 +- .../Switzerland/Uri/AssumptionOfMaryTest.php | 10 +- tests/Switzerland/Uri/ChristmasDayTest.php | 10 +- tests/Switzerland/Uri/CorpusChristiTest.php | 10 +- tests/Switzerland/Uri/EasterMondayTest.php | 10 +- tests/Switzerland/Uri/EpiphanyTest.php | 10 +- tests/Switzerland/Uri/GoodFridayTest.php | 10 +- .../Uri/ImmaculateConceptionTest.php | 10 +- tests/Switzerland/Uri/NewYearsDayTest.php | 10 +- tests/Switzerland/Uri/PentecostMondayTest.php | 10 +- tests/Switzerland/Uri/StJosephDayTest.php | 13 +- tests/Switzerland/Uri/StStephensDayTest.php | 10 +- tests/Switzerland/Uri/UriTest.php | 13 +- tests/Switzerland/Valais/AllSaintsDayTest.php | 10 +- tests/Switzerland/Valais/AscensionDayTest.php | 10 +- .../Valais/AssumptionOfMaryTest.php | 10 +- tests/Switzerland/Valais/ChristmasDayTest.php | 10 +- .../Switzerland/Valais/CorpusChristiTest.php | 10 +- .../Valais/ImmaculateConceptionTest.php | 10 +- tests/Switzerland/Valais/NewYearsDayTest.php | 10 +- tests/Switzerland/Valais/StJosephDayTest.php | 13 +- tests/Switzerland/Valais/ValaisTest.php | 13 +- tests/Switzerland/Vaud/AscensionDayTest.php | 10 +- tests/Switzerland/Vaud/BerchtoldsTagTest.php | 10 +- tests/Switzerland/Vaud/BettagsMontagTest.php | 12 +- tests/Switzerland/Vaud/ChristmasDayTest.php | 10 +- tests/Switzerland/Vaud/EasterMondayTest.php | 10 +- tests/Switzerland/Vaud/GoodFridayTest.php | 10 +- tests/Switzerland/Vaud/NewYearsDayTest.php | 10 +- .../Switzerland/Vaud/PentecostMondayTest.php | 10 +- tests/Switzerland/Vaud/VaudTest.php | 13 +- tests/Switzerland/Zug/AllSaintsDayTest.php | 10 +- tests/Switzerland/Zug/AscensionDayTest.php | 10 +- .../Switzerland/Zug/AssumptionOfMaryTest.php | 10 +- tests/Switzerland/Zug/BerchtoldsTagTest.php | 10 +- tests/Switzerland/Zug/ChristmasDayTest.php | 10 +- tests/Switzerland/Zug/CorpusChristiTest.php | 10 +- tests/Switzerland/Zug/EasterMondayTest.php | 10 +- tests/Switzerland/Zug/GoodFridayTest.php | 10 +- .../Zug/ImmaculateConceptionTest.php | 10 +- tests/Switzerland/Zug/NewYearsDayTest.php | 10 +- tests/Switzerland/Zug/PentecostMondayTest.php | 10 +- tests/Switzerland/Zug/StStephensDayTest.php | 10 +- tests/Switzerland/Zug/ZugTest.php | 13 +- tests/Switzerland/Zurich/AscensionDayTest.php | 10 +- .../Switzerland/Zurich/BerchtoldsTagTest.php | 10 +- tests/Switzerland/Zurich/ChristmasDayTest.php | 10 +- tests/Switzerland/Zurich/EasterMondayTest.php | 10 +- tests/Switzerland/Zurich/GoodFridayTest.php | 10 +- tests/Switzerland/Zurich/NewYearsDayTest.php | 10 +- .../Zurich/PentecostMondayTest.php | 10 +- .../Switzerland/Zurich/StStephensDayTest.php | 10 +- tests/Switzerland/Zurich/WorkersDayTest.php | 12 +- tests/Switzerland/Zurich/ZurichTest.php | 13 +- tests/USA/ChristmasDayTest.php | 18 +-- tests/USA/ColumbusDayTest.php | 16 +-- tests/USA/IndependenceDayTest.php | 20 +-- tests/USA/LabourDayTest.php | 12 +- tests/USA/MartinLutherKingDayTest.php | 12 +- tests/USA/MemorialDayTest.php | 16 +-- tests/USA/NewYearsDayTest.php | 18 +-- tests/USA/ThanksgivingDayTest.php | 12 +- tests/USA/USATest.php | 11 +- tests/USA/VeteransDayTest.php | 24 ++-- tests/USA/WashingtonsBirthdayTest.php | 16 +-- tests/Ukraine/ChristmasDayTest.php | 10 +- tests/Ukraine/ConstitutionDayTest.php | 14 ++- tests/Ukraine/DefenderOfUkraineDayTest.php | 14 ++- tests/Ukraine/EasterTest.php | 10 +- tests/Ukraine/IndependenceDayTest.php | 14 ++- tests/Ukraine/InternationalWomensDayTest.php | 13 +- tests/Ukraine/InternationalWorkersDayTest.php | 13 +- tests/Ukraine/NewYearsDayTest.php | 13 +- tests/Ukraine/PentecostTest.php | 10 +- .../SecondInternationalWorkersDayTest.php | 13 +- tests/Ukraine/UkraineTest.php | 11 +- tests/Ukraine/VictoryDayTest.php | 13 +- tests/UnitedKingdom/BoxingDayTest.php | 12 +- tests/UnitedKingdom/ChristmasDayTest.php | 12 +- tests/UnitedKingdom/EasterMondayTest.php | 12 +- tests/UnitedKingdom/GoodFridayTest.php | 10 +- tests/UnitedKingdom/MayDayBankHolidayTest.php | 14 ++- tests/UnitedKingdom/NewYearsDayTest.php | 16 +-- tests/UnitedKingdom/SpringBankHolidayTest.php | 14 ++- tests/UnitedKingdom/SummerBankHolidayTest.php | 16 +-- tests/UnitedKingdom/UnitedKingdomTest.php | 11 +- tests/YasumiBase.php | 93 +++++++------- 920 files changed, 6239 insertions(+), 4403 deletions(-) diff --git a/tests/Australia/ACT/ACTTest.php b/tests/Australia/ACT/ACTTest.php index 718f548f7..387bc47e9 100644 --- a/tests/Australia/ACT/ACTTest.php +++ b/tests/Australia/ACT/ACTTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\ACT; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class ACTTest extends ACTBaseTestCase /** * Tests if all official holidays in ACT (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/ACT/CanberraDayTest.php b/tests/Australia/ACT/CanberraDayTest.php index af456528a..fcc1d10c6 100644 --- a/tests/Australia/ACT/CanberraDayTest.php +++ b/tests/Australia/ACT/CanberraDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class CanberraDayTest extends ACTBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -79,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/ACT/EasterSaturdayTest.php b/tests/Australia/ACT/EasterSaturdayTest.php index 37fb0dc7e..e09bc6b2a 100644 --- a/tests/Australia/ACT/EasterSaturdayTest.php +++ b/tests/Australia/ACT/EasterSaturdayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class EasterSaturdayTest extends ACTBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -72,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -86,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/ACT/EasterSundayTest.php b/tests/Australia/ACT/EasterSundayTest.php index b328e1d58..126685603 100644 --- a/tests/Australia/ACT/EasterSundayTest.php +++ b/tests/Australia/ACT/EasterSundayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class EasterSundayTest extends ACTBaseTestCase implements YasumiTestCaseInterfac * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -52,7 +54,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -70,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -84,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/ACT/LabourDayTest.php b/tests/Australia/ACT/LabourDayTest.php index c5a0fcba5..071d6ed3e 100644 --- a/tests/Australia/ACT/LabourDayTest.php +++ b/tests/Australia/ACT/LabourDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class LabourDayTest extends ACTBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/ACT/QueensBirthdayTest.php b/tests/Australia/ACT/QueensBirthdayTest.php index 9850e6a4e..2125ade57 100644 --- a/tests/Australia/ACT/QueensBirthdayTest.php +++ b/tests/Australia/ACT/QueensBirthdayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class QueensBirthdayTest extends ACTBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -79,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/ACT/ReconciliationDayTest.php b/tests/Australia/ACT/ReconciliationDayTest.php index c7afb9aca..2a12b8851 100644 --- a/tests/Australia/ACT/ReconciliationDayTest.php +++ b/tests/Australia/ACT/ReconciliationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class ReconciliationDayTest extends ACTBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -81,7 +83,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -95,7 +97,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/AnzacDayTest.php b/tests/Australia/AnzacDayTest.php index 4a84f2209..b0a501180 100644 --- a/tests/Australia/AnzacDayTest.php +++ b/tests/Australia/AnzacDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class AnzacDayTest extends AustraliaBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -55,7 +57,7 @@ public function testHoliday($year, $expected) /** * Tests that ANZAC Day is not present before 1921 - * @throws \ReflectionException + * @throws ReflectionException */ public function testNotHoliday() { @@ -89,7 +91,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -103,7 +105,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/AustraliaDayTest.php b/tests/Australia/AustraliaDayTest.php index 133331d9d..013731280 100644 --- a/tests/Australia/AustraliaDayTest.php +++ b/tests/Australia/AustraliaDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class AustraliaDayTest extends AustraliaBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -51,7 +53,7 @@ public function testHoliday($year, $expected) /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -65,7 +67,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/AustraliaTest.php b/tests/Australia/AustraliaTest.php index 5a0a5b8ed..c0433f410 100644 --- a/tests/Australia/AustraliaTest.php +++ b/tests/Australia/AustraliaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class AustraliaTest extends AustraliaBaseTestCase /** * Tests if all official holidays in Australia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -43,7 +44,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Australia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -52,7 +53,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Australia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -61,7 +62,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Australia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -70,7 +71,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Australia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Australia/BoxingDayTest.php b/tests/Australia/BoxingDayTest.php index 67384a43e..9e688156a 100644 --- a/tests/Australia/BoxingDayTest.php +++ b/tests/Australia/BoxingDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -37,8 +39,8 @@ class BoxingDayTest extends AustraliaBaseTestCase implements YasumiTestCaseInter * @param string $expected the expected date * @param string $expectedExtra the expected date for the additional holiday, or null if no additional holiday * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected, $expectedExtra) { @@ -91,7 +93,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -112,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/ChristmasDayTest.php b/tests/Australia/ChristmasDayTest.php index 946501a2c..3af53866e 100644 --- a/tests/Australia/ChristmasDayTest.php +++ b/tests/Australia/ChristmasDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -37,8 +39,8 @@ class ChristmasDayTest extends AustraliaBaseTestCase implements YasumiTestCaseIn * @param string $expected the expected date * @param string $expectedExtra the expected date for the additional holiday, or null if no additional holiday * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected, $expectedExtra) { @@ -91,7 +93,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -112,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/EasterMondayTest.php b/tests/Australia/EasterMondayTest.php index c76c27be4..74a228f78 100644 --- a/tests/Australia/EasterMondayTest.php +++ b/tests/Australia/EasterMondayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -37,8 +39,8 @@ class EasterMondayTest extends AustraliaBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -58,8 +60,8 @@ public function testHoliday($year, $expected) * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday2($year, $expected) { @@ -75,7 +77,7 @@ public function testHoliday2($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -112,7 +114,7 @@ public function HolidayDataProvider2(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -133,7 +135,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/GoodFridayTest.php b/tests/Australia/GoodFridayTest.php index 6ef86da14..7bd86a7ea 100644 --- a/tests/Australia/GoodFridayTest.php +++ b/tests/Australia/GoodFridayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class GoodFridayTest extends AustraliaBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -71,7 +73,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -85,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/NSW/BankHolidayTest.php b/tests/Australia/NSW/BankHolidayTest.php index f01cdbd45..d309db2d4 100644 --- a/tests/Australia/NSW/BankHolidayTest.php +++ b/tests/Australia/NSW/BankHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class BankHolidayTest extends NSWBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/NSW/EasterSaturdayTest.php b/tests/Australia/NSW/EasterSaturdayTest.php index 78b846c64..6ee28c8d8 100644 --- a/tests/Australia/NSW/EasterSaturdayTest.php +++ b/tests/Australia/NSW/EasterSaturdayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class EasterSaturdayTest extends NSWBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -72,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -86,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/NSW/EasterSundayTest.php b/tests/Australia/NSW/EasterSundayTest.php index c77663ff1..32160c0c6 100644 --- a/tests/Australia/NSW/EasterSundayTest.php +++ b/tests/Australia/NSW/EasterSundayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class EasterSundayTest extends NSWBaseTestCase implements YasumiTestCaseInterfac * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -52,7 +54,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -70,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -84,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/NSW/LabourDayTest.php b/tests/Australia/NSW/LabourDayTest.php index 698ce5c23..15b9c91eb 100644 --- a/tests/Australia/NSW/LabourDayTest.php +++ b/tests/Australia/NSW/LabourDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class LabourDayTest extends NSWBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/NSW/NSWTest.php b/tests/Australia/NSW/NSWTest.php index fb9ce3217..d66da4301 100644 --- a/tests/Australia/NSW/NSWTest.php +++ b/tests/Australia/NSW/NSWTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\NSW; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class NSWTest extends NSWBaseTestCase /** * Tests if all official holidays in NSW (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all bank holidays in NSW (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { diff --git a/tests/Australia/NSW/QueensBirthdayTest.php b/tests/Australia/NSW/QueensBirthdayTest.php index 1065a25a4..254da0615 100644 --- a/tests/Australia/NSW/QueensBirthdayTest.php +++ b/tests/Australia/NSW/QueensBirthdayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class QueensBirthdayTest extends NSWBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -79,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/NT/EasterSaturdayTest.php b/tests/Australia/NT/EasterSaturdayTest.php index 7a6f5001f..f6c289787 100644 --- a/tests/Australia/NT/EasterSaturdayTest.php +++ b/tests/Australia/NT/EasterSaturdayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class EasterSaturdayTest extends NTBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -72,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -86,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/NT/MayDayTest.php b/tests/Australia/NT/MayDayTest.php index 6fa96c1c8..35d72a562 100644 --- a/tests/Australia/NT/MayDayTest.php +++ b/tests/Australia/NT/MayDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class MayDayTest extends NTBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/NT/NTTest.php b/tests/Australia/NT/NTTest.php index 8b678cc5c..95a9d30fe 100644 --- a/tests/Australia/NT/NTTest.php +++ b/tests/Australia/NT/NTTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\NT; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class NTTest extends NTBaseTestCase /** * Tests if all official holidays in NT (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/NT/PicnicDayTest.php b/tests/Australia/NT/PicnicDayTest.php index d7e8ea14b..f5afa5f88 100644 --- a/tests/Australia/NT/PicnicDayTest.php +++ b/tests/Australia/NT/PicnicDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class PicnicDayTest extends NTBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/NT/QueensBirthdayTest.php b/tests/Australia/NT/QueensBirthdayTest.php index de9d93cb6..978999457 100644 --- a/tests/Australia/NT/QueensBirthdayTest.php +++ b/tests/Australia/NT/QueensBirthdayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class QueensBirthdayTest extends NTBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -79,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/NewYearsDayTest.php b/tests/Australia/NewYearsDayTest.php index 822f0d60f..7586c41bf 100644 --- a/tests/Australia/NewYearsDayTest.php +++ b/tests/Australia/NewYearsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -37,8 +39,8 @@ class NewYearsDayTest extends AustraliaBaseTestCase implements YasumiTestCaseInt * @param string $expected the expected date * @param string $expectedExtra the expected date for the additional holiday, or null if no additional holiday * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected, $expectedExtra) { @@ -91,7 +93,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -112,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php index 285954aac..0485cff49 100644 --- a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php +++ b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\Queensland\Brisbane; +use ReflectionException; use Yasumi\Holiday; /** @@ -27,7 +28,7 @@ class BrisbaneTest extends BrisbaneBaseTestCase /** * Tests if all official holidays in Queensland (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php index 6c5c30a8a..df584d71f 100644 --- a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php +++ b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class PeoplesDayTest extends BrisbaneBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Queensland/LabourDayTest.php b/tests/Australia/Queensland/LabourDayTest.php index 08c04d4da..958e94697 100644 --- a/tests/Australia/Queensland/LabourDayTest.php +++ b/tests/Australia/Queensland/LabourDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class LabourDayTest extends QueenslandBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Queensland/QueensBirthdayTest.php b/tests/Australia/Queensland/QueensBirthdayTest.php index c18e6c045..7fcb8e029 100644 --- a/tests/Australia/Queensland/QueensBirthdayTest.php +++ b/tests/Australia/Queensland/QueensBirthdayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class QueensBirthdayTest extends QueenslandBaseTestCase implements YasumiTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -79,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Queensland/QueenslandTest.php b/tests/Australia/Queensland/QueenslandTest.php index 32b4d5df6..06cb51478 100644 --- a/tests/Australia/Queensland/QueenslandTest.php +++ b/tests/Australia/Queensland/QueenslandTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\Queensland; +use ReflectionException; use Yasumi\Holiday; /** @@ -27,7 +28,7 @@ class QueenslandTest extends QueenslandBaseTestCase /** * Tests if all official holidays in Queensland (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/SA/AdelaideCupDayTest.php b/tests/Australia/SA/AdelaideCupDayTest.php index c8b9c98f2..f72269975 100644 --- a/tests/Australia/SA/AdelaideCupDayTest.php +++ b/tests/Australia/SA/AdelaideCupDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class AdelaideCupDayTest extends SABaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -89,7 +91,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -103,7 +105,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/SA/ChristmasDayTest.php b/tests/Australia/SA/ChristmasDayTest.php index ec5f66445..16d732df2 100644 --- a/tests/Australia/SA/ChristmasDayTest.php +++ b/tests/Australia/SA/ChristmasDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -37,8 +39,8 @@ class ChristmasDayTest extends SABaseTestCase implements YasumiTestCaseInterface * @param string $expected the expected date * @param string $expectedExtra the expected date for the additional holiday, or null if no additional holiday * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected, $expectedExtra) { @@ -91,7 +93,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -112,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/SA/EasterSaturdayTest.php b/tests/Australia/SA/EasterSaturdayTest.php index 78e215acb..7f8688de5 100644 --- a/tests/Australia/SA/EasterSaturdayTest.php +++ b/tests/Australia/SA/EasterSaturdayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class EasterSaturdayTest extends SABaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -72,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -86,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/SA/LabourDayTest.php b/tests/Australia/SA/LabourDayTest.php index 1d950c647..5b877f817 100644 --- a/tests/Australia/SA/LabourDayTest.php +++ b/tests/Australia/SA/LabourDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class LabourDayTest extends SABaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/SA/ProclamationDayTest.php b/tests/Australia/SA/ProclamationDayTest.php index 16a32a60b..7fce5822b 100644 --- a/tests/Australia/SA/ProclamationDayTest.php +++ b/tests/Australia/SA/ProclamationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class ProclamationDayTest extends SABaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/SA/QueensBirthdayTest.php b/tests/Australia/SA/QueensBirthdayTest.php index b90ef370e..c7f41fecc 100644 --- a/tests/Australia/SA/QueensBirthdayTest.php +++ b/tests/Australia/SA/QueensBirthdayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class QueensBirthdayTest extends SABaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -79,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/SA/SATest.php b/tests/Australia/SA/SATest.php index 9a015365f..c3c1aaa15 100644 --- a/tests/Australia/SA/SATest.php +++ b/tests/Australia/SA/SATest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\SA; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class SATest extends SABaseTestCase /** * Tests if all official holidays in SA (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php index dd0fbe800..2ec4a6bd0 100644 --- a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php +++ b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\Tasmania\CentralNorth; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class CentralNorthTest extends CentralNorthBaseTestCase /** * Tests if all official holidays in central north Tasmania (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php index 0d16d8111..c1c6a82f7 100644 --- a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php +++ b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class DevonportShowTest extends CentralNorthBaseTestCase implements YasumiTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/EightHourDayTest.php b/tests/Australia/Tasmania/EightHourDayTest.php index 64b71a1c2..38ea18462 100644 --- a/tests/Australia/Tasmania/EightHourDayTest.php +++ b/tests/Australia/Tasmania/EightHourDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class EightHourDayTest extends TasmaniaBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php index c91ecb3ae..f79f25297 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class FlindersIslandShowTest extends FlindersIslandBaseTestCase implements Yasum * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php index 886058a6f..a7b20f7ce 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\Tasmania\FlindersIsland; +use ReflectionException; use Yasumi\Holiday; /** @@ -27,7 +28,7 @@ class FlindersIslandTest extends FlindersIslandBaseTestCase /** * Tests if all official holidays in Flinders Island (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php index 869c886d0..555b3104c 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class KingIslandShowTest extends KingIslandBaseTestCase implements YasumiTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php index c9ecbd0d1..b4e38b982 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\Tasmania\KingIsland; +use ReflectionException; use Yasumi\Holiday; /** @@ -27,7 +28,7 @@ class KingIslandTest extends KingIslandBaseTestCase /** * Tests if all official holidays in King Island (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php index a1c8a1596..e582c4491 100644 --- a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php +++ b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class LauncestonShowTest extends NortheastBaseTestCase implements YasumiTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/Northeast/NortheastTest.php b/tests/Australia/Tasmania/Northeast/NortheastTest.php index 2f1447536..dedbaa854 100644 --- a/tests/Australia/Tasmania/Northeast/NortheastTest.php +++ b/tests/Australia/Tasmania/Northeast/NortheastTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\Tasmania\Northeast; +use ReflectionException; use Yasumi\Holiday; /** @@ -27,7 +28,7 @@ class NortheastTest extends NortheastBaseTestCase /** * Tests if all official holidays in northeastern Tasmania (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php index c7515bdfa..f6bb8ac4c 100644 --- a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php +++ b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class BurnieShowTest extends NorthwestBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php index edaf48683..2c083c324 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class AGFESTTest extends CircularHeadBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php index 71a247c4a..c9a835f58 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\Tasmania\Northwest\CircularHead; +use ReflectionException; use Yasumi\Holiday; /** @@ -27,7 +28,7 @@ class CircularHeadTest extends CircularHeadBaseTestCase /** * Tests if all official holidays in Circular Head (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/Tasmania/Northwest/NorthwestTest.php b/tests/Australia/Tasmania/Northwest/NorthwestTest.php index fadd5fb43..7b862094f 100644 --- a/tests/Australia/Tasmania/Northwest/NorthwestTest.php +++ b/tests/Australia/Tasmania/Northwest/NorthwestTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\Tasmania\Northwest; +use ReflectionException; use Yasumi\Holiday; /** @@ -27,7 +28,7 @@ class NorthwestTest extends NorthwestBaseTestCase /** * Tests if all official holidays in northwestern Tasmania (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/Tasmania/QueensBirthdayTest.php b/tests/Australia/Tasmania/QueensBirthdayTest.php index a73628dd7..f240b2356 100644 --- a/tests/Australia/Tasmania/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/QueensBirthdayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class QueensBirthdayTest extends TasmaniaBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -79,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/RecreationDayTest.php b/tests/Australia/Tasmania/RecreationDayTest.php index 18ff45c71..93e3ca268 100644 --- a/tests/Australia/Tasmania/RecreationDayTest.php +++ b/tests/Australia/Tasmania/RecreationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class RecreationDayTest extends TasmaniaBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/South/HobartShowTest.php b/tests/Australia/Tasmania/South/HobartShowTest.php index 26f1a949c..a485441e3 100644 --- a/tests/Australia/Tasmania/South/HobartShowTest.php +++ b/tests/Australia/Tasmania/South/HobartShowTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class HobartShowTest extends SouthBaseTestCase implements YasumiTestCaseInterfac * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/South/SouthTest.php b/tests/Australia/Tasmania/South/SouthTest.php index c6d75bb96..87f00d09e 100644 --- a/tests/Australia/Tasmania/South/SouthTest.php +++ b/tests/Australia/Tasmania/South/SouthTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\Tasmania\South; +use ReflectionException; use Yasumi\Holiday; /** @@ -27,7 +28,7 @@ class SouthTest extends SouthBaseTestCase /** * Tests if all official holidays in northwestern Tasmania (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php index 1f9068909..57838fc70 100644 --- a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php +++ b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class HobartRegattaTest extends SoutheastBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php index 6518567e7..125a1211a 100644 --- a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php +++ b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\Tasmania\South\Southeast; +use ReflectionException; use Yasumi\Holiday; /** @@ -27,7 +28,7 @@ class SoutheastTest extends SoutheastBaseTestCase /** * Tests if all official holidays in Circular Head (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/Tasmania/TasmaniaTest.php b/tests/Australia/Tasmania/TasmaniaTest.php index ba3703316..af39aeed7 100644 --- a/tests/Australia/Tasmania/TasmaniaTest.php +++ b/tests/Australia/Tasmania/TasmaniaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\Tasmania; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class TasmaniaTest extends TasmaniaBaseTestCase /** * Tests if all official holidays in Tasmania (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php index 3da8dea4d..9b27e3f36 100644 --- a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php +++ b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -38,8 +40,8 @@ class AFLGrandFinalFridayTest extends VictoriaBaseTestCase implements YasumiTest * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -54,7 +56,7 @@ public function testHoliday($year, $expected) /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -82,7 +84,7 @@ public function testHolidayType(): void /** * Tests that Holiday is not present before establishment year - * @throws \ReflectionException + * @throws ReflectionException */ public function testNotHoliday() { diff --git a/tests/Australia/Victoria/EasterSaturdayTest.php b/tests/Australia/Victoria/EasterSaturdayTest.php index a3b8616d7..74fc60ff6 100644 --- a/tests/Australia/Victoria/EasterSaturdayTest.php +++ b/tests/Australia/Victoria/EasterSaturdayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class EasterSaturdayTest extends VictoriaBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -72,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -86,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Victoria/EasterSundayTest.php b/tests/Australia/Victoria/EasterSundayTest.php index cf1fb9f8b..2529666a4 100644 --- a/tests/Australia/Victoria/EasterSundayTest.php +++ b/tests/Australia/Victoria/EasterSundayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class EasterSundayTest extends VictoriaBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -52,7 +54,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -70,7 +72,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -84,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Victoria/LabourDayTest.php b/tests/Australia/Victoria/LabourDayTest.php index a09f064bd..2f65f4052 100644 --- a/tests/Australia/Victoria/LabourDayTest.php +++ b/tests/Australia/Victoria/LabourDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class LabourDayTest extends VictoriaBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Victoria/MelbourneCupDayTest.php b/tests/Australia/Victoria/MelbourneCupDayTest.php index 462d64ce3..49522d543 100644 --- a/tests/Australia/Victoria/MelbourneCupDayTest.php +++ b/tests/Australia/Victoria/MelbourneCupDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class MelbourneCupDayTest extends VictoriaBaseTestCase implements YasumiTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -79,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Victoria/QueensBirthdayTest.php b/tests/Australia/Victoria/QueensBirthdayTest.php index 542f245f9..83bd8743a 100644 --- a/tests/Australia/Victoria/QueensBirthdayTest.php +++ b/tests/Australia/Victoria/QueensBirthdayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class QueensBirthdayTest extends VictoriaBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -79,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/Victoria/VictoriaTest.php b/tests/Australia/Victoria/VictoriaTest.php index 6729edc75..1b1f8cf4e 100644 --- a/tests/Australia/Victoria/VictoriaTest.php +++ b/tests/Australia/Victoria/VictoriaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\Victoria; +use ReflectionException; use Yasumi\Holiday; /** @@ -27,7 +28,7 @@ class VictoriaTest extends VictoriaBaseTestCase /** * Tests if all official holidays in Victoria (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/WA/LabourDayTest.php b/tests/Australia/WA/LabourDayTest.php index 1d6c8f7c9..98c21a61b 100644 --- a/tests/Australia/WA/LabourDayTest.php +++ b/tests/Australia/WA/LabourDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class LabourDayTest extends WABaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/WA/QueensBirthdayTest.php b/tests/Australia/WA/QueensBirthdayTest.php index 686570ae3..3b456e079 100644 --- a/tests/Australia/WA/QueensBirthdayTest.php +++ b/tests/Australia/WA/QueensBirthdayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class QueensBirthdayTest extends WABaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -79,7 +81,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Australia/WA/WATest.php b/tests/Australia/WA/WATest.php index fd1e34a8b..6b213f281 100644 --- a/tests/Australia/WA/WATest.php +++ b/tests/Australia/WA/WATest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Australia\WA; +use ReflectionException; use Yasumi\Holiday; /** @@ -27,7 +28,7 @@ class WATest extends WABaseTestCase /** * Tests if all official holidays in WA (Australia) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { diff --git a/tests/Australia/WA/WesternAustraliaDayTest.php b/tests/Australia/WA/WesternAustraliaDayTest.php index 9e4dd47fb..df5925d74 100644 --- a/tests/Australia/WA/WesternAustraliaDayTest.php +++ b/tests/Australia/WA/WesternAustraliaDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class WesternAustraliaDayTest extends WABaseTestCase implements YasumiTestCaseIn * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,7 +76,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -88,7 +90,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Austria/AllSaintsDayTest.php b/tests/Austria/AllSaintsDayTest.php index 65974cf0e..4c12935ce 100644 --- a/tests/Austria/AllSaintsDayTest.php +++ b/tests/Austria/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Austria; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends AustriaBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Austria/AscensionDayTest.php b/tests/Austria/AscensionDayTest.php index 35368a152..64c99bbef 100644 --- a/tests/Austria/AscensionDayTest.php +++ b/tests/Austria/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends AustriaBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Austria/AssumptionOfMaryTest.php b/tests/Austria/AssumptionOfMaryTest.php index 60969a120..23fb29585 100644 --- a/tests/Austria/AssumptionOfMaryTest.php +++ b/tests/Austria/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Austria; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends AustriaBaseTestCase implements YasumiTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Austria/AustriaTest.php b/tests/Austria/AustriaTest.php index 161c46322..fc36f86f9 100644 --- a/tests/Austria/AustriaTest.php +++ b/tests/Austria/AustriaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Austria; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class AustriaTest extends AustriaBaseTestCase /** * Tests if all official holidays in Austria are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -49,7 +50,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Austria are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -58,7 +59,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Austria are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -67,7 +68,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Austria are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -76,7 +77,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Austria are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Austria/ChristmasTest.php b/tests/Austria/ChristmasTest.php index 7b10ba5f6..b1a931196 100644 --- a/tests/Austria/ChristmasTest.php +++ b/tests/Austria/ChristmasTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Austria; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasTest extends AustriaBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Austria/CorpusChristiTest.php b/tests/Austria/CorpusChristiTest.php index a82338d25..46c2427e8 100644 --- a/tests/Austria/CorpusChristiTest.php +++ b/tests/Austria/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Austria; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends AustriaBaseTestCase implements YasumiTestCaseInt /** * Tests the holiday defined in this test. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -48,7 +50,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Austria/EasterMondayTest.php b/tests/Austria/EasterMondayTest.php index 659bc9180..0ddae1355 100644 --- a/tests/Austria/EasterMondayTest.php +++ b/tests/Austria/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends AustriaBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Austria/EasterTest.php b/tests/Austria/EasterTest.php index e0cd2b9ff..d8232f6aa 100644 --- a/tests/Austria/EasterTest.php +++ b/tests/Austria/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterTest extends AustriaBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Austria/EpiphanyTest.php b/tests/Austria/EpiphanyTest.php index 98b217e75..d621be453 100644 --- a/tests/Austria/EpiphanyTest.php +++ b/tests/Austria/EpiphanyTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Austria; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class EpiphanyTest extends AustriaBaseTestCase implements YasumiTestCaseInterfac * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Austria/ImmaculateConceptionTest.php b/tests/Austria/ImmaculateConceptionTest.php index 6853852e5..69d97ac57 100644 --- a/tests/Austria/ImmaculateConceptionTest.php +++ b/tests/Austria/ImmaculateConceptionTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Austria; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ImmaculateConceptionTest extends AustriaBaseTestCase implements YasumiTest * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Austria/InternationalWorkersDayTest.php b/tests/Austria/InternationalWorkersDayTest.php index 52b37b732..dca84a2ae 100644 --- a/tests/Austria/InternationalWorkersDayTest.php +++ b/tests/Austria/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Austria; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends AustriaBaseTestCase implements YasumiT * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Austria/NationalDayTest.php b/tests/Austria/NationalDayTest.php index 8e1a35a8c..9334d8fba 100644 --- a/tests/Austria/NationalDayTest.php +++ b/tests/Austria/NationalDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class NationalDayTest extends AustriaBaseTestCase implements YasumiTestCaseInter /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Austria/NewYearsDayTest.php b/tests/Austria/NewYearsDayTest.php index 467f56221..8be43c025 100644 --- a/tests/Austria/NewYearsDayTest.php +++ b/tests/Austria/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Austria; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends AustriaBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Austria/PentecostMondayTest.php b/tests/Austria/PentecostMondayTest.php index 505e05db6..25116490c 100644 --- a/tests/Austria/PentecostMondayTest.php +++ b/tests/Austria/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends AustriaBaseTestCase implements YasumiTestCaseI /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Austria/PentecostTest.php b/tests/Austria/PentecostTest.php index c14858829..d8bb21c83 100644 --- a/tests/Austria/PentecostTest.php +++ b/tests/Austria/PentecostTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostTest extends AustriaBaseTestCase implements YasumiTestCaseInterfa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Austria/SecondChristmasDayTest.php b/tests/Austria/SecondChristmasDayTest.php index d75f1ca8e..b4d19fde7 100644 --- a/tests/Austria/SecondChristmasDayTest.php +++ b/tests/Austria/SecondChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Austria; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class SecondChristmasDayTest extends AustriaBaseTestCase implements YasumiTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Base/HolidayBetweenFilterTest.php b/tests/Base/HolidayBetweenFilterTest.php index b4d25647b..1df676a2e 100644 --- a/tests/Base/HolidayBetweenFilterTest.php +++ b/tests/Base/HolidayBetweenFilterTest.php @@ -13,9 +13,12 @@ namespace Yasumi\tests\Base; use DateTime; +use DateTimeImmutable; use DateTimeZone; +use Exception; use InvalidArgumentException; use PHPUnit\Framework\TestCase; +use ReflectionException; use Yasumi\tests\YasumiBase; use Yasumi\Yasumi; @@ -31,8 +34,8 @@ class HolidayBetweenFilterTest extends TestCase /** * Tests the basic usage of the BetweenFilter. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidaysBetweenDateRange(): void { @@ -86,8 +89,8 @@ public function testHolidaysBetweenDateRange(): void /** * Tests the basic usage of the BetweenFilter using DateTimeImmutable objects. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidaysBetweenDateRangeWithDateTimeImmutable(): void { @@ -95,8 +98,8 @@ public function testHolidaysBetweenDateRangeWithDateTimeImmutable(): void $holidays = Yasumi::create('Netherlands', 2016); $between = $holidays->between( - new \DateTimeImmutable('03/25/2016', new \DateTimeZone($timezone)), - new \DateTimeImmutable('07/25/2016', new \DateTimeZone($timezone)) + new DateTimeImmutable('03/25/2016', new \DateTimeZone($timezone)), + new DateTimeImmutable('07/25/2016', new \DateTimeZone($timezone)) ); $betweenHolidays = \iterator_to_array($between); @@ -141,8 +144,8 @@ public function testHolidaysBetweenDateRangeWithDateTimeImmutable(): void /** * Tests that BetweenFilter considers the date and ignores timezones and time of day. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidaysBetweenDateRangeDifferentTimezone(): void { @@ -168,8 +171,8 @@ public function testHolidaysBetweenDateRangeDifferentTimezone(): void /** * Tests the BetweenFilter with date range where start and end date are exclusive of the comparison. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidaysBetweenDateRangeExclusiveStartEndDate(): void { @@ -224,8 +227,8 @@ public function testHolidaysBetweenDateRangeExclusiveStartEndDate(): void /** * Tests the BetweenFilter where the start date lies before the year of the Holiday Provider instance. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidaysBetweenDateRangeWithStartBeforeInstanceYear(): void { @@ -264,8 +267,8 @@ public function testHolidaysBetweenDateRangeWithStartBeforeInstanceYear(): void /** * Tests the BetweenFilter where the end date lies beyond the year of the Holiday Provider instance. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidaysBetweenDateRangeWithEndAfterInstanceYear(): void { @@ -304,8 +307,8 @@ public function testHolidaysBetweenDateRangeWithEndAfterInstanceYear(): void /** * Tests that an InvalidArgumentException is thrown in case an invalid holiday provider is given. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testWrongDates(): void { @@ -326,8 +329,8 @@ public function testWrongDates(): void * * This test covers the scenario that the requested date range covers all know holidays. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCountBetweenWithSubstitutes(): void { @@ -367,8 +370,8 @@ public function testCountBetweenWithSubstitutes(): void * * This test covers the scenario that the requested date range excludes a substituted holiday. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCountBetweenExcludingSubstituteHoliday(): void { @@ -412,8 +415,8 @@ public function testCountBetweenExcludingSubstituteHoliday(): void * This test covers the scenario that the requested date range excludes a substituted holiday, but includes * the original substituted holiday. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCountBetweenExcludingSubstituteHolidayIncludingOriginalHoliday(): void { @@ -458,8 +461,8 @@ public function testCountBetweenExcludingSubstituteHolidayIncludingOriginalHolid * This test covers the scenario that the requested date range excludes a substituted holiday and also * the original substituted holiday. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCountBetweenExcludingSubstituteHolidayAndOriginalHoliday(): void { diff --git a/tests/Base/HolidayFiltersTest.php b/tests/Base/HolidayFiltersTest.php index f59c725c0..22e206073 100644 --- a/tests/Base/HolidayFiltersTest.php +++ b/tests/Base/HolidayFiltersTest.php @@ -13,6 +13,7 @@ namespace Yasumi\tests\Base; use PHPUnit\Framework\TestCase; +use ReflectionException; use Yasumi\Filters\BankHolidaysFilter; use Yasumi\Filters\ObservedHolidaysFilter; use Yasumi\Filters\OfficialHolidaysFilter; @@ -32,7 +33,7 @@ class HolidayFiltersTest extends TestCase /** * Tests the Official Holidays filter - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidaysFilter(): void { @@ -66,7 +67,7 @@ public function testOfficialHolidaysFilter(): void /** * Tests the Observed Holidays filter - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidaysFilter(): void { @@ -100,7 +101,7 @@ public function testObservedHolidaysFilter(): void /** * Tests Bank Holidays - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidaysFilter(): void { @@ -134,7 +135,7 @@ public function testBankHolidaysFilter(): void /** * Tests Seasonal Holidays - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidaysFilter(): void { @@ -182,7 +183,7 @@ public function testSeasonalHolidaysFilter(): void /** * Tests other type of Holidays - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidaysFilter(): void { diff --git a/tests/Base/HolidayOnFilterTest.php b/tests/Base/HolidayOnFilterTest.php index 21d7bc787..5a8408027 100644 --- a/tests/Base/HolidayOnFilterTest.php +++ b/tests/Base/HolidayOnFilterTest.php @@ -14,7 +14,9 @@ use DateTime; use DateTimeZone; +use Exception; use PHPUnit\Framework\TestCase; +use ReflectionException; use Yasumi\tests\YasumiBase; use Yasumi\Yasumi; @@ -30,8 +32,8 @@ class HolidayOnFilterTest extends TestCase /** * Tests the basic usage of the OnFilter. * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidaysOnDate(): void { @@ -54,8 +56,8 @@ public function testHolidaysOnDate(): void } /** - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidaysNotOnDate(): void { @@ -78,8 +80,8 @@ public function testHolidaysNotOnDate(): void } /** - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testCorrectNumberOfHolidaysOnDate(): void { diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index 30aa5f551..086f3034a 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Base; use DateTime; +use DateTimeImmutable; +use Exception; use InvalidArgumentException; use PHPUnit\Framework\TestCase; use Yasumi\Exception\UnknownLocaleException; @@ -32,7 +34,7 @@ class HolidayTest extends TestCase /** * Tests that an InvalidArgumentException is thrown in case an blank short name is given. * - * @throws \Exception + * @throws Exception */ public function testHolidayBlankNameInvalidArgumentException(): void { @@ -44,7 +46,7 @@ public function testHolidayBlankNameInvalidArgumentException(): void /** * Tests that an Yasumi\Exception\UnknownLocaleException is thrown in case an invalid locale is given. * - * @throws \Exception + * @throws Exception */ public function testCreateHolidayUnknownLocaleException(): void { @@ -55,7 +57,7 @@ public function testCreateHolidayUnknownLocaleException(): void /** * Tests that a Yasumi holiday instance can be serialized to a JSON object. - * @throws \Exception + * @throws Exception */ public function testHolidayIsJsonSerializable(): void { @@ -71,7 +73,7 @@ public function testHolidayIsJsonSerializable(): void /** * Tests that a Yasumi holiday instance can be created using an object that implements the DateTimeInterface (e.g. * DateTime or DateTimeImmutable) - * @throws \Exception + * @throws Exception */ public function testHolidayWithDateTimeInterface(): void { @@ -81,14 +83,14 @@ public function testHolidayWithDateTimeInterface(): void $this->assertInstanceOf(Holiday::class, $holiday); // Assert with DateTimeImmutable instance - $holiday = new Holiday('testHoliday', [], new \DateTimeImmutable(), 'en_US'); + $holiday = new Holiday('testHoliday', [], new DateTimeImmutable(), 'en_US'); $this->assertNotNull($holiday); $this->assertInstanceOf(Holiday::class, $holiday); } /** * Tests the getName function of the Holiday object with no translations for the name given. - * @throws \Exception + * @throws Exception */ public function testHolidayGetNameWithNoTranslations(): void { @@ -101,7 +103,7 @@ public function testHolidayGetNameWithNoTranslations(): void /** * Tests the getName function of the Holiday object with only a default translation for the name given. - * @throws \Exception + * @throws Exception */ public function testHolidayGetNameWithOnlyDefaultTranslation(): void { @@ -117,7 +119,7 @@ public function testHolidayGetNameWithOnlyDefaultTranslation(): void /** * Tests the getName function of the Holiday object with only a default translation for the name given. * - * @throws \Exception + * @throws Exception */ public function testHolidayGetNameWithOneNonDefaultTranslation(): void { @@ -132,7 +134,7 @@ public function testHolidayGetNameWithOneNonDefaultTranslation(): void /** * Tests the getName function of the Holiday object with global translations and no custom translation. - * @throws \Exception + * @throws Exception */ public function testHolidayGetNameWithGlobalTranslations(): void { @@ -158,7 +160,7 @@ public function testHolidayGetNameWithGlobalTranslations(): void /** * Tests the getName function of the Holiday object with global translations and a new custom translation. - * @throws \Exception + * @throws Exception */ public function testHolidayGetNameWithGlobalAndCustomTranslations(): void { @@ -190,7 +192,7 @@ public function testHolidayGetNameWithGlobalAndCustomTranslations(): void /** * Tests the getName function of the Holiday object with global translations and an overriding custom translation. - * @throws \Exception + * @throws Exception */ public function testHolidayGetNameWithOverridenGlobalTranslations(): void { diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index a178e49c8..b141986a4 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -12,9 +12,16 @@ namespace Yasumi\tests\Base; +use ArrayIterator; +use DateTime; +use DateTimeImmutable; +use Exception; use Faker\Factory; use InvalidArgumentException; use PHPUnit\Framework\TestCase; +use ReflectionException; +use stdClass; +use TypeError; use Yasumi\Exception\InvalidYearException; use Yasumi\Exception\ProviderNotFoundException; use Yasumi\Exception\UnknownLocaleException; @@ -43,7 +50,7 @@ class YasumiTest extends TestCase /** * Tests that an InvalidArgumentException is thrown in case an invalid year is given. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testCreateWithInvalidYear(): void { @@ -55,7 +62,7 @@ public function testCreateWithInvalidYear(): void /** * Tests that an InvalidArgumentException is thrown in case an invalid holiday provider is given. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testCreateWithInvalidProvider(): void { @@ -67,7 +74,7 @@ public function testCreateWithInvalidProvider(): void /** * Tests that an InvalidArgumentException is thrown in case we try to load a Trait as provider. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testCreateWithInvalidProviderBecauseItsATrait(): void { @@ -79,7 +86,7 @@ public function testCreateWithInvalidProviderBecauseItsATrait(): void /** * Tests that an InvalidArgumentException is thrown in case we try to load the AbstractProvider as provider. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testCreateWithAbstractClassProvider(): void { @@ -90,7 +97,7 @@ public function testCreateWithAbstractClassProvider(): void /** * Tests that Yasumi allows external classes that extend the ProviderInterface. - * @throws \ReflectionException + * @throws ReflectionException */ public function testCreateWithAbstractExtension(): void { @@ -105,7 +112,7 @@ public function testCreateWithAbstractExtension(): void /** * Tests that an Yasumi\Exception\UnknownLocaleException is thrown in case an invalid locale is given. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testCreateWithInvalidLocale(): void { @@ -120,7 +127,7 @@ public function testCreateWithInvalidLocale(): void /** * Tests that the getIterator function returns an ArrayIterator object - * @throws \ReflectionException + * @throws ReflectionException */ public function testGetIterator(): void { @@ -129,12 +136,12 @@ public function testGetIterator(): void Factory::create()->numberBetween(self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND) ); - $this->assertInstanceOf(\ArrayIterator::class, $holidays->getIterator()); + $this->assertInstanceOf(ArrayIterator::class, $holidays->getIterator()); } /** * Tests that the count function returns an integer and a correct count for the test holiday provider - * @throws \ReflectionException + * @throws ReflectionException */ public function testCount(): void { @@ -148,7 +155,7 @@ public function testCount(): void /** * Tests that the getType function returns a string for the test holiday provider - * @throws \ReflectionException + * @throws ReflectionException */ public function testGetType(): void { @@ -160,7 +167,7 @@ public function testGetType(): void /** * Tests that the getYear function returns an integer for the test holiday provider - * @throws \ReflectionException + * @throws ReflectionException */ public function testGetYear(): void { @@ -174,7 +181,7 @@ public function testGetYear(): void /** * Tests that the next function returns the next upcoming date (i.e. next year) for the given holiday * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNext(): void { @@ -190,7 +197,7 @@ public function testNext(): void /** * Tests the next function that an InvalidArgumentException is thrown in case a blank name is given. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNextWithBlankName(): void { @@ -206,7 +213,7 @@ public function testNextWithBlankName(): void /** * Tests the previous function returns the previous date (i.e. previous year) for the given holiday * - * @throws \ReflectionException + * @throws ReflectionException */ public function testPrevious(): void { @@ -228,7 +235,7 @@ public function testPrevious(): void /** * Tests the previous function that an InvalidArgumentException is thrown in case a blank name is given. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testPreviousWithBlankName(): void { @@ -243,7 +250,7 @@ public function testPreviousWithBlankName(): void /** * Tests that the getHolidayNames function returns an array and a correct count for the test holiday provider - * @throws \ReflectionException + * @throws ReflectionException */ public function testGetHolidayNames(): void { @@ -257,7 +264,7 @@ public function testGetHolidayNames(): void /** * Tests that the WhenIs function returns a string representation of the date the given holiday occurs. - * @throws \ReflectionException + * @throws ReflectionException */ public function testWhenIs(): void { @@ -272,7 +279,7 @@ public function testWhenIs(): void /** * Tests that the WhenIs function throws an InvalidArgumentException when a blank name is given. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testWhenIsWithBlankName(): void { @@ -285,7 +292,7 @@ public function testWhenIsWithBlankName(): void /** * Tests that an InvalidArgumentException is thrown in case a blank name is given for the getHoliday function. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testGetHolidayWithBlankName(): void { @@ -298,7 +305,7 @@ public function testGetHolidayWithBlankName(): void /** * Tests that the whatWeekDayIs function returns an integer representation of the day of the week the given holiday * is occurring. - * @throws \ReflectionException + * @throws ReflectionException */ public function testWhatWeekDayIs(): void { @@ -312,7 +319,7 @@ public function testWhatWeekDayIs(): void /** * Tests that the whatWeekDayIs function throws an InvalidArgumentException when a blank name is given. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testWhatWeekDayIsWithBlankName(): void { @@ -324,7 +331,7 @@ public function testWhatWeekDayIsWithBlankName(): void /** * Tests that the getProviders function returns an array containing all available holiday providers. - * @throws \ReflectionException + * @throws ReflectionException */ public function testGetProviders(): void { @@ -340,7 +347,7 @@ public function testGetProviders(): void /** * Tests that the getProviders function (static call) returns the same data when called again. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testGetProvidersStaticCall(): void { @@ -361,10 +368,10 @@ public function testGetProvidersStaticCall(): void /** * Tests that the isHoliday function returns a boolean true for a date that is defined as a holiday. - * @throws \Exception - * @throws \ReflectionException - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testIsHoliday(): void { @@ -373,12 +380,12 @@ public function testIsHoliday(): void $date = $year . '-08-15'; // Assertion using a DateTime instance - $isHoliday = Yasumi::create($provider, $year)->isHoliday(new \DateTime($date)); + $isHoliday = Yasumi::create($provider, $year)->isHoliday(new DateTime($date)); $this->assertIsBool($isHoliday); $this->assertTrue($isHoliday); // Assertion using a DateTimeImmutable instance - $isHoliday = Yasumi::create($provider, $year)->isHoliday(new \DateTimeImmutable($date)); + $isHoliday = Yasumi::create($provider, $year)->isHoliday(new DateTimeImmutable($date)); $this->assertIsBool($isHoliday); $this->assertTrue($isHoliday); @@ -387,10 +394,10 @@ public function testIsHoliday(): void /** * Tests that the isHoliday function returns a boolean false for a date that is not defined as a holiday. - * @throws \Exception - * @throws \ReflectionException - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testIsNotHoliday(): void { @@ -399,12 +406,12 @@ public function testIsNotHoliday(): void $date = $year . '-06-10'; // Assertion using a DateTime instance - $isHoliday = Yasumi::create($provider, $year)->isHoliday(new \DateTime($date)); + $isHoliday = Yasumi::create($provider, $year)->isHoliday(new DateTime($date)); $this->assertIsBool($isHoliday); $this->assertFalse($isHoliday); // Assertion using a DateTimeImmutable instance - $isHoliday = Yasumi::create($provider, $year)->isHoliday(new \DateTimeImmutable($date)); + $isHoliday = Yasumi::create($provider, $year)->isHoliday(new DateTimeImmutable($date)); $this->assertIsBool($isHoliday); $this->assertFalse($isHoliday); @@ -414,16 +421,16 @@ public function testIsNotHoliday(): void /** * Tests that the isHoliday function throws a TypeError when the given argument is not an instance that * implements the DateTimeInterface (e.g. DateTime or DateTimeImmutable) - * @throws \ReflectionException + * @throws ReflectionException */ public function testIsHolidayException(): void { - $this->expectException(\TypeError::class); + $this->expectException(TypeError::class); Yasumi::create('Spain', Factory::create()->numberBetween( self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND - ))->isHoliday(new \stdClass()); + ))->isHoliday(new stdClass()); } /** @@ -431,10 +438,10 @@ public function testIsHolidayException(): void * the weekend. * * @TODO Add additional unit tests for those holiday providers that differ from the global definition - * @throws \Exception - * @throws \ReflectionException - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testIsWorkingDay(): void { @@ -443,12 +450,12 @@ public function testIsWorkingDay(): void $date = $year . '-06-02'; // Assertion using a DateTime instance - $isWorkingDay = Yasumi::create($provider, $year)->isWorkingDay(new \DateTime($date)); + $isWorkingDay = Yasumi::create($provider, $year)->isWorkingDay(new DateTime($date)); $this->assertIsBool($isWorkingDay); $this->assertTrue($isWorkingDay); // Assertion using a DateTimeImmutable instance - $isWorkingDay = Yasumi::create($provider, $year)->isWorkingDay(new \DateTimeImmutable($date)); + $isWorkingDay = Yasumi::create($provider, $year)->isWorkingDay(new DateTimeImmutable($date)); $this->assertIsBool($isWorkingDay); $this->assertTrue($isWorkingDay); @@ -460,10 +467,10 @@ public function testIsWorkingDay(): void * the weekend. * * @TODO Add additional unit tests for those holiday providers that differ from the global definition - * @throws \Exception - * @throws \ReflectionException - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testIsNotWorkingDay(): void { @@ -472,12 +479,12 @@ public function testIsNotWorkingDay(): void $date = $year . '-01-11'; // Assertion using a DateTime instance - $isNotWorkingDay = Yasumi::create($provider, $year)->isWorkingDay(new \DateTime($date)); + $isNotWorkingDay = Yasumi::create($provider, $year)->isWorkingDay(new DateTime($date)); $this->assertIsBool($isNotWorkingDay); $this->assertFalse($isNotWorkingDay); // Assertion using a DateTimeImmutable instance - $isNotWorkingDay = Yasumi::create($provider, $year)->isWorkingDay(new \DateTimeImmutable($date)); + $isNotWorkingDay = Yasumi::create($provider, $year)->isWorkingDay(new DateTimeImmutable($date)); $this->assertIsBool($isNotWorkingDay); $this->assertFalse($isNotWorkingDay); @@ -489,22 +496,22 @@ public function testIsNotWorkingDay(): void * that implements the DateTimeInterface (e.g. DateTime or DateTimeImmutable) * * @TODO Add additional unit tests for those holiday providers that differ from the global definition - * @throws \ReflectionException + * @throws ReflectionException */ public function testIsWorkingDayException(): void { - $this->expectException(\TypeError::class); + $this->expectException(TypeError::class); Yasumi::create('SouthAfrica', Factory::create()->numberBetween( self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND - ))->isWorkingDay(new \stdClass()); + ))->isWorkingDay(new stdClass()); } /** * Tests that holidays successfully can be removed from the list of holidays of a provider * - * @throws \ReflectionException + * @throws ReflectionException */ public function testRemoveHoliday(): void { diff --git a/tests/Base/YasumiWorkdayTest.php b/tests/Base/YasumiWorkdayTest.php index a496f47c2..d3422317d 100644 --- a/tests/Base/YasumiWorkdayTest.php +++ b/tests/Base/YasumiWorkdayTest.php @@ -12,7 +12,12 @@ namespace Yasumi\tests; +use DateTime; +use DateTimeImmutable; +use DateTimeZone; +use Exception; use PHPUnit\Framework\TestCase; +use ReflectionException; use Yasumi\Yasumi; class YasumiWorkdayTest extends TestCase @@ -22,8 +27,8 @@ class YasumiWorkdayTest extends TestCase /** * Tests that the nextWorkingDay function returns an object that implements the DateTimeInterface (e.g. DateTime) * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testNextWorkingDay(): void { @@ -34,25 +39,25 @@ public function testNextWorkingDay(): void $expectedDate = '2016-07-05'; // Assertion using a DateTime instance - $startDate = new \DateTime($date, new \DateTimeZone($timezone)); + $startDate = new DateTime($date, new DateTimeZone($timezone)); $result = Yasumi::nextWorkingDay($provider, $startDate); - $this->assertInstanceOf(\DateTime::class, $result); + $this->assertInstanceOf(DateTime::class, $result); $this->assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); // Assertion using a DateTimeImmutable instance - $startDate = new \DateTimeImmutable($date, new \DateTimeZone($timezone)); + $startDate = new DateTimeImmutable($date, new DateTimeZone($timezone)); $result = Yasumi::nextWorkingDay($provider, $startDate); - $this->assertInstanceOf(\DateTimeImmutable::class, $result); + $this->assertInstanceOf(DateTimeImmutable::class, $result); $this->assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); } /** * Tests that the prevWorkingDay function returns an object that implements the DateTimeInterface (e.g. DateTime) * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPreviousWorkingDay(): void { @@ -63,17 +68,17 @@ public function testPreviousWorkingDay(): void $expectedDate = '2016-07-01'; // Assertion using a DateTime instance - $startDate = new \DateTime($date, new \DateTimeZone($timezone)); + $startDate = new DateTime($date, new DateTimeZone($timezone)); $result = Yasumi::prevWorkingDay($provider, $startDate); - $this->assertInstanceOf(\DateTime::class, $result); + $this->assertInstanceOf(DateTime::class, $result); $this->assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); // Assertion using a DateTimeImmutable instance - $startDate = new \DateTimeImmutable($date, new \DateTimeZone($timezone)); + $startDate = new DateTimeImmutable($date, new DateTimeZone($timezone)); $result = Yasumi::prevWorkingDay($provider, $startDate); - $this->assertInstanceOf(\DateTimeImmutable::class, $result); + $this->assertInstanceOf(DateTimeImmutable::class, $result); $this->assertEquals($expectedDate, $result->format(self::FORMAT_DATE)); } @@ -81,8 +86,8 @@ public function testPreviousWorkingDay(): void * Tests that the prevWorkingDay and nextWorkingDay functions returns an object that implements the * DateTimeInterface (e.g. DateTime) when an interval is chosen that passes the year boundary (i.e. beyond 12/31) * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testYearBoundary(): void { @@ -112,23 +117,23 @@ public function testYearBoundary(): void $expectedPrevious = '2015-12-18'; // Assertion using a DateTime instance - $startDate = new \DateTime($start, new \DateTimeZone($timezone)); + $startDate = new DateTime($start, new DateTimeZone($timezone)); $result = Yasumi::nextWorkingDay($provider, $startDate, $interval); $this->assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); - $startDate = new \DateTime($expectedNext, new \DateTimeZone($timezone)); + $startDate = new DateTime($expectedNext, new DateTimeZone($timezone)); $result = Yasumi::prevWorkingDay($provider, $startDate, $interval); $this->assertEquals($expectedPrevious, $result->format(self::FORMAT_DATE)); // Assertion using a DateTimeImmutable instance - $startDate = new \DateTimeImmutable($start, new \DateTimeZone($timezone)); + $startDate = new DateTimeImmutable($start, new DateTimeZone($timezone)); $result = Yasumi::nextWorkingDay($provider, $startDate, $interval); $this->assertEquals($expectedNext, $result->format(self::FORMAT_DATE)); - $startDate = new \DateTimeImmutable($expectedNext, new \DateTimeZone($timezone)); + $startDate = new DateTimeImmutable($expectedNext, new DateTimeZone($timezone)); $result = Yasumi::prevWorkingDay($provider, $startDate, $interval); $this->assertEquals($expectedPrevious, $result->format(self::FORMAT_DATE)); } diff --git a/tests/Belgium/AllSaintsDayTest.php b/tests/Belgium/AllSaintsDayTest.php index 697c0d6b9..43639f3b9 100644 --- a/tests/Belgium/AllSaintsDayTest.php +++ b/tests/Belgium/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Belgium; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Belgium/ArmisticeDayTest.php b/tests/Belgium/ArmisticeDayTest.php index 60ad4eeb2..4006bce1b 100644 --- a/tests/Belgium/ArmisticeDayTest.php +++ b/tests/Belgium/ArmisticeDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Belgium; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ArmisticeDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Belgium/AscensionDayTest.php b/tests/Belgium/AscensionDayTest.php index 542dec794..272b0e6ca 100644 --- a/tests/Belgium/AscensionDayTest.php +++ b/tests/Belgium/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Belgium/AssumptionOfMaryTest.php b/tests/Belgium/AssumptionOfMaryTest.php index 97e68ef96..b38d278a4 100644 --- a/tests/Belgium/AssumptionOfMaryTest.php +++ b/tests/Belgium/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Belgium; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends BelgiumBaseTestCase implements YasumiTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Belgium/BelgiumTest.php b/tests/Belgium/BelgiumTest.php index ea5cda3e2..dc71d8d55 100644 --- a/tests/Belgium/BelgiumTest.php +++ b/tests/Belgium/BelgiumTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Belgium; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class BelgiumTest extends BelgiumBaseTestCase /** * Tests if all official holidays in Belgium are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -48,7 +49,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Belgium are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -57,7 +58,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Belgium are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -66,7 +67,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Belgium are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -75,7 +76,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Belgium are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Belgium/ChristmasTest.php b/tests/Belgium/ChristmasTest.php index 3780bc4d6..717163a5d 100644 --- a/tests/Belgium/ChristmasTest.php +++ b/tests/Belgium/ChristmasTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Belgium; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasTest extends BelgiumBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Belgium/EasterMondayTest.php b/tests/Belgium/EasterMondayTest.php index 36a1d1587..ddedc25a0 100644 --- a/tests/Belgium/EasterMondayTest.php +++ b/tests/Belgium/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends BelgiumBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Belgium/EasterTest.php b/tests/Belgium/EasterTest.php index c4dbf9b84..d40c4def9 100644 --- a/tests/Belgium/EasterTest.php +++ b/tests/Belgium/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterTest extends BelgiumBaseTestCase implements YasumiTestCaseInterface /** * Tests Easter. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEaster() { @@ -45,7 +47,7 @@ public function testEaster() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Belgium/InternationalWorkersDayTest.php b/tests/Belgium/InternationalWorkersDayTest.php index 199467662..1c96b2dd6 100644 --- a/tests/Belgium/InternationalWorkersDayTest.php +++ b/tests/Belgium/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Belgium; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends BelgiumBaseTestCase implements YasumiT * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Belgium/NationalDayTest.php b/tests/Belgium/NationalDayTest.php index e5a916dc2..963b4f19d 100644 --- a/tests/Belgium/NationalDayTest.php +++ b/tests/Belgium/NationalDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Belgium; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NationalDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Belgium/NewYearsDayTest.php b/tests/Belgium/NewYearsDayTest.php index 6dd764fc5..69a7c0598 100644 --- a/tests/Belgium/NewYearsDayTest.php +++ b/tests/Belgium/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Belgium; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends BelgiumBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Belgium/PentecostTest.php b/tests/Belgium/PentecostTest.php index 440752067..59414bfb3 100644 --- a/tests/Belgium/PentecostTest.php +++ b/tests/Belgium/PentecostTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostTest extends BelgiumBaseTestCase implements YasumiTestCaseInterfa /** * Tests Pentecost. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Belgium/pentecostMondayTest.php b/tests/Belgium/pentecostMondayTest.php index 8557851f1..6a6e7c406 100644 --- a/tests/Belgium/pentecostMondayTest.php +++ b/tests/Belgium/pentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class pentecostMondayTest extends BelgiumBaseTestCase implements YasumiTestCaseI /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Bosnia/BosniaTest.php b/tests/Bosnia/BosniaTest.php index 14eaa9306..e46dce245 100644 --- a/tests/Bosnia/BosniaTest.php +++ b/tests/Bosnia/BosniaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Bosnia; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class BosniaTest extends BosniaBaseTestCase /** * Tests if all official holidays in Bosnia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -46,7 +47,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Bosnia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -55,7 +56,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Bosnia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -64,7 +65,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Bosnia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -73,7 +74,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Bosnia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Bosnia/ChristmasDayTest.php b/tests/Bosnia/ChristmasDayTest.php index dd1c54d39..dd51b7fcc 100644 --- a/tests/Bosnia/ChristmasDayTest.php +++ b/tests/Bosnia/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Bosnia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends BosniaBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Bosnia/DayAfterNewYearsDay.php b/tests/Bosnia/DayAfterNewYearsDay.php index a68ed14f8..ddd30468d 100644 --- a/tests/Bosnia/DayAfterNewYearsDay.php +++ b/tests/Bosnia/DayAfterNewYearsDay.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Bosnia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class DayAfterNewYearsDay extends BosniaBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Bosnia/EasterTest.php b/tests/Bosnia/EasterTest.php index cc3be96e9..c7a588b1d 100644 --- a/tests/Bosnia/EasterTest.php +++ b/tests/Bosnia/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterTest extends BosniaBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Bosnia/IndependenceDayTest.php b/tests/Bosnia/IndependenceDayTest.php index 984f87331..ec46c59bb 100644 --- a/tests/Bosnia/IndependenceDayTest.php +++ b/tests/Bosnia/IndependenceDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class IndependenceDayTest extends BosniaBaseTestCase implements YasumiTestCaseIn /** * Tests Independence Day on or after 1992. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testIndependenceDayOnAfter1992() { @@ -50,7 +52,7 @@ public function testIndependenceDayOnAfter1992() /** * Tests Independence Day before 1992. - * @throws \ReflectionException + * @throws ReflectionException */ public function testIndependenceDayBefore1992() { @@ -63,7 +65,7 @@ public function testIndependenceDayBefore1992() /** * Tests translated name of Independence Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Bosnia/InternationalWorkersDayTest.php b/tests/Bosnia/InternationalWorkersDayTest.php index afa7ee625..f5a883fa6 100644 --- a/tests/Bosnia/InternationalWorkersDayTest.php +++ b/tests/Bosnia/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Bosnia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends BosniaBaseTestCase implements YasumiTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -43,7 +45,7 @@ public function testHoliday($year, $expected) /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * 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 + * @throws Exception */ public function HolidayDataProvider(): array { diff --git a/tests/Bosnia/NewYearsDayTest.php b/tests/Bosnia/NewYearsDayTest.php index 4df11e0b9..3b1276d92 100644 --- a/tests/Bosnia/NewYearsDayTest.php +++ b/tests/Bosnia/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Bosnia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends BosniaBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Bosnia/OrthodoxChristmasDay.php b/tests/Bosnia/OrthodoxChristmasDay.php index 2a89a3350..4a3bfc0bf 100644 --- a/tests/Bosnia/OrthodoxChristmasDay.php +++ b/tests/Bosnia/OrthodoxChristmasDay.php @@ -12,6 +12,9 @@ namespace Yasumi\tests\Bosnia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -28,7 +31,7 @@ class OrthodoxChristmasDay extends BosniaBaseTestCase implements YasumiTestCaseI /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -39,18 +42,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -64,7 +67,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Bosnia/SecondLabourDay.php b/tests/Bosnia/SecondLabourDay.php index 40ed71c6a..b2d4d278d 100644 --- a/tests/Bosnia/SecondLabourDay.php +++ b/tests/Bosnia/SecondLabourDay.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Bosnia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class SecondLabourDay extends BosniaBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -43,7 +45,7 @@ public function testHoliday($year, $expected) /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * 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 + * @throws Exception */ public function HolidayDataProvider(): array { diff --git a/tests/Bosnia/StatehoodDayTest.php b/tests/Bosnia/StatehoodDayTest.php index ae31d77ee..6c2ba836a 100644 --- a/tests/Bosnia/StatehoodDayTest.php +++ b/tests/Bosnia/StatehoodDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class StatehoodDayTest extends BosniaBaseTestCase implements YasumiTestCaseInter /** * Tests Statehood Day on or after 1943. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testStatehoodDayOnAfter1943() { @@ -50,7 +52,7 @@ public function testStatehoodDayOnAfter1943() /** * Tests Statehood Day before 1943. - * @throws \ReflectionException + * @throws ReflectionException */ public function testStatehoodDayBefore1943() { @@ -63,7 +65,7 @@ public function testStatehoodDayBefore1943() /** * Tests translated name of Statehood Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Brazil/AllSoulsDayTest.php b/tests/Brazil/AllSoulsDayTest.php index f7e56c412..0cedc7f1d 100644 --- a/tests/Brazil/AllSoulsDayTest.php +++ b/tests/Brazil/AllSoulsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class AllSoulsDayTest extends BrazilBaseTestCase implements YasumiTestCaseInterf /** * Tests Dia dos Finados on or after 1300. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testDiaDosFinadosAfter1300() { @@ -50,7 +52,7 @@ public function testDiaDosFinadosAfter1300() /** * Tests Dia dos Finados on or before 1300. - * @throws \ReflectionException + * @throws ReflectionException */ public function testDiaDosFinadosBefore1300() { @@ -60,7 +62,7 @@ public function testDiaDosFinadosBefore1300() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -70,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Brazil/AshWednesdayTest.php b/tests/Brazil/AshWednesdayTest.php index 09c28dc61..b1607233f 100644 --- a/tests/Brazil/AshWednesdayTest.php +++ b/tests/Brazil/AshWednesdayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AshWednesdayTest extends BrazilBaseTestCase implements YasumiTestCaseInter /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of Ash Wednesday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Brazil/BrazilTest.php b/tests/Brazil/BrazilTest.php index 51be5944d..e3e218e83 100644 --- a/tests/Brazil/BrazilTest.php +++ b/tests/Brazil/BrazilTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Brazil; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class BrazilTest extends BrazilBaseTestCase /** * Tests if all official holidays in Brazil are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -45,7 +46,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Brazil are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -60,7 +61,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Brazil are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -69,7 +70,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Brazil are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -78,7 +79,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Brazil are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Brazil/CarnavalMondayTest.php b/tests/Brazil/CarnavalMondayTest.php index b207fc4c3..a22f1c216 100644 --- a/tests/Brazil/CarnavalMondayTest.php +++ b/tests/Brazil/CarnavalMondayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Brazil; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -37,8 +39,8 @@ class CarnavalMondayTest extends BrazilBaseTestCase implements YasumiTestCaseInt /** * Tests Carnaval Monday on or after 1700. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCarnavalMondayAfter1700() { @@ -53,7 +55,7 @@ public function testCarnavalMondayAfter1700() /** * Tests Carnaval Monday on or before 1700. - * @throws \ReflectionException + * @throws ReflectionException */ public function testCarnavalMondayBefore1700() { @@ -63,7 +65,7 @@ public function testCarnavalMondayBefore1700() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -73,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Brazil/CarnavalTuesdayTest.php b/tests/Brazil/CarnavalTuesdayTest.php index 84e6b8281..931e2cc6d 100644 --- a/tests/Brazil/CarnavalTuesdayTest.php +++ b/tests/Brazil/CarnavalTuesdayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Brazil; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -37,8 +39,8 @@ class CarnavalTuesdayTest extends BrazilBaseTestCase implements YasumiTestCaseIn /** * Tests Carnaval Tuesday on or after 1700. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCarnavalTuesdayAfter1700() { @@ -53,7 +55,7 @@ public function testCarnavalTuesdayAfter1700() /** * Tests Carnaval Tuesday on or before 1700. - * @throws \ReflectionException + * @throws ReflectionException */ public function testCarnavalTuesdayBefore1700() { @@ -63,7 +65,7 @@ public function testCarnavalTuesdayBefore1700() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -73,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Brazil/ChristmasDayTest.php b/tests/Brazil/ChristmasDayTest.php index c67825709..593f3c1a9 100644 --- a/tests/Brazil/ChristmasDayTest.php +++ b/tests/Brazil/ChristmasDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class ChristmasDayTest extends BrazilBaseTestCase implements YasumiTestCaseInter /** * Tests Christmas Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testChristmasDay() { @@ -45,7 +47,7 @@ public function testChristmasDay() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Brazil/CorpusChristiTest.php b/tests/Brazil/CorpusChristiTest.php index fc600e826..be1d3d89e 100644 --- a/tests/Brazil/CorpusChristiTest.php +++ b/tests/Brazil/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Brazil; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends BrazilBaseTestCase implements YasumiTestCaseInte /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Brazil/EasterTest.php b/tests/Brazil/EasterTest.php index a29ceb028..e7af39897 100644 --- a/tests/Brazil/EasterTest.php +++ b/tests/Brazil/EasterTest.php @@ -12,6 +12,8 @@ namespace Yasumi\tests\Brazil; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class EasterTest extends BrazilBaseTestCase implements YasumiTestCaseInterface /** * Tests Easter. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEaster() { @@ -41,7 +43,7 @@ public function testEaster() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -55,7 +57,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Brazil/GoodFridayTest.php b/tests/Brazil/GoodFridayTest.php index 7b224dd89..440075c5d 100644 --- a/tests/Brazil/GoodFridayTest.php +++ b/tests/Brazil/GoodFridayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Brazil; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class GoodFridayTest extends BrazilBaseTestCase implements YasumiTestCaseInterfa /** * Tests Good Friday. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testGoodFriday() { @@ -48,7 +50,7 @@ public function testGoodFriday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Brazil/IndependenceDayTest.php b/tests/Brazil/IndependenceDayTest.php index e58f9cfbd..3bd1a6128 100644 --- a/tests/Brazil/IndependenceDayTest.php +++ b/tests/Brazil/IndependenceDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class IndependenceDayTest extends BrazilBaseTestCase implements YasumiTestCaseIn /** * Tests Dia da independência do Brasil on or after 1822. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testDiaDaIndependenciaDoBrasilAfter1822() { @@ -50,7 +52,7 @@ public function testDiaDaIndependenciaDoBrasilAfter1822() /** * Tests Dia da independência do Brasil on or before 1822. - * @throws \ReflectionException + * @throws ReflectionException */ public function testDiaDaIndependenciaDoBrasilBefore1822() { @@ -60,7 +62,7 @@ public function testDiaDaIndependenciaDoBrasilBefore1822() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -75,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Brazil/InternationalWorkersDayTest.php b/tests/Brazil/InternationalWorkersDayTest.php index 8f1d3aea6..c2c724b49 100644 --- a/tests/Brazil/InternationalWorkersDayTest.php +++ b/tests/Brazil/InternationalWorkersDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class InternationalWorkersDayTest extends BrazilBaseTestCase implements YasumiTe /** * Tests International Workers' Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testInternationalWorkersDay() { @@ -45,7 +47,7 @@ public function testInternationalWorkersDay() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Brazil/NewYearsDayTest.php b/tests/Brazil/NewYearsDayTest.php index d02cdd9e0..dfeda171c 100644 --- a/tests/Brazil/NewYearsDayTest.php +++ b/tests/Brazil/NewYearsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class NewYearsDayTest extends BrazilBaseTestCase implements YasumiTestCaseInterf /** * Tests New Years Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testNewYearsDay() { @@ -45,7 +47,7 @@ public function testNewYearsDay() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Brazil/OurLadyOfAparecidaDayTest.php b/tests/Brazil/OurLadyOfAparecidaDayTest.php index b07dbd2e9..5b20b1f42 100644 --- a/tests/Brazil/OurLadyOfAparecidaDayTest.php +++ b/tests/Brazil/OurLadyOfAparecidaDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class OurLadyOfAparecidaDayTest extends BrazilBaseTestCase implements YasumiTest /** * Tests Nossa Senhora Aparecida on or after 1980. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testNossaSenhoraAparecidaAfter1980() { @@ -50,7 +52,7 @@ public function testNossaSenhoraAparecidaAfter1980() /** * Tests Nossa Senhora Aparecida on or before 1980. - * @throws \ReflectionException + * @throws ReflectionException */ public function testNossaSenhoraAparecidaBefore1980() { @@ -60,7 +62,7 @@ public function testNossaSenhoraAparecidaBefore1980() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -75,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Brazil/ProclamationOfRepublicDayTest.php b/tests/Brazil/ProclamationOfRepublicDayTest.php index 0ec657fb4..e1eb84f1f 100644 --- a/tests/Brazil/ProclamationOfRepublicDayTest.php +++ b/tests/Brazil/ProclamationOfRepublicDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class ProclamationOfRepublicDayTest extends BrazilBaseTestCase implements Yasumi /** * Tests Proclamação da República on or after 1889. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testProclamacaoDaRepublicaAfter1889() { @@ -50,7 +52,7 @@ public function testProclamacaoDaRepublicaAfter1889() /** * Tests Proclamação da República on or before 1889. - * @throws \ReflectionException + * @throws ReflectionException */ public function testProclamacaoDaRepublicaBefore1889() { @@ -60,7 +62,7 @@ public function testProclamacaoDaRepublicaBefore1889() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -75,7 +77,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Brazil/TiradentesDayTest.php b/tests/Brazil/TiradentesDayTest.php index 33bdfc3e3..f364533e6 100644 --- a/tests/Brazil/TiradentesDayTest.php +++ b/tests/Brazil/TiradentesDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class TiradentesDayTest extends BrazilBaseTestCase implements YasumiTestCaseInte /** * Tests Dia de Tiradentes on or after 1792. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testDiaDeTiradentesAfter1792() { @@ -50,7 +52,7 @@ public function testDiaDeTiradentesAfter1792() /** * Tests Dia de Tiradentes on or before 1792. - * @throws \ReflectionException + * @throws ReflectionException */ public function testDiaDeTiradentesBefore1792() { @@ -60,7 +62,7 @@ public function testDiaDeTiradentesBefore1792() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -70,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Croatia/AllSaintsDayTest.php b/tests/Croatia/AllSaintsDayTest.php index 15131e1d4..7866daff8 100644 --- a/tests/Croatia/AllSaintsDayTest.php +++ b/tests/Croatia/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Croatia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Croatia/AntifascistStruggleDayTest.php b/tests/Croatia/AntifascistStruggleDayTest.php index cfc706271..3f14869fb 100644 --- a/tests/Croatia/AntifascistStruggleDayTest.php +++ b/tests/Croatia/AntifascistStruggleDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class AntifascistStruggleDayTest extends CroatiaBaseTestCase implements YasumiTe /** * Tests Day of Antifascist Struggle on or after 1941. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAntifascistStruggleDayOnAfter1941() { @@ -50,7 +52,7 @@ public function testAntifascistStruggleDayOnAfter1941() /** * Tests Day of Antifascist Struggle before 1941. - * @throws \ReflectionException + * @throws ReflectionException */ public function testAntifascistStruggleDayBefore1941() { @@ -63,7 +65,7 @@ public function testAntifascistStruggleDayBefore1941() /** * Tests translated name of Day of Antifascist Struggle. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Croatia/AssumptionOfMaryTest.php b/tests/Croatia/AssumptionOfMaryTest.php index 929abb1fc..f10dc0e8e 100644 --- a/tests/Croatia/AssumptionOfMaryTest.php +++ b/tests/Croatia/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Croatia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends CroatiaBaseTestCase implements YasumiTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Croatia/ChristmasDayTest.php b/tests/Croatia/ChristmasDayTest.php index 283698c5a..68079844d 100644 --- a/tests/Croatia/ChristmasDayTest.php +++ b/tests/Croatia/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Croatia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Croatia/CorpusChristiTest.php b/tests/Croatia/CorpusChristiTest.php index 6602c763c..dacfdc998 100644 --- a/tests/Croatia/CorpusChristiTest.php +++ b/tests/Croatia/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Croatia; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends CroatiaBaseTestCase implements YasumiTestCaseInt /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Croatia/EasterMondayTest.php b/tests/Croatia/EasterMondayTest.php index 74075bd2b..b38eab3cc 100644 --- a/tests/Croatia/EasterMondayTest.php +++ b/tests/Croatia/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends CroatiaBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Croatia/EasterTest.php b/tests/Croatia/EasterTest.php index 6f0c23abb..c6abf1393 100644 --- a/tests/Croatia/EasterTest.php +++ b/tests/Croatia/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterTest extends CroatiaBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Croatia/EpiphanyTest.php b/tests/Croatia/EpiphanyTest.php index 018767e6a..f367e45fd 100644 --- a/tests/Croatia/EpiphanyTest.php +++ b/tests/Croatia/EpiphanyTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Croatia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class EpiphanyTest extends CroatiaBaseTestCase implements YasumiTestCaseInterfac * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Croatia/HomelandThanksgivingDayTest.php b/tests/Croatia/HomelandThanksgivingDayTest.php index 4035147ea..f50cd5711 100644 --- a/tests/Croatia/HomelandThanksgivingDayTest.php +++ b/tests/Croatia/HomelandThanksgivingDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class HomelandThanksgivingDayTest extends CroatiaBaseTestCase implements YasumiT /** * Tests Homeland Thanksgiving Day on or after 1995. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHomelandThanksgivingDayOnAfter1995() { @@ -50,7 +52,7 @@ public function testHomelandThanksgivingDayOnAfter1995() /** * Tests Homeland Thanksgiving Day before 1995. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHomelandThanksgivingDayBefore1995() { @@ -63,7 +65,7 @@ public function testHomelandThanksgivingDayBefore1995() /** * Tests translated name of Homeland Thanksgiving Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Croatia/IndependenceDayTest.php b/tests/Croatia/IndependenceDayTest.php index 42959b6e2..9554e2234 100644 --- a/tests/Croatia/IndependenceDayTest.php +++ b/tests/Croatia/IndependenceDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class IndependenceDayTest extends CroatiaBaseTestCase implements YasumiTestCaseI /** * Tests Independence Day on or after 1991. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testIndependenceDayOnAfter1991() { @@ -50,7 +52,7 @@ public function testIndependenceDayOnAfter1991() /** * Tests Independence Day before 1991. - * @throws \ReflectionException + * @throws ReflectionException */ public function testIndependenceDayBefore1991() { @@ -63,7 +65,7 @@ public function testIndependenceDayBefore1991() /** * Tests translated name of Independence Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Croatia/InternationalWorkersDayTest.php b/tests/Croatia/InternationalWorkersDayTest.php index f5adbb129..134f070a9 100644 --- a/tests/Croatia/InternationalWorkersDayTest.php +++ b/tests/Croatia/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Croatia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends CroatiaBaseTestCase implements YasumiT * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -43,7 +45,7 @@ public function testHoliday($year, $expected) /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * 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 + * @throws Exception */ public function HolidayDataProvider(): array { diff --git a/tests/Croatia/NewYearsDayTest.php b/tests/Croatia/NewYearsDayTest.php index 950067c16..2aa293fda 100644 --- a/tests/Croatia/NewYearsDayTest.php +++ b/tests/Croatia/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Croatia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Croatia/StStephensDayTest.php b/tests/Croatia/StStephensDayTest.php index 0873aa07e..5e5045b24 100644 --- a/tests/Croatia/StStephensDayTest.php +++ b/tests/Croatia/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Croatia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which St. Stephen's Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function teststStephensDay($year, $expected) { @@ -45,7 +47,7 @@ public function teststStephensDay($year, $expected) * Returns a list of random test dates used for assertion of St. Stephen's Day. * * @return array list of test dates for St. Stephen's Day - * @throws \Exception + * @throws Exception */ public function stStephensDayDataProvider(): array { @@ -54,7 +56,7 @@ public function stStephensDayDataProvider(): array /** * Tests translated name of St. Stephen's Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Croatia/StatehoodDayTest.php b/tests/Croatia/StatehoodDayTest.php index ccd5ecf43..95d511fd2 100644 --- a/tests/Croatia/StatehoodDayTest.php +++ b/tests/Croatia/StatehoodDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class StatehoodDayTest extends CroatiaBaseTestCase implements YasumiTestCaseInte /** * Tests Statehood Day on or after 1991. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testStatehoodDayOnAfter1991() { @@ -50,7 +52,7 @@ public function testStatehoodDayOnAfter1991() /** * Tests Statehood Day before 1991. - * @throws \ReflectionException + * @throws ReflectionException */ public function testStatehoodDayBefore1991() { @@ -63,7 +65,7 @@ public function testStatehoodDayBefore1991() /** * Tests translated name of Statehood Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/ChristmasDayTest.php b/tests/CzechRepublic/ChristmasDayTest.php index f979bed92..12c19beab 100644 --- a/tests/CzechRepublic/ChristmasDayTest.php +++ b/tests/CzechRepublic/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\CzechRepublic; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -38,7 +40,7 @@ class ChristmasDayTest extends CzechRepublicBaseTestCase implements YasumiTestCa * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -49,7 +51,7 @@ public function testChristmasDay($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -58,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -72,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/ChristmasEveTest.php b/tests/CzechRepublic/ChristmasEveTest.php index 0f952a585..21fad738e 100644 --- a/tests/CzechRepublic/ChristmasEveTest.php +++ b/tests/CzechRepublic/ChristmasEveTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\CzechRepublic; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -38,7 +40,7 @@ class ChristmasEveTest extends CzechRepublicBaseTestCase implements YasumiTestCa * @param int $year the year for which Christmas Eve needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -49,7 +51,7 @@ public function testChristmasDay($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -58,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -72,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/CzechRepublicTest.php b/tests/CzechRepublic/CzechRepublicTest.php index ca7be7266..ed0f6a8b9 100644 --- a/tests/CzechRepublic/CzechRepublicTest.php +++ b/tests/CzechRepublic/CzechRepublicTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\CzechRepublic; +use ReflectionException; use Yasumi\Holiday; /** @@ -30,7 +31,7 @@ class CzechRepublicTest extends CzechRepublicBaseTestCase /** * Tests if all official holidays in Finland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -53,7 +54,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the Czech Republic are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -62,7 +63,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the Czech Republic are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -71,7 +72,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the Czech Republic are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -80,7 +81,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the Czech Republic are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/CzechRepublic/CzechStateHoodDayTest.php b/tests/CzechRepublic/CzechStateHoodDayTest.php index cf49130e2..852137b07 100644 --- a/tests/CzechRepublic/CzechStateHoodDayTest.php +++ b/tests/CzechRepublic/CzechStateHoodDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\CzechRepublic; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -38,7 +40,7 @@ class CzechStateHoodDayTest extends CzechRepublicBaseTestCase implements YasumiT * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -49,7 +51,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -58,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -72,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/EasterMondayTest.php b/tests/CzechRepublic/EasterMondayTest.php index 453c27395..7c130bf4b 100644 --- a/tests/CzechRepublic/EasterMondayTest.php +++ b/tests/CzechRepublic/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -33,8 +35,8 @@ class EasterMondayTest extends CzechRepublicBaseTestCase implements YasumiTestCa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -49,7 +51,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -63,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/GoodFridayTest.php b/tests/CzechRepublic/GoodFridayTest.php index 457c2b682..fbf426e71 100644 --- a/tests/CzechRepublic/GoodFridayTest.php +++ b/tests/CzechRepublic/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -33,8 +35,8 @@ class GoodFridayTest extends CzechRepublicBaseTestCase implements YasumiTestCase /** * Tests Good Friday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testGoodFriday() { @@ -49,7 +51,7 @@ public function testGoodFriday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -63,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php index 045b5747a..7658a79c3 100644 --- a/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php +++ b/tests/CzechRepublic/IndependentCzechoslovakStateDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\CzechRepublic; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class IndependentCzechoslovakStateDayTest extends CzechRepublicBaseTestCase impl * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/InternationalWorkersDayTest.php b/tests/CzechRepublic/InternationalWorkersDayTest.php index ba95c2319..1217b5628 100644 --- a/tests/CzechRepublic/InternationalWorkersDayTest.php +++ b/tests/CzechRepublic/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\CzechRepublic; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -38,7 +40,7 @@ class InternationalWorkersDayTest extends CzechRepublicBaseTestCase implements Y * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -47,7 +49,7 @@ public function testHoliday($year, $expected) /** * Tests translated name of International Workers' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -61,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -72,7 +74,7 @@ public function testHolidayType(): void * 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 + * @throws Exception */ public function HolidayDataProvider(): array { diff --git a/tests/CzechRepublic/JanHusDayTest.php b/tests/CzechRepublic/JanHusDayTest.php index 5c480251b..296e1b6f9 100644 --- a/tests/CzechRepublic/JanHusDayTest.php +++ b/tests/CzechRepublic/JanHusDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\CzechRepublic; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class JanHusDayTest extends CzechRepublicBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/NewYearsDayTest.php b/tests/CzechRepublic/NewYearsDayTest.php index b4a0739b6..d8cc5ede9 100644 --- a/tests/CzechRepublic/NewYearsDayTest.php +++ b/tests/CzechRepublic/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\CzechRepublic; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -38,7 +40,7 @@ class NewYearsDayTest extends CzechRepublicBaseTestCase implements YasumiTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -49,7 +51,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -58,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -72,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php index 4e953f090..6bcd90c60 100644 --- a/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php +++ b/tests/CzechRepublic/RenewalOfIndependentCzechStateDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\CzechRepublic; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -39,7 +41,7 @@ class RenewalOfIndependentCzechStateDayTest extends CzechRepublicBaseTestCase im * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -50,7 +52,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -59,7 +61,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -73,7 +75,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php index c92de2e39..ebc906ac5 100644 --- a/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\CzechRepublic; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -38,7 +40,7 @@ class SaintsCyrilAndMethodiusDayTest extends CzechRepublicBaseTestCase implement * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -49,7 +51,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -58,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -72,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/SecondChristmasDayTest.php b/tests/CzechRepublic/SecondChristmasDayTest.php index 1accc6809..2154797a0 100644 --- a/tests/CzechRepublic/SecondChristmasDayTest.php +++ b/tests/CzechRepublic/SecondChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\CzechRepublic; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -38,7 +40,7 @@ class SecondChristmasDayTest extends CzechRepublicBaseTestCase implements Yasumi * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -49,7 +51,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -58,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -72,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php index 2386dc424..fd6816c2a 100644 --- a/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/CzechRepublic/StruggleForFreedomAndDemocracyDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\CzechRepublic; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StruggleForFreedomAndDemocracyDayTest extends CzechRepublicBaseTestCase im * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/CzechRepublic/VictoryInEuropeDayTest.php b/tests/CzechRepublic/VictoryInEuropeDayTest.php index 22743f24c..8b0bc9823 100644 --- a/tests/CzechRepublic/VictoryInEuropeDayTest.php +++ b/tests/CzechRepublic/VictoryInEuropeDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\CzechRepublic; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -38,7 +40,7 @@ class VictoryInEuropeDayTest extends CzechRepublicBaseTestCase implements Yasumi * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -49,7 +51,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -58,7 +60,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -72,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/AscensionDayTest.php b/tests/Denmark/AscensionDayTest.php index b4503897f..39acae9b5 100644 --- a/tests/Denmark/AscensionDayTest.php +++ b/tests/Denmark/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends DenmarkBaseTestCase implements YasumiTestCaseInte /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/ChristmasDayTest.php b/tests/Denmark/ChristmasDayTest.php index ce839aa43..1ca976d3b 100644 --- a/tests/Denmark/ChristmasDayTest.php +++ b/tests/Denmark/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Denmark; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends DenmarkBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/ChristmasEveTest.php b/tests/Denmark/ChristmasEveTest.php index be7107e94..d39e8d457 100644 --- a/tests/Denmark/ChristmasEveTest.php +++ b/tests/Denmark/ChristmasEveTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Denmark; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasEveTest extends DenmarkBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/ConstitutionDayTest.php b/tests/Denmark/ConstitutionDayTest.php index 8cbff6a51..478a43b1e 100644 --- a/tests/Denmark/ConstitutionDayTest.php +++ b/tests/Denmark/ConstitutionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class ConstitutionDayTest extends DenmarkBaseTestCase implements YasumiTestCaseI /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/DenmarkTest.php b/tests/Denmark/DenmarkTest.php index 4f2f1f633..5a3a6320b 100644 --- a/tests/Denmark/DenmarkTest.php +++ b/tests/Denmark/DenmarkTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Denmark; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class DenmarkTest extends DenmarkBaseTestCase /** * Tests if all official holidays in Denmark are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Denmark are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -61,7 +62,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Denmark are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -71,7 +72,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Denmark are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -80,7 +81,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Denmark are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Denmark/EasterMondayTest.php b/tests/Denmark/EasterMondayTest.php index 5a6e067a8..8a2660e16 100644 --- a/tests/Denmark/EasterMondayTest.php +++ b/tests/Denmark/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends DenmarkBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/EasterTest.php b/tests/Denmark/EasterTest.php index 6f286f4ce..d89b027cb 100644 --- a/tests/Denmark/EasterTest.php +++ b/tests/Denmark/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterTest extends DenmarkBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/GoodFridayTest.php b/tests/Denmark/GoodFridayTest.php index 6aadb77ff..e28a3862d 100644 --- a/tests/Denmark/GoodFridayTest.php +++ b/tests/Denmark/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends DenmarkBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/GreatPrayerDayTest.php b/tests/Denmark/GreatPrayerDayTest.php index a142c5bf7..df0e2ffc1 100644 --- a/tests/Denmark/GreatPrayerDayTest.php +++ b/tests/Denmark/GreatPrayerDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class GreatPrayerDayTest extends DenmarkBaseTestCase implements YasumiTestCaseIn /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/InternationalWorkersDayTest.php b/tests/Denmark/InternationalWorkersDayTest.php index 21e3ff8c9..24e349606 100644 --- a/tests/Denmark/InternationalWorkersDayTest.php +++ b/tests/Denmark/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Denmark; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends DenmarkBaseTestCase implements YasumiT * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testInternationalWorkersDay($year, $expected) { @@ -45,7 +47,7 @@ public function testInternationalWorkersDay($year, $expected) * Returns a list of random test dates used for assertion of International Workers' Day. * * @return array list of test dates for International Workers' Day - * @throws \Exception + * @throws Exception */ public function InternationalWorkersDayDataProvider(): array { @@ -54,7 +56,7 @@ public function InternationalWorkersDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/MaundyThursdayTest.php b/tests/Denmark/MaundyThursdayTest.php index cea50ed98..4b95f8c88 100644 --- a/tests/Denmark/MaundyThursdayTest.php +++ b/tests/Denmark/MaundyThursdayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class MaundyThursdayTest extends DenmarkBaseTestCase implements YasumiTestCaseIn /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/NewYearsDayTest.php b/tests/Denmark/NewYearsDayTest.php index 39d3119e6..2dd400e29 100644 --- a/tests/Denmark/NewYearsDayTest.php +++ b/tests/Denmark/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Denmark; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends DenmarkBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/NewYearsEveTest.php b/tests/Denmark/NewYearsEveTest.php index a292c0719..db6557f7e 100644 --- a/tests/Denmark/NewYearsEveTest.php +++ b/tests/Denmark/NewYearsEveTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Denmark; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsEveTest extends DenmarkBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/PentecostMondayTest.php b/tests/Denmark/PentecostMondayTest.php index 39a8ac9c3..3ee6dc76c 100644 --- a/tests/Denmark/PentecostMondayTest.php +++ b/tests/Denmark/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends DenmarkBaseTestCase implements YasumiTestCaseI /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/PentecostTest.php b/tests/Denmark/PentecostTest.php index f0b4ccaa4..b790a6572 100644 --- a/tests/Denmark/PentecostTest.php +++ b/tests/Denmark/PentecostTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostTest extends DenmarkBaseTestCase implements YasumiTestCaseInterfa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/SecondChristmasDayTest.php b/tests/Denmark/SecondChristmasDayTest.php index db9f4ad1f..62568cd18 100644 --- a/tests/Denmark/SecondChristmasDayTest.php +++ b/tests/Denmark/SecondChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Denmark; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class SecondChristmasDayTest extends DenmarkBaseTestCase implements YasumiTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/SummerTimeTest.php b/tests/Denmark/SummerTimeTest.php index d706f5281..b02c4da3c 100644 --- a/tests/Denmark/SummerTimeTest.php +++ b/tests/Denmark/SummerTimeTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class SummerTimeTest extends DenmarkBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testSummerTime() { @@ -55,7 +57,7 @@ public function testSummerTime() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -69,7 +71,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Denmark/WinterTimeTest.php b/tests/Denmark/WinterTimeTest.php index 8d0f9d16e..0bca41a77 100644 --- a/tests/Denmark/WinterTimeTest.php +++ b/tests/Denmark/WinterTimeTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class WinterTimeTest extends DenmarkBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testWinterTime() { @@ -56,7 +58,7 @@ public function testWinterTime() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -70,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Estonia/ChristmasDayTest.php b/tests/Estonia/ChristmasDayTest.php index 74840d4be..f08a613f0 100644 --- a/tests/Estonia/ChristmasDayTest.php +++ b/tests/Estonia/ChristmasDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Estonia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class ChristmasDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInte /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Estonia/ChristmasEveDayTest.php b/tests/Estonia/ChristmasEveDayTest.php index a4e82c6b1..02ec59754 100644 --- a/tests/Estonia/ChristmasEveDayTest.php +++ b/tests/Estonia/ChristmasEveDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Estonia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class ChristmasEveDayTest extends EstoniaBaseTestCase implements YasumiTestCaseI /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Estonia/EasterDayTest.php b/tests/Estonia/EasterDayTest.php index f31b2394d..9651839ff 100644 --- a/tests/Estonia/EasterDayTest.php +++ b/tests/Estonia/EasterDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Estonia; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +34,7 @@ class EasterDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInterfa /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -45,8 +49,8 @@ public function holidayDataProvider(): array * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -54,13 +58,13 @@ public function testHoliday($year, $expected) self::REGION, self::HOLIDAY, $year, - new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -74,7 +78,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Estonia/EstoniaTest.php b/tests/Estonia/EstoniaTest.php index 522f720e7..40474fe17 100644 --- a/tests/Estonia/EstoniaTest.php +++ b/tests/Estonia/EstoniaTest.php @@ -13,6 +13,7 @@ namespace Yasumi\tests\Estonia; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Estonia; @@ -25,7 +26,7 @@ class EstoniaTest extends EstoniaBaseTestCase { /** * Tests if all official holidays in Estonia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -60,7 +61,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Estonia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -69,7 +70,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Estonia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -78,7 +79,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Estonia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -87,7 +88,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Estonia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Estonia/GoodFridayDayTest.php b/tests/Estonia/GoodFridayDayTest.php index 690b6c8e5..fb7f47e1d 100644 --- a/tests/Estonia/GoodFridayDayTest.php +++ b/tests/Estonia/GoodFridayDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Estonia; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,7 +35,7 @@ class GoodFridayDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInt /** * @return array * - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -46,8 +50,8 @@ public function holidayDataProvider(): array * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -55,13 +59,13 @@ public function testHoliday($year, $expected) self::REGION, self::HOLIDAY, $year, - new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -75,7 +79,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Estonia/IndependenceDayTest.php b/tests/Estonia/IndependenceDayTest.php index 88cc5f89d..eaa0fce6e 100644 --- a/tests/Estonia/IndependenceDayTest.php +++ b/tests/Estonia/IndependenceDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Estonia; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Estonia; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,7 +35,7 @@ class IndependenceDayTest extends EstoniaBaseTestCase implements YasumiTestCaseI /** * Test if holiday is not defined before - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBefore() { @@ -44,8 +48,8 @@ public function testHolidayBefore() /** * Test if holiday is defined after - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayAfter() { @@ -55,14 +59,14 @@ public function testHolidayAfter() self::REGION, self::HOLIDAY, $year, - new \DateTime("{$year}-02-24", new \DateTimeZone(self::TIMEZONE)) + new DateTime("{$year}-02-24", new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -82,7 +86,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Estonia/InternationalWorkersDayTest.php b/tests/Estonia/InternationalWorkersDayTest.php index ed6c94fd8..d0aa10171 100644 --- a/tests/Estonia/InternationalWorkersDayTest.php +++ b/tests/Estonia/InternationalWorkersDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Estonia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class InternationalWorkersDayTest extends EstoniaBaseTestCase implements YasumiT /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Estonia/NewYearsDayTest.php b/tests/Estonia/NewYearsDayTest.php index 9f109171d..b620e756c 100644 --- a/tests/Estonia/NewYearsDayTest.php +++ b/tests/Estonia/NewYearsDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Estonia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class NewYearsDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInter /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Estonia/PentecostTest.php b/tests/Estonia/PentecostTest.php index e9f3e824a..9ee1479de 100644 --- a/tests/Estonia/PentecostTest.php +++ b/tests/Estonia/PentecostTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Estonia; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,7 +35,7 @@ class PentecostTest extends EstoniaBaseTestCase implements YasumiTestCaseInterfa /** * @return array * - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -46,8 +50,8 @@ public function holidayDataProvider(): array * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -55,13 +59,13 @@ public function testHoliday($year, $expected) self::REGION, self::HOLIDAY, $year, - new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -75,7 +79,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Estonia/RestorationOfIndependenceDayTest.php b/tests/Estonia/RestorationOfIndependenceDayTest.php index 45105876c..aa6167a29 100644 --- a/tests/Estonia/RestorationOfIndependenceDayTest.php +++ b/tests/Estonia/RestorationOfIndependenceDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Estonia; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Estonia; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,7 +35,7 @@ class RestorationOfIndependenceDayTest extends EstoniaBaseTestCase implements Ya /** * Test if holiday is not defined before - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBefore() { @@ -44,8 +48,8 @@ public function testHolidayBefore() /** * Test if holiday is defined after - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayAfter() { @@ -55,14 +59,14 @@ public function testHolidayAfter() self::REGION, self::HOLIDAY, $year, - new \DateTime("{$year}-08-20", new \DateTimeZone(self::TIMEZONE)) + new DateTime("{$year}-08-20", new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -82,7 +86,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Estonia/SecondChristmasDayTest.php b/tests/Estonia/SecondChristmasDayTest.php index f98c48734..d5e051d89 100644 --- a/tests/Estonia/SecondChristmasDayTest.php +++ b/tests/Estonia/SecondChristmasDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Estonia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class SecondChristmasDayTest extends EstoniaBaseTestCase implements YasumiTestCa /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Estonia/StJohnsDayTest.php b/tests/Estonia/StJohnsDayTest.php index 52a79b6f4..dd2f489fc 100644 --- a/tests/Estonia/StJohnsDayTest.php +++ b/tests/Estonia/StJohnsDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Estonia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class StJohnsDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInterf /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Estonia/VictoryDayTest.php b/tests/Estonia/VictoryDayTest.php index 4fcaa36c0..9e9f7a50b 100644 --- a/tests/Estonia/VictoryDayTest.php +++ b/tests/Estonia/VictoryDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Estonia; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Estonia; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,7 +35,7 @@ class VictoryDayTest extends EstoniaBaseTestCase implements YasumiTestCaseInterf /** * Test if holiday is not defined before - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBefore() { @@ -44,8 +48,8 @@ public function testHolidayBefore() /** * Test if holiday is defined after - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayAfter() { @@ -55,14 +59,14 @@ public function testHolidayAfter() self::REGION, self::HOLIDAY, $year, - new \DateTime("{$year}-06-23", new \DateTimeZone(self::TIMEZONE)) + new DateTime("{$year}-06-23", new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -82,7 +86,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Finland/AllSaintsDayTest.php b/tests/Finland/AllSaintsDayTest.php index 56a57563e..c6e010822 100644 --- a/tests/Finland/AllSaintsDayTest.php +++ b/tests/Finland/AllSaintsDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,7 +38,7 @@ class AllSaintsDayTest extends FinlandBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -47,7 +49,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -72,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -86,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Finland/AscensionDayTest.php b/tests/Finland/AscensionDayTest.php index 5d848273f..4a5b06517 100644 --- a/tests/Finland/AscensionDayTest.php +++ b/tests/Finland/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends FinlandBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Finland/ChristmasDayTest.php b/tests/Finland/ChristmasDayTest.php index 617a555c9..1ad5bc908 100644 --- a/tests/Finland/ChristmasDayTest.php +++ b/tests/Finland/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Finland; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends FinlandBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Finland/EasterMondayTest.php b/tests/Finland/EasterMondayTest.php index 91970d0ce..eabdacedf 100644 --- a/tests/Finland/EasterMondayTest.php +++ b/tests/Finland/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends FinlandBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Finland/EasterTest.php b/tests/Finland/EasterTest.php index 25d5f4ed4..ef2f00467 100644 --- a/tests/Finland/EasterTest.php +++ b/tests/Finland/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterTest extends FinlandBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Finland/EpiphanyTest.php b/tests/Finland/EpiphanyTest.php index 146d5cab5..167d64c13 100644 --- a/tests/Finland/EpiphanyTest.php +++ b/tests/Finland/EpiphanyTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Finland; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class EpiphanyTest extends FinlandBaseTestCase implements YasumiTestCaseInterfac * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Finland/FinlandTest.php b/tests/Finland/FinlandTest.php index 7bb15e9b0..f6ceeed6e 100644 --- a/tests/Finland/FinlandTest.php +++ b/tests/Finland/FinlandTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Finland; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class FinlandTest extends FinlandBaseTestCase /** * Tests if all official holidays in Finland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -49,7 +50,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Finland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -58,7 +59,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Finland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -67,7 +68,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Finland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -76,7 +77,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Finland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Finland/GoodFridayTest.php b/tests/Finland/GoodFridayTest.php index c5e22985a..d9d91084a 100644 --- a/tests/Finland/GoodFridayTest.php +++ b/tests/Finland/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends FinlandBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Finland/IndependenceDayTest.php b/tests/Finland/IndependenceDayTest.php index eaae9484e..06004919c 100644 --- a/tests/Finland/IndependenceDayTest.php +++ b/tests/Finland/IndependenceDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class IndependenceDayTest extends FinlandBaseTestCase implements YasumiTestCaseI /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Finland/InternationalWorkersDayTest.php b/tests/Finland/InternationalWorkersDayTest.php index 05dc497f6..d5fa678e5 100644 --- a/tests/Finland/InternationalWorkersDayTest.php +++ b/tests/Finland/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Finland; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends FinlandBaseTestCase implements YasumiT * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -43,7 +45,7 @@ public function testHoliday($year, $expected) /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * 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 + * @throws Exception */ public function HolidayDataProvider(): array { diff --git a/tests/Finland/NewYearsDayTest.php b/tests/Finland/NewYearsDayTest.php index be39c3eff..da58594a9 100644 --- a/tests/Finland/NewYearsDayTest.php +++ b/tests/Finland/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Finland; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends FinlandBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Finland/PentecostTest.php b/tests/Finland/PentecostTest.php index b153a888f..71e76323c 100644 --- a/tests/Finland/PentecostTest.php +++ b/tests/Finland/PentecostTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostTest extends FinlandBaseTestCase implements YasumiTestCaseInterfa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Finland/SecondChristmasDayTest.php b/tests/Finland/SecondChristmasDayTest.php index f400c917f..023f85813 100644 --- a/tests/Finland/SecondChristmasDayTest.php +++ b/tests/Finland/SecondChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Finland; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class SecondChristmasDayTest extends FinlandBaseTestCase implements YasumiTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Finland/stJohnsDayTest.php b/tests/Finland/stJohnsDayTest.php index 0ec4c6f28..25305f692 100644 --- a/tests/Finland/stJohnsDayTest.php +++ b/tests/Finland/stJohnsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; use Yasumi\Yasumi; @@ -39,8 +41,8 @@ class stJohnsDayTest extends FinlandBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday before it was adjusted. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayBeforeAdjustment() { @@ -55,7 +57,7 @@ public function testHolidayBeforeAdjustment() /** * Tests the holiday before it was adjusted. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayAfterAdjustment() { @@ -79,7 +81,7 @@ public function testHolidayAfterAdjustment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/France/AllSaintsDayTest.php b/tests/France/AllSaintsDayTest.php index 7688e9d43..24726af56 100644 --- a/tests/France/AllSaintsDayTest.php +++ b/tests/France/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\France; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends FranceBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAllSaintsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testAllSaintsDay($year, $expected) /** * Tests translated name of All Saints' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of All Saints' Day. * * @return array list of test dates for All Saints' Day - * @throws \Exception + * @throws Exception */ public function AllSaintsDayDataProvider(): array { diff --git a/tests/France/ArmisticeDayTest.php b/tests/France/ArmisticeDayTest.php index 2e236b019..2fe89d40e 100644 --- a/tests/France/ArmisticeDayTest.php +++ b/tests/France/ArmisticeDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class ArmisticeDayTest extends FranceBaseTestCase implements YasumiTestCaseInter /** * Tests Armistice Day on or after 1919. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testArmisticeDayOnAfter1919() { @@ -50,7 +52,7 @@ public function testArmisticeDayOnAfter1919() /** * Tests Armistice Day before 1919. - * @throws \ReflectionException + * @throws ReflectionException */ public function testArmisticeDayBefore1919() { @@ -63,7 +65,7 @@ public function testArmisticeDayBefore1919() /** * Tests translated name of Armistice Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/France/AscensionDayTest.php b/tests/France/AscensionDayTest.php index 9b232f7ed..37122da1a 100644 --- a/tests/France/AscensionDayTest.php +++ b/tests/France/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends FranceBaseTestCase implements YasumiTestCaseInter /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/France/AssumptionOfMaryTest.php b/tests/France/AssumptionOfMaryTest.php index 3d1c77296..e78a8c5d6 100644 --- a/tests/France/AssumptionOfMaryTest.php +++ b/tests/France/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\France; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends FranceBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAssumptionOfMary($year, $expected) { @@ -43,7 +45,7 @@ public function testAssumptionOfMary($year, $expected) /** * Tests translated name of the day of the Assumption of Mary. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of the day of the Assumption of Mary. * * @return array list of test dates for the day of the Assumption of Mary - * @throws \Exception + * @throws Exception */ public function AssumptionOfMaryDataProvider(): array { diff --git a/tests/France/BasRhin/BasRhinTest.php b/tests/France/BasRhin/BasRhinTest.php index 474989283..066a297df 100644 --- a/tests/France/BasRhin/BasRhinTest.php +++ b/tests/France/BasRhin/BasRhinTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\France\BasRhin; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class BasRhinTest extends BasRhinBaseTestCase /** * Tests if all official holidays in Bas-Rhin are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -49,7 +50,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Bas-Rhin (France) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -58,7 +59,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Bas-Rhin (France) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -67,7 +68,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Bas-Rhin (France) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -76,7 +77,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Bas-Rhin (France) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/France/BasRhin/GoodFridayTest.php b/tests/France/BasRhin/GoodFridayTest.php index 4d7a688f9..850ddcb72 100644 --- a/tests/France/BasRhin/GoodFridayTest.php +++ b/tests/France/BasRhin/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends BasRhinBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/France/BasRhin/stStephensDayTest.php b/tests/France/BasRhin/stStephensDayTest.php index 1d5313082..82559c8fa 100644 --- a/tests/France/BasRhin/stStephensDayTest.php +++ b/tests/France/BasRhin/stStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\France\BasRhin; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class stStephensDayTest extends BasRhinBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/France/BastilleDayTest.php b/tests/France/BastilleDayTest.php index ecb32bd2d..4eedba225 100644 --- a/tests/France/BastilleDayTest.php +++ b/tests/France/BastilleDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class BastilleDayTest extends FranceBaseTestCase implements YasumiTestCaseInterf /** * Tests Bastille Day on or after 1790. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testBastilleDayOnAfter1790() { @@ -50,7 +52,7 @@ public function testBastilleDayOnAfter1790() /** * Tests Bastille Day before 1790. - * @throws \ReflectionException + * @throws ReflectionException */ public function testBastilleDayBefore1790() { @@ -63,7 +65,7 @@ public function testBastilleDayBefore1790() /** * Tests translated name of Bastille Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/France/ChristmasDayTest.php b/tests/France/ChristmasDayTest.php index f626a178f..250110b38 100644 --- a/tests/France/ChristmasDayTest.php +++ b/tests/France/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\France; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends FranceBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/France/EasterMondayTest.php b/tests/France/EasterMondayTest.php index 6171d0e9a..b350e6a2f 100644 --- a/tests/France/EasterMondayTest.php +++ b/tests/France/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends FranceBaseTestCase implements YasumiTestCaseInter /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/France/FranceTest.php b/tests/France/FranceTest.php index 2ccde0fa4..26fb5d3bb 100644 --- a/tests/France/FranceTest.php +++ b/tests/France/FranceTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\France; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class FranceTest extends FranceBaseTestCase /** * Tests if all official holidays in France are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in France are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -56,7 +57,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in France are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -65,7 +66,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in France are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -74,7 +75,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in France are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/France/HautRhin/GoodFridayTest.php b/tests/France/HautRhin/GoodFridayTest.php index 8b04e7b63..8748790e1 100644 --- a/tests/France/HautRhin/GoodFridayTest.php +++ b/tests/France/HautRhin/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends HautRhinBaseTestCase implements YasumiTestCaseInter /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/France/HautRhin/HautRhinTest.php b/tests/France/HautRhin/HautRhinTest.php index e61120d31..f5e8c401f 100644 --- a/tests/France/HautRhin/HautRhinTest.php +++ b/tests/France/HautRhin/HautRhinTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\France\HautRhin; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class HautRhinTest extends HautRhinBaseTestCase /** * Tests if all official holidays in Haut-Rhin are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -49,7 +50,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Haut-Rhin (France) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -58,7 +59,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Haut-Rhin (France) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -67,7 +68,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Haut-Rhin (France) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -76,7 +77,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Haut-Rhin (France) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/France/HautRhin/stStephensDayTest.php b/tests/France/HautRhin/stStephensDayTest.php index b4744094c..0b0b6f4e2 100644 --- a/tests/France/HautRhin/stStephensDayTest.php +++ b/tests/France/HautRhin/stStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\France\HautRhin; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class stStephensDayTest extends HautRhinBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/France/InternationalWorkersDayTest.php b/tests/France/InternationalWorkersDayTest.php index 4b5aabb82..9ed9527d9 100644 --- a/tests/France/InternationalWorkersDayTest.php +++ b/tests/France/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\France; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends FranceBaseTestCase implements YasumiTe * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testInternationalWorkersDay($year, $expected) { @@ -43,7 +45,7 @@ public function testInternationalWorkersDay($year, $expected) /** * Tests translated name of International Workers' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of International Workers' Day. * * @return array list of test dates for International Workers' Day - * @throws \Exception + * @throws Exception */ public function InternationalWorkersDayDataProvider(): array { diff --git a/tests/France/Moselle/GoodFridayTest.php b/tests/France/Moselle/GoodFridayTest.php index f9ed7a834..13365d191 100644 --- a/tests/France/Moselle/GoodFridayTest.php +++ b/tests/France/Moselle/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends MoselleBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/France/Moselle/MoselleTest.php b/tests/France/Moselle/MoselleTest.php index 858502063..e8f4ca1de 100644 --- a/tests/France/Moselle/MoselleTest.php +++ b/tests/France/Moselle/MoselleTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\France\Moselle; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class MoselleTest extends MoselleBaseTestCase /** * Tests if all official holidays in Moselle are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -49,7 +50,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Moselle (France) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -58,7 +59,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Moselle (France) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -67,7 +68,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Moselle (France) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -76,7 +77,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Moselle (France) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/France/Moselle/stStephensDayTest.php b/tests/France/Moselle/stStephensDayTest.php index 372cc86d9..5c424ca55 100644 --- a/tests/France/Moselle/stStephensDayTest.php +++ b/tests/France/Moselle/stStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\France\Moselle; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class stStephensDayTest extends MoselleBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/France/NewYearsDayTest.php b/tests/France/NewYearsDayTest.php index 9baf53ced..bbfdbaa88 100644 --- a/tests/France/NewYearsDayTest.php +++ b/tests/France/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\France; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends FranceBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/France/PentecostMondayTest.php b/tests/France/PentecostMondayTest.php index 26432f5b7..afec6dbfb 100644 --- a/tests/France/PentecostMondayTest.php +++ b/tests/France/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends FranceBaseTestCase implements YasumiTestCaseIn /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/France/VictoryInEuropeDayTest.php b/tests/France/VictoryInEuropeDayTest.php index 017034e55..1dd890e46 100644 --- a/tests/France/VictoryInEuropeDayTest.php +++ b/tests/France/VictoryInEuropeDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class VictoryInEuropeDayTest extends FranceBaseTestCase implements YasumiTestCas /** * Tests Victory In Europe Day on or after 1945. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testVictoryInEuropeDayOnAfter1945() { @@ -50,7 +52,7 @@ public function testVictoryInEuropeDayOnAfter1945() /** * Tests Victory In Europe Day before 1945. - * @throws \ReflectionException + * @throws ReflectionException */ public function testVictoryInEuropeDayBefore1945() { @@ -63,7 +65,7 @@ public function testVictoryInEuropeDayBefore1945() /** * Tests translated name of Victory in Europe Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/AscensionDayTest.php b/tests/Germany/AscensionDayTest.php index 532166856..892bb8c20 100644 --- a/tests/Germany/AscensionDayTest.php +++ b/tests/Germany/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends GermanyBaseTestCase implements YasumiTestCaseInte /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php index 697d88ac8..84f2b91e5 100644 --- a/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php +++ b/tests/Germany/BadenWurttemberg/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany\BadenWurttemberg; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends BadenWurttembergBaseTestCase implements YasumiTes * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php index 83c4aaff5..5c5c37d8c 100644 --- a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php +++ b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany\BadenWurttemberg; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class BadenWurttembergTest extends BadenWurttembergBaseTestCase /** * Tests if all official holidays in Baden-Württemberg (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -45,7 +46,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Baden-Württemberg (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -54,7 +55,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Baden-Württemberg (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -63,7 +64,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Baden-Württemberg (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -72,7 +73,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Baden-Württemberg (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Germany/BadenWurttemberg/CorpusChristiTest.php b/tests/Germany/BadenWurttemberg/CorpusChristiTest.php index 72e4ba234..f96947bb4 100644 --- a/tests/Germany/BadenWurttemberg/CorpusChristiTest.php +++ b/tests/Germany/BadenWurttemberg/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany\BadenWurttemberg; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends BadenWurttembergBaseTestCase implements YasumiTe /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/BadenWurttemberg/EpiphanyTest.php b/tests/Germany/BadenWurttemberg/EpiphanyTest.php index f8c7b060b..8c08831c1 100644 --- a/tests/Germany/BadenWurttemberg/EpiphanyTest.php +++ b/tests/Germany/BadenWurttemberg/EpiphanyTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany\BadenWurttemberg; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class EpiphanyTest extends BadenWurttembergBaseTestCase implements YasumiTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Bavaria/AllSaintsDayTest.php b/tests/Germany/Bavaria/AllSaintsDayTest.php index fadf591e2..27620c9ad 100644 --- a/tests/Germany/Bavaria/AllSaintsDayTest.php +++ b/tests/Germany/Bavaria/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany\Bavaria; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends BavariaBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Bavaria/BavariaTest.php b/tests/Germany/Bavaria/BavariaTest.php index eafc04e74..8573df1b5 100644 --- a/tests/Germany/Bavaria/BavariaTest.php +++ b/tests/Germany/Bavaria/BavariaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany\Bavaria; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class BavariaTest extends BavariaBaseTestCase /** * Tests if all official holidays in Bavaria (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -45,7 +46,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Bavaria (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -54,7 +55,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Bavaria (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -63,7 +64,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Bavaria (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -72,7 +73,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Bavaria (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Germany/Bavaria/CorpusChristiTest.php b/tests/Germany/Bavaria/CorpusChristiTest.php index 656c9cc7e..2e3533c4a 100644 --- a/tests/Germany/Bavaria/CorpusChristiTest.php +++ b/tests/Germany/Bavaria/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany\Bavaria; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends BavariaBaseTestCase implements YasumiTestCaseInt /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Bavaria/EpiphanyTest.php b/tests/Germany/Bavaria/EpiphanyTest.php index e8e463922..ae2dd86bd 100644 --- a/tests/Germany/Bavaria/EpiphanyTest.php +++ b/tests/Germany/Bavaria/EpiphanyTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany\Bavaria; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,7 +37,7 @@ class EpiphanyTest extends BavariaBaseTestCase implements YasumiTestCaseInterfac * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -46,7 +48,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -55,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -69,7 +71,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Berlin/BerlinTest.php b/tests/Germany/Berlin/BerlinTest.php index 4ecff02a5..5207f2aff 100644 --- a/tests/Germany/Berlin/BerlinTest.php +++ b/tests/Germany/Berlin/BerlinTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany\Berlin; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class BerlinTest extends BerlinBaseTestCase /** * Tests if all official holidays in Berlin (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -45,7 +46,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Berlin (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -54,7 +55,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Berlin (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -63,7 +64,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Berlin (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -72,7 +73,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Berlin (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Germany/Berlin/InternationalWomensDay2019Test.php b/tests/Germany/Berlin/InternationalWomensDay2019Test.php index 2977417a2..465fdb9f1 100644 --- a/tests/Germany/Berlin/InternationalWomensDay2019Test.php +++ b/tests/Germany/Berlin/InternationalWomensDay2019Test.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class InternationalWomensDay2019Test extends BerlinBaseTestCase implements Yasum /** * Test the holiday defined in this test upon establishment - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnEstablishment() { @@ -49,7 +51,7 @@ public function testHolidayOnEstablishment() /** * Test the holiday defined in this test before establishment - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -62,7 +64,7 @@ public function testHolidayBeforeEstablishment() /** * Test the holiday defined in this test after completion - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayAfterCompletion() { @@ -71,7 +73,7 @@ public function testHolidayAfterCompletion() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -85,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Brandenburg/BrandenburgTest.php b/tests/Germany/Brandenburg/BrandenburgTest.php index 9e05c2082..fb1527868 100644 --- a/tests/Germany/Brandenburg/BrandenburgTest.php +++ b/tests/Germany/Brandenburg/BrandenburgTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany\Brandenburg; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class BrandenburgTest extends BrandenburgBaseTestCase /** * Tests if all official holidays in Brandenburg (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -56,7 +57,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Brandenburg (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -65,7 +66,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Brandenburg (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -74,7 +75,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Brandenburg (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -83,7 +84,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Brandenburg (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Germany/Brandenburg/ReformationDayTest.php b/tests/Germany/Brandenburg/ReformationDayTest.php index c79b9f278..c4a683cc7 100644 --- a/tests/Germany/Brandenburg/ReformationDayTest.php +++ b/tests/Germany/Brandenburg/ReformationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,7 +42,7 @@ class ReformationDayTest extends BrandenburgBaseTestCase implements YasumiTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -51,7 +53,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -67,7 +69,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -80,7 +82,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -94,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Bremen/BremenTest.php b/tests/Germany/Bremen/BremenTest.php index 32e41f611..f83d9f1b9 100644 --- a/tests/Germany/Bremen/BremenTest.php +++ b/tests/Germany/Bremen/BremenTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany\Bremen; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class BremenTest extends BremenBaseTestCase /** * Tests if all official holidays in Bremen (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -45,7 +46,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Bremen (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -54,7 +55,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Bremen (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -63,7 +64,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Bremen (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -72,7 +73,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Bremen (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Germany/Bremen/ReformationDayTest.php b/tests/Germany/Bremen/ReformationDayTest.php index 92c37ba06..3720e17e1 100644 --- a/tests/Germany/Bremen/ReformationDayTest.php +++ b/tests/Germany/Bremen/ReformationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,7 +42,7 @@ class ReformationDayTest extends BremenBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -51,7 +53,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -67,7 +69,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -80,7 +82,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -94,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/ChristmasTest.php b/tests/Germany/ChristmasTest.php index a20cfddc8..9f96d2546 100644 --- a/tests/Germany/ChristmasTest.php +++ b/tests/Germany/ChristmasTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasTest extends GermanyBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/EasterMondayTest.php b/tests/Germany/EasterMondayTest.php index 56eefe6fc..9959e61f7 100644 --- a/tests/Germany/EasterMondayTest.php +++ b/tests/Germany/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends GermanyBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/GermanUnityDayTest.php b/tests/Germany/GermanUnityDayTest.php index 70f3350ae..18e915ebf 100644 --- a/tests/Germany/GermanUnityDayTest.php +++ b/tests/Germany/GermanUnityDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class GermanUnityDayTest extends GermanyBaseTestCase implements YasumiTestCaseIn /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/GermanyTest.php b/tests/Germany/GermanyTest.php index d538eb9c9..eaef10406 100644 --- a/tests/Germany/GermanyTest.php +++ b/tests/Germany/GermanyTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class GermanyTest extends GermanyBaseTestCase /** * Tests if all official holidays in Finland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -45,7 +46,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Germany are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -54,7 +55,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Germany are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -63,7 +64,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Germany are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -72,7 +73,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Germany are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Germany/GoodFridayTest.php b/tests/Germany/GoodFridayTest.php index 13ddfaf2d..ea6f52fab 100644 --- a/tests/Germany/GoodFridayTest.php +++ b/tests/Germany/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends GermanyBaseTestCase implements YasumiTestCaseInterf /** * Tests Good Friday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testGoodFriday() { @@ -45,7 +47,7 @@ public function testGoodFriday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Hamburg/DayOfReformationTest.php b/tests/Germany/Hamburg/DayOfReformationTest.php index 6cdce9a02..c35d1ebf1 100644 --- a/tests/Germany/Hamburg/DayOfReformationTest.php +++ b/tests/Germany/Hamburg/DayOfReformationTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,7 +42,7 @@ class DayOfReformationTest extends HamburgBaseTestCase implements YasumiTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -51,7 +53,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -67,7 +69,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -80,7 +82,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -94,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Hamburg/HamburgTest.php b/tests/Germany/Hamburg/HamburgTest.php index fadc2c516..d7338422a 100644 --- a/tests/Germany/Hamburg/HamburgTest.php +++ b/tests/Germany/Hamburg/HamburgTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany\Hamburg; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class HamburgTest extends HamburgBaseTestCase /** * Tests if all official holidays in Hamburg (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -45,7 +46,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Hamburg (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -54,7 +55,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Hamburg (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -63,7 +64,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Hamburg (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -72,7 +73,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Hamburg (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Germany/Hesse/CorpusChristiTest.php b/tests/Germany/Hesse/CorpusChristiTest.php index bce107e49..ba0810c95 100644 --- a/tests/Germany/Hesse/CorpusChristiTest.php +++ b/tests/Germany/Hesse/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany\Hesse; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends HesseBaseTestCase implements YasumiTestCaseInter /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Hesse/HesseTest.php b/tests/Germany/Hesse/HesseTest.php index 094fc897e..cbdb1c83a 100644 --- a/tests/Germany/Hesse/HesseTest.php +++ b/tests/Germany/Hesse/HesseTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany\Hesse; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class HesseTest extends HesseBaseTestCase /** * Tests if all official holidays in Hesse (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -45,7 +46,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Hesse (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -54,7 +55,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Hesse (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -63,7 +64,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Hesse (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -72,7 +73,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Hesse (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Germany/InternationalWorkersDayTest.php b/tests/Germany/InternationalWorkersDayTest.php index 92c1d9121..a7ed59248 100644 --- a/tests/Germany/InternationalWorkersDayTest.php +++ b/tests/Germany/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends GermanyBaseTestCase implements YasumiT * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -43,7 +45,7 @@ public function testHoliday($year, $expected) /** * Tests translated name of International Workers' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * 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 + * @throws Exception */ public function HolidayDataProvider(): array { diff --git a/tests/Germany/LowerSaxony/LowerSaxonyTest.php b/tests/Germany/LowerSaxony/LowerSaxonyTest.php index 90aab3908..d2688435c 100644 --- a/tests/Germany/LowerSaxony/LowerSaxonyTest.php +++ b/tests/Germany/LowerSaxony/LowerSaxonyTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany\LowerSaxony; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class LowerSaxonyTest extends LowerSaxonyBaseTestCase /** * Tests if all official holidays in Lower Saxony (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -45,7 +46,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Lower Saxony (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -54,7 +55,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Lower Saxony (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -63,7 +64,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Lower Saxony (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -72,7 +73,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Lower Saxony (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Germany/LowerSaxony/ReformationDayTest.php b/tests/Germany/LowerSaxony/ReformationDayTest.php index 22a8eab49..794043aa2 100644 --- a/tests/Germany/LowerSaxony/ReformationDayTest.php +++ b/tests/Germany/LowerSaxony/ReformationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,7 +42,7 @@ class ReformationDayTest extends LowerSaxonyBaseTestCase implements YasumiTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -51,7 +53,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -67,7 +69,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -80,7 +82,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -94,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php index 61260ade9..84a228616 100644 --- a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany\MecklenburgWesternPomerania; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class MecklenburgWesternPomeraniaTest extends MecklenburgWesternPomeraniaBaseTes /** * Tests if all official holidays in Mecklenburg-Western Pomerania (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -54,7 +55,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Mecklenburg-Western Pomerania (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -63,7 +64,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Mecklenburg-Western Pomerania (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -72,7 +73,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Mecklenburg-Western Pomerania (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -81,7 +82,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Mecklenburg-Western Pomerania (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php index e37083d61..e3358540b 100644 --- a/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/ReformationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,7 +38,7 @@ class ReformationDayTest extends MecklenburgWesternPomeraniaBaseTestCase impleme * 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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -52,7 +54,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -65,7 +67,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -79,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/NewYearsDayTest.php b/tests/Germany/NewYearsDayTest.php index a3ccef675..025670a15 100644 --- a/tests/Germany/NewYearsDayTest.php +++ b/tests/Germany/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends GermanyBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php index d35da4693..d3fda5b57 100644 --- a/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php +++ b/tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany\NorthRhineWestphalia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends NorthRhineWestphaliaBaseTestCase implements Yasum * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php b/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php index c1e4f7748..a162e087c 100644 --- a/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php +++ b/tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany\NorthRhineWestphalia; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends NorthRhineWestphaliaBaseTestCase implements Yasu /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php index 9feaa8548..7eef0a971 100644 --- a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php +++ b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany\NorthRhineWestphalia; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class NorthRhineWestphaliaTest extends NorthRhineWestphaliaBaseTestCase /** * Tests if all official holidays in North Rhine-Westphalia (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -45,7 +46,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in North Rhine-Westphalia (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -54,7 +55,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in North Rhine-Westphalia (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -63,7 +64,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in North Rhine-Westphalia (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -72,7 +73,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in North Rhine-Westphalia (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Germany/PentecostMondayTest.php b/tests/Germany/PentecostMondayTest.php index 419c9b446..e3d72b579 100644 --- a/tests/Germany/PentecostMondayTest.php +++ b/tests/Germany/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends GermanyBaseTestCase implements YasumiTestCaseI /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/ReformationDay2017Test.php b/tests/Germany/ReformationDay2017Test.php index 60ced0dba..6268e76dc 100644 --- a/tests/Germany/ReformationDay2017Test.php +++ b/tests/Germany/ReformationDay2017Test.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class ReformationDay2017Test extends GermanyBaseTestCase implements YasumiTestCa /** * Test the holiday defined in this test upon establishment - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnEstablishment() { @@ -49,7 +51,7 @@ public function testHolidayOnEstablishment() /** * Test the holiday defined in this test before establishment - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -62,7 +64,7 @@ public function testHolidayBeforeEstablishment() /** * Test the holiday defined in this test after completion - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayAfterCompletion() { @@ -71,7 +73,7 @@ public function testHolidayAfterCompletion() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -85,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php index 552ad396e..494255ccf 100644 --- a/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php +++ b/tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany\RhinelandPalatinate; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends RhinelandPalatinateBaseTestCase implements Yasumi * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php b/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php index 449794c87..05fc12fba 100644 --- a/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php +++ b/tests/Germany/RhinelandPalatinate/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany\RhinelandPalatinate; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends RhinelandPalatinateBaseTestCase implements Yasum /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php index 59b15c131..f73370b43 100644 --- a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php +++ b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany\RhinelandPalatinate; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class RhinelandPalatinateTest extends RhinelandPalatinateBaseTestCase /** * Tests if all official holidays in Rhineland Palatinate (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -45,7 +46,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Rhineland Palatinate (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -54,7 +55,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Rhineland Palatinate (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -63,7 +64,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Rhineland Palatinate (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -72,7 +73,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Rhineland Palatinate (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Germany/Saarland/AllSaintsDayTest.php b/tests/Germany/Saarland/AllSaintsDayTest.php index 5101d2d33..e2c6ca751 100644 --- a/tests/Germany/Saarland/AllSaintsDayTest.php +++ b/tests/Germany/Saarland/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany\Saarland; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends SaarlandBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Saarland/AssumptionOfMaryTest.php b/tests/Germany/Saarland/AssumptionOfMaryTest.php index f728f564f..d2cfe9c29 100644 --- a/tests/Germany/Saarland/AssumptionOfMaryTest.php +++ b/tests/Germany/Saarland/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany\Saarland; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends SaarlandBaseTestCase implements YasumiTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the Assumption of Mary. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Saarland/CorpusChristiTest.php b/tests/Germany/Saarland/CorpusChristiTest.php index bdde9c41f..3d5823c1e 100644 --- a/tests/Germany/Saarland/CorpusChristiTest.php +++ b/tests/Germany/Saarland/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany\Saarland; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends SaarlandBaseTestCase implements YasumiTestCaseIn /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Saarland/SaarlandTest.php b/tests/Germany/Saarland/SaarlandTest.php index 2c50428b7..becc77641 100644 --- a/tests/Germany/Saarland/SaarlandTest.php +++ b/tests/Germany/Saarland/SaarlandTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany\Saarland; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class SaarlandTest extends SaarlandBaseTestCase /** * Tests if all official holidays in Saarland (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -45,7 +46,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Saarland (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -54,7 +55,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Saarland (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -63,7 +64,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Saarland (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -72,7 +73,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Saarland (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Germany/Saxony/ReformationDayTest.php b/tests/Germany/Saxony/ReformationDayTest.php index 01eff3f4b..1bf7aa15d 100644 --- a/tests/Germany/Saxony/ReformationDayTest.php +++ b/tests/Germany/Saxony/ReformationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,7 +42,7 @@ class ReformationDayTest extends SaxonyBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -51,7 +53,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -67,7 +69,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -80,7 +82,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -94,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php index a71de64b4..e7492c170 100644 --- a/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php +++ b/tests/Germany/Saxony/RepentanceAndPrayerDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -39,8 +41,8 @@ class RepentanceAndPrayerDayTest extends SaxonyBaseTestCase implements YasumiTes /** * Tests the holiday defined in this test on or after establishment. - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayOnAfterEstablishment() { @@ -58,7 +60,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -71,7 +73,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -85,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Saxony/SaxonyTest.php b/tests/Germany/Saxony/SaxonyTest.php index ce86c9de5..20ffd074c 100644 --- a/tests/Germany/Saxony/SaxonyTest.php +++ b/tests/Germany/Saxony/SaxonyTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany\Saxony; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class SaxonyTest extends SaxonyBaseTestCase /** * Tests if all official holidays in Saxony (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -58,7 +59,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Saxony (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -67,7 +68,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Saxony (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -76,7 +77,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Saxony (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -85,7 +86,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Saxony (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php index b5da028fe..d13112db9 100644 --- a/tests/Germany/SaxonyAnhalt/EpiphanyTest.php +++ b/tests/Germany/SaxonyAnhalt/EpiphanyTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany\SaxonyAnhalt; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,7 +37,7 @@ class EpiphanyTest extends SaxonyAnhaltBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -46,7 +48,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -55,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -69,7 +71,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php index 40ebf9413..3c1683c0e 100644 --- a/tests/Germany/SaxonyAnhalt/ReformationDayTest.php +++ b/tests/Germany/SaxonyAnhalt/ReformationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,7 +42,7 @@ class ReformationDayTest extends SaxonyAnhaltBaseTestCase implements YasumiTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -51,7 +53,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -67,7 +69,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -80,7 +82,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -94,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php index 4df49826c..b122a78e0 100644 --- a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php +++ b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany\SaxonyAnhalt; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class SaxonyAnhaltTest extends SaxonyAnhaltBaseTestCase /** * Tests if all official holidays in Saxony-Anhalt (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -54,7 +55,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Saxony-Anhalt (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -63,7 +64,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Saxony-Anhalt (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -72,7 +73,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Saxony-Anhalt (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -81,7 +82,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Saxony-Anhalt (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Germany/SchleswigHolstein/ReformationDayTest.php b/tests/Germany/SchleswigHolstein/ReformationDayTest.php index 5d617814d..82b99293f 100644 --- a/tests/Germany/SchleswigHolstein/ReformationDayTest.php +++ b/tests/Germany/SchleswigHolstein/ReformationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,7 +42,7 @@ class ReformationDayTest extends SchleswigHolsteinBaseTestCase implements Yasumi * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -51,7 +53,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -67,7 +69,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -80,7 +82,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -94,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php index 053234c71..1aa9bffaa 100644 --- a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php +++ b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany\SchleswigHolstein; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class SchleswigHolsteinTest extends SchleswigHolsteinBaseTestCase /** * Tests if all official holidays in Schleswig-Holstein (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -45,7 +46,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Schleswig-Holstein (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -54,7 +55,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Schleswig-Holstein (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -63,7 +64,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Schleswig-Holstein (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -72,7 +73,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Schleswig-Holstein (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Germany/SecondChristmasDayTest.php b/tests/Germany/SecondChristmasDayTest.php index 9dba4cc3e..bfafca52b 100644 --- a/tests/Germany/SecondChristmasDayTest.php +++ b/tests/Germany/SecondChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Germany; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class SecondChristmasDayTest extends GermanyBaseTestCase implements YasumiTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Thuringia/ReformationDayTest.php b/tests/Germany/Thuringia/ReformationDayTest.php index 0533cb394..1a2e814af 100644 --- a/tests/Germany/Thuringia/ReformationDayTest.php +++ b/tests/Germany/Thuringia/ReformationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,7 +42,7 @@ class ReformationDayTest extends ThuringiaBaseTestCase implements YasumiTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -51,7 +53,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -67,7 +69,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -80,7 +82,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -94,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Germany/Thuringia/ThuringiaTest.php b/tests/Germany/Thuringia/ThuringiaTest.php index f75766217..d00eb9e5a 100644 --- a/tests/Germany/Thuringia/ThuringiaTest.php +++ b/tests/Germany/Thuringia/ThuringiaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Germany\Thuringia; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class ThuringiaTest extends ThuringiaBaseTestCase /** * Tests if all official holidays in Thuringia (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -54,7 +55,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Thuringia (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -63,7 +64,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Thuringia (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -72,7 +73,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Thuringia (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -81,7 +82,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Thuringia (Germany) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Greece/AnnunciationTest.php b/tests/Greece/AnnunciationTest.php index 4e43784a2..973ebdb46 100644 --- a/tests/Greece/AnnunciationTest.php +++ b/tests/Greece/AnnunciationTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Greece; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AnnunciationTest extends GreeceBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Greece/AscensionDayTest.php b/tests/Greece/AscensionDayTest.php index fa9ec8b0e..18bc9f875 100644 --- a/tests/Greece/AscensionDayTest.php +++ b/tests/Greece/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends GreeceBaseTestCase implements YasumiTestCaseInter /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Greece/AssumptionOfMaryTest.php b/tests/Greece/AssumptionOfMaryTest.php index 3e78caf01..cec779395 100644 --- a/tests/Greece/AssumptionOfMaryTest.php +++ b/tests/Greece/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Greece; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends GreeceBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the Assumption of Mary. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Greece/ChristmasDayTest.php b/tests/Greece/ChristmasDayTest.php index 96db67d69..595db3acb 100644 --- a/tests/Greece/ChristmasDayTest.php +++ b/tests/Greece/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Greece; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends GreeceBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Greece/CleanMondayTest.php b/tests/Greece/CleanMondayTest.php index d1673df1e..296892530 100644 --- a/tests/Greece/CleanMondayTest.php +++ b/tests/Greece/CleanMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class CleanMondayTest extends GreeceBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Greece/EasterMondayTest.php b/tests/Greece/EasterMondayTest.php index 1122d697b..2adc77e5d 100644 --- a/tests/Greece/EasterMondayTest.php +++ b/tests/Greece/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends GreeceBaseTestCase implements YasumiTestCaseInter /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Greece/EasterTest.php b/tests/Greece/EasterTest.php index 07516a7b2..93c35bae8 100644 --- a/tests/Greece/EasterTest.php +++ b/tests/Greece/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterTest extends GreeceBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of Easter. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Greece/EpiphanyTest.php b/tests/Greece/EpiphanyTest.php index 5730a3696..979ac869a 100644 --- a/tests/Greece/EpiphanyTest.php +++ b/tests/Greece/EpiphanyTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Greece; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class EpiphanyTest extends GreeceBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Epiphany. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Greece/GreeceTest.php b/tests/Greece/GreeceTest.php index 16fdc01aa..039d52de5 100644 --- a/tests/Greece/GreeceTest.php +++ b/tests/Greece/GreeceTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Greece; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class GreeceTest extends GreeceBaseTestCase /** * Tests if all official holidays in Greece are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -51,7 +52,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Greece are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -60,7 +61,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Greece are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -69,7 +70,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Greece are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -78,7 +79,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Greece are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Greece/IndepencenceDayTest.php b/tests/Greece/IndepencenceDayTest.php index 71a7dced3..12c1605ca 100644 --- a/tests/Greece/IndepencenceDayTest.php +++ b/tests/Greece/IndepencenceDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class IndepencenceDayTest extends GreeceBaseTestCase implements YasumiTestCaseIn /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -50,7 +52,7 @@ public function testHoliday() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Greece/InternationalWorkersDayTest.php b/tests/Greece/InternationalWorkersDayTest.php index 98b7b685d..503f5cba2 100644 --- a/tests/Greece/InternationalWorkersDayTest.php +++ b/tests/Greece/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Greece; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends GreeceBaseTestCase implements YasumiTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -43,7 +45,7 @@ public function testHoliday($year, $expected) /** * Tests translated name of International Workers' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * 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 + * @throws Exception */ public function HolidayDataProvider(): array { diff --git a/tests/Greece/NewYearsDayTest.php b/tests/Greece/NewYearsDayTest.php index eef74f0ef..7028e42df 100644 --- a/tests/Greece/NewYearsDayTest.php +++ b/tests/Greece/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Greece; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends GreeceBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -43,7 +45,7 @@ public function testHoliday($year, $expected) /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * 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 + * @throws Exception */ public function HolidayDataProvider(): array { diff --git a/tests/Greece/OhiDayTest.php b/tests/Greece/OhiDayTest.php index a984dd8fb..b0cd7417a 100644 --- a/tests/Greece/OhiDayTest.php +++ b/tests/Greece/OhiDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class OhiDayTest extends GreeceBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -50,7 +52,7 @@ public function testHoliday() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Greece/PentecostMondayTest.php b/tests/Greece/PentecostMondayTest.php index 69156fb78..e8f5c3c49 100644 --- a/tests/Greece/PentecostMondayTest.php +++ b/tests/Greece/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends GreeceBaseTestCase implements YasumiTestCaseIn /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Greece/PentecostTest.php b/tests/Greece/PentecostTest.php index 55211469a..8fd5b1cbe 100644 --- a/tests/Greece/PentecostTest.php +++ b/tests/Greece/PentecostTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostTest extends GreeceBaseTestCase implements YasumiTestCaseInterfac /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Greece/PolytechnioTest.php b/tests/Greece/PolytechnioTest.php index 72bded03a..754e148f3 100644 --- a/tests/Greece/PolytechnioTest.php +++ b/tests/Greece/PolytechnioTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class PolytechnioTest extends GreeceBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -50,7 +52,7 @@ public function testHoliday() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Greece/ThreeHolyHierarchsTest.php b/tests/Greece/ThreeHolyHierarchsTest.php index 1646b7a5f..b94be14ef 100644 --- a/tests/Greece/ThreeHolyHierarchsTest.php +++ b/tests/Greece/ThreeHolyHierarchsTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Greece; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ThreeHolyHierarchsTest extends GreeceBaseTestCase implements YasumiTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Greece/goodFridayTest.php b/tests/Greece/goodFridayTest.php index 598bdf5f2..a62cd1b27 100644 --- a/tests/Greece/goodFridayTest.php +++ b/tests/Greece/goodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class goodFridayTest extends GreeceBaseTestCase implements YasumiTestCaseInterfa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Hungary/AllSaintsDayTest.php b/tests/Hungary/AllSaintsDayTest.php index 1255dec09..2b9074e15 100644 --- a/tests/Hungary/AllSaintsDayTest.php +++ b/tests/Hungary/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Hungary; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends HungaryBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Hungary/ChristmasTest.php b/tests/Hungary/ChristmasTest.php index c13bf4189..1b06b79a7 100644 --- a/tests/Hungary/ChristmasTest.php +++ b/tests/Hungary/ChristmasTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Hungary; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasTest extends HungaryBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Hungary/EasterMondayTest.php b/tests/Hungary/EasterMondayTest.php index 7f5120a91..d97a40138 100644 --- a/tests/Hungary/EasterMondayTest.php +++ b/tests/Hungary/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends HungaryBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Hungary/EasterTest.php b/tests/Hungary/EasterTest.php index 6c77ca6c5..b4aa9d6ef 100644 --- a/tests/Hungary/EasterTest.php +++ b/tests/Hungary/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterTest extends HungaryBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Hungary/HungaryTest.php b/tests/Hungary/HungaryTest.php index 158122c75..40fdeb57a 100644 --- a/tests/Hungary/HungaryTest.php +++ b/tests/Hungary/HungaryTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Hungary; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class HungaryTest extends HungaryBaseTestCase /** * Tests if all official holidays in Hungary are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -62,7 +63,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Hungary are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -71,7 +72,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Hungary are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -80,7 +81,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Hungary are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,7 +90,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Hungary are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Hungary/InternationalWorkersDayTest.php b/tests/Hungary/InternationalWorkersDayTest.php index 157cdb60f..14d757480 100644 --- a/tests/Hungary/InternationalWorkersDayTest.php +++ b/tests/Hungary/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Hungary; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends HungaryBaseTestCase implements YasumiT * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Hungary/MemorialDay1848Test.php b/tests/Hungary/MemorialDay1848Test.php index 3a95cb67c..4e031bec2 100644 --- a/tests/Hungary/MemorialDay1848Test.php +++ b/tests/Hungary/MemorialDay1848Test.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class MemorialDay1848Test extends HungaryBaseTestCase implements YasumiTestCaseI /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Hungary/MemorialDay1956Test.php b/tests/Hungary/MemorialDay1956Test.php index f49392df7..cc735ec56 100644 --- a/tests/Hungary/MemorialDay1956Test.php +++ b/tests/Hungary/MemorialDay1956Test.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class MemorialDay1956Test extends HungaryBaseTestCase implements YasumiTestCaseI /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Hungary/NewYearsDayTest.php b/tests/Hungary/NewYearsDayTest.php index cd6949909..845a23cb5 100644 --- a/tests/Hungary/NewYearsDayTest.php +++ b/tests/Hungary/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Hungary; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends HungaryBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Hungary/PentecostMondayTest.php b/tests/Hungary/PentecostMondayTest.php index 904f87242..33ceb88ec 100644 --- a/tests/Hungary/PentecostMondayTest.php +++ b/tests/Hungary/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends HungaryBaseTestCase implements YasumiTestCaseI /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Hungary/PentecostTest.php b/tests/Hungary/PentecostTest.php index f1c3a3ca9..2a7dcf018 100644 --- a/tests/Hungary/PentecostTest.php +++ b/tests/Hungary/PentecostTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostTest extends HungaryBaseTestCase implements YasumiTestCaseInterfa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Hungary/SecondChristmasDayTest.php b/tests/Hungary/SecondChristmasDayTest.php index f6a4fcd3e..347e80645 100644 --- a/tests/Hungary/SecondChristmasDayTest.php +++ b/tests/Hungary/SecondChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Hungary; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class SecondChristmasDayTest extends HungaryBaseTestCase implements YasumiTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Hungary/StateFoundationDayTest.php b/tests/Hungary/StateFoundationDayTest.php index 5f8ce1ed9..36030cffa 100644 --- a/tests/Hungary/StateFoundationDayTest.php +++ b/tests/Hungary/StateFoundationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class StateFoundationDayTest extends HungaryBaseTestCase implements YasumiTestCa /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ireland/AugustHolidayTest.php b/tests/Ireland/AugustHolidayTest.php index 983e15e0b..1a0841ba1 100644 --- a/tests/Ireland/AugustHolidayTest.php +++ b/tests/Ireland/AugustHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class AugustHolidayTest extends IrelandBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -72,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -92,7 +94,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ireland/ChristmasDayTest.php b/tests/Ireland/ChristmasDayTest.php index 47491841f..c398b6f87 100644 --- a/tests/Ireland/ChristmasDayTest.php +++ b/tests/Ireland/ChristmasDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class ChristmasDayTest extends IrelandBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param \DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -71,7 +73,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -91,7 +93,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ireland/EasterMondayTest.php b/tests/Ireland/EasterMondayTest.php index 1201c5e91..066d5b60d 100644 --- a/tests/Ireland/EasterMondayTest.php +++ b/tests/Ireland/EasterMondayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class EasterMondayTest extends IrelandBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -73,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ireland/EasterTest.php b/tests/Ireland/EasterTest.php index 7b8f5da24..0cd428791 100644 --- a/tests/Ireland/EasterTest.php +++ b/tests/Ireland/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class EasterTest extends IrelandBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -52,7 +54,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -71,7 +73,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -91,7 +93,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ireland/GoodFridayTest.php b/tests/Ireland/GoodFridayTest.php index fefec6668..d7b8017f2 100644 --- a/tests/Ireland/GoodFridayTest.php +++ b/tests/Ireland/GoodFridayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class GoodFridayTest extends IrelandBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -72,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -92,7 +94,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ireland/IrelandTest.php b/tests/Ireland/IrelandTest.php index f6d598a0b..09725f8c0 100644 --- a/tests/Ireland/IrelandTest.php +++ b/tests/Ireland/IrelandTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Ireland; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class IrelandTest extends IrelandBaseTestCase /** * Tests if all official holidays in Ireland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -57,7 +58,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Ireland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -66,7 +67,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Ireland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -75,7 +76,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Ireland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -84,7 +85,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Ireland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Ireland/JuneHolidayTest.php b/tests/Ireland/JuneHolidayTest.php index e4aa1a148..8640e8bf2 100644 --- a/tests/Ireland/JuneHolidayTest.php +++ b/tests/Ireland/JuneHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class JuneHolidayTest extends IrelandBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -58,7 +60,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -76,7 +78,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -90,7 +92,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -110,7 +112,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ireland/MayDayTest.php b/tests/Ireland/MayDayTest.php index ab2225b7b..40ba180ab 100644 --- a/tests/Ireland/MayDayTest.php +++ b/tests/Ireland/MayDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class MayDayTest extends IrelandBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -59,7 +61,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -77,7 +79,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -91,7 +93,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -111,7 +113,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ireland/NewYearsDayTest.php b/tests/Ireland/NewYearsDayTest.php index 25e64835a..d82efa5ad 100644 --- a/tests/Ireland/NewYearsDayTest.php +++ b/tests/Ireland/NewYearsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class NewYearsDayTest extends IrelandBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param \DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -58,7 +60,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -75,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -89,7 +91,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -109,7 +111,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ireland/OctoberHolidayTest.php b/tests/Ireland/OctoberHolidayTest.php index 0e3ffbbf7..b046e1fd1 100644 --- a/tests/Ireland/OctoberHolidayTest.php +++ b/tests/Ireland/OctoberHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class OctoberHolidayTest extends IrelandBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -59,7 +61,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -77,7 +79,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -91,7 +93,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -111,7 +113,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ireland/PentecostTest.php b/tests/Ireland/PentecostTest.php index e250360c7..9744e2bf3 100644 --- a/tests/Ireland/PentecostTest.php +++ b/tests/Ireland/PentecostTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class PentecostTest extends IrelandBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -73,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ireland/StPatricksDayTest.php b/tests/Ireland/StPatricksDayTest.php index 3b34a7d26..4a51bd1bb 100644 --- a/tests/Ireland/StPatricksDayTest.php +++ b/tests/Ireland/StPatricksDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class StPatricksDayTest extends IrelandBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param \DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -58,7 +60,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -75,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -89,7 +91,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -109,7 +111,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ireland/StStephensDayTest.php b/tests/Ireland/StStephensDayTest.php index f040cc6fc..77c30a650 100644 --- a/tests/Ireland/StStephensDayTest.php +++ b/tests/Ireland/StStephensDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class StStephensDayTest extends IrelandBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param \DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -71,7 +73,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -91,7 +93,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ireland/pentecostMondayTest.php b/tests/Ireland/pentecostMondayTest.php index e23d96988..a10aef498 100644 --- a/tests/Ireland/pentecostMondayTest.php +++ b/tests/Ireland/pentecostMondayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -41,8 +43,8 @@ class pentecostMondayTest extends IrelandBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -58,7 +60,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -76,7 +78,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test after abolishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayDayAfterAbolishment() { @@ -86,7 +88,7 @@ public function testHolidayDayAfterAbolishment() /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -106,7 +108,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Italy/AllSaintsDayTest.php b/tests/Italy/AllSaintsDayTest.php index 1962c0d2c..a3ac6c88e 100644 --- a/tests/Italy/AllSaintsDayTest.php +++ b/tests/Italy/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Italy; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends ItalyBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAssumptionOfMary($year, $expected) { @@ -45,7 +47,7 @@ public function testAssumptionOfMary($year, $expected) * Returns a list of random test dates used for assertion of All Saints' Day. * * @return array list of test dates for All Saints' Day - * @throws \Exception + * @throws Exception */ public function AllSaintsDayDataProvider(): array { @@ -54,7 +56,7 @@ public function AllSaintsDayDataProvider(): array /** * Tests translated name of All Saints' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Italy/AssumptionOfMaryTest.php b/tests/Italy/AssumptionOfMaryTest.php index d447a28e7..80a0190a4 100644 --- a/tests/Italy/AssumptionOfMaryTest.php +++ b/tests/Italy/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Italy; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends ItalyBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAssumptionOfMary($year, $expected) { @@ -45,7 +47,7 @@ public function testAssumptionOfMary($year, $expected) * Returns a list of random test dates used for assertion of the day of the Assumption of Mary. * * @return array list of test dates for the day of the Assumption of Mary - * @throws \Exception + * @throws Exception */ public function AssumptionOfMaryDataProvider(): array { @@ -54,7 +56,7 @@ public function AssumptionOfMaryDataProvider(): array /** * Tests translated name of the Assumption of Mary. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Italy/ChristmasTest.php b/tests/Italy/ChristmasTest.php index 1eb44d201..ee0f6f48c 100644 --- a/tests/Italy/ChristmasTest.php +++ b/tests/Italy/ChristmasTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Italy; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasTest extends ItalyBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Italy/EasterMondayTest.php b/tests/Italy/EasterMondayTest.php index 3eddf77e0..5feb5fedf 100644 --- a/tests/Italy/EasterMondayTest.php +++ b/tests/Italy/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends ItalyBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Italy/EasterTest.php b/tests/Italy/EasterTest.php index 780d01a4d..4e746ef43 100644 --- a/tests/Italy/EasterTest.php +++ b/tests/Italy/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterTest extends ItalyBaseTestCase implements YasumiTestCaseInterface /** * Tests Easter. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEaster() { @@ -45,7 +47,7 @@ public function testEaster() /** * Tests translated name of Easter. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Italy/EpiphanyTest.php b/tests/Italy/EpiphanyTest.php index 472ee42a5..e59b65f9d 100644 --- a/tests/Italy/EpiphanyTest.php +++ b/tests/Italy/EpiphanyTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Italy; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class EpiphanyTest extends ItalyBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which Epiphany needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testEpiphany($year, $expected) { @@ -45,7 +47,7 @@ public function testEpiphany($year, $expected) * Returns a list of random test dates used for assertion of Epiphany. * * @return array list of test dates for Epiphany - * @throws \Exception + * @throws Exception */ public function EpiphanyDataProvider(): array { @@ -54,7 +56,7 @@ public function EpiphanyDataProvider(): array /** * Tests translated name of Epiphany. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Italy/ImmaculateConceptionTest.php b/tests/Italy/ImmaculateConceptionTest.php index c600c2323..bfac9c287 100644 --- a/tests/Italy/ImmaculateConceptionTest.php +++ b/tests/Italy/ImmaculateConceptionTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Italy; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ImmaculateConceptionTest extends ItalyBaseTestCase implements YasumiTestCa * @param int $year the year for which the day of Immaculate Conception needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testImmaculateConception($year, $expected) { @@ -45,7 +47,7 @@ public function testImmaculateConception($year, $expected) * Returns a list of random test dates used for assertion of the day of Immaculate Conception. * * @return array list of test dates for the day of Immaculate Conception - * @throws \Exception + * @throws Exception */ public function ImmaculateConceptionDataProvider(): array { @@ -54,7 +56,7 @@ public function ImmaculateConceptionDataProvider(): array /** * Tests translated name of the day of Immaculate Conception. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Italy/InternationalWorkersDayTest.php b/tests/Italy/InternationalWorkersDayTest.php index 96e34ba56..c43ad4073 100644 --- a/tests/Italy/InternationalWorkersDayTest.php +++ b/tests/Italy/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Italy; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends ItalyBaseTestCase implements YasumiTes * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testInternationalWorkersDay($year, $expected) { @@ -45,7 +47,7 @@ public function testInternationalWorkersDay($year, $expected) * Returns a list of random test dates used for assertion of International Workers' Day. * * @return array list of test dates for International Workers' Day - * @throws \Exception + * @throws Exception */ public function InternationalWorkersDayDataProvider(): array { @@ -54,7 +56,7 @@ public function InternationalWorkersDayDataProvider(): array /** * Tests translated name of International Workers' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Italy/ItalyTest.php b/tests/Italy/ItalyTest.php index b6cef8cd7..34f5e0509 100644 --- a/tests/Italy/ItalyTest.php +++ b/tests/Italy/ItalyTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Italy; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class ItalyTest extends ItalyBaseTestCase /** * Tests if all official holidays in Italy are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -48,7 +49,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Italy are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -57,7 +58,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Italy are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -66,7 +67,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Italy are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -75,7 +76,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Italy are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Italy/LiberationDayTest.php b/tests/Italy/LiberationDayTest.php index e07dd8540..d3faef0f4 100644 --- a/tests/Italy/LiberationDayTest.php +++ b/tests/Italy/LiberationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -41,8 +43,8 @@ class LiberationDayTest extends ItalyBaseTestCase implements YasumiTestCaseInter /** * Tests Liberation Day on or after 1949. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testLiberationDayOnAfter1949() { @@ -57,7 +59,7 @@ public function testLiberationDayOnAfter1949() /** * Tests Liberation Day before 1949. - * @throws \ReflectionException + * @throws ReflectionException */ public function testLiberationDayBefore1949() { @@ -70,7 +72,7 @@ public function testLiberationDayBefore1949() /** * Tests translated name of Liberation Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -84,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Italy/NewYearsDayTest.php b/tests/Italy/NewYearsDayTest.php index a46a57c91..57641cbe3 100644 --- a/tests/Italy/NewYearsDayTest.php +++ b/tests/Italy/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Italy; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends ItalyBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -45,7 +47,7 @@ public function testNewYearsDay($year, $expected) * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { @@ -54,7 +56,7 @@ public function NewYearsDayDataProvider(): array /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Italy/RepublicDayTest.php b/tests/Italy/RepublicDayTest.php index 86d0f08d6..4e5ae3df2 100644 --- a/tests/Italy/RepublicDayTest.php +++ b/tests/Italy/RepublicDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -41,8 +43,8 @@ class RepublicDayTest extends ItalyBaseTestCase implements YasumiTestCaseInterfa /** * Tests Republic Day on or after 1946. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testRepublicDayOnAfter1946() { @@ -57,7 +59,7 @@ public function testRepublicDayOnAfter1946() /** * Tests Republic Day before 1946. - * @throws \ReflectionException + * @throws ReflectionException */ public function testRepublicDayBefore1946() { @@ -70,7 +72,7 @@ public function testRepublicDayBefore1946() /** * Tests translated name of Republic Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -84,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Italy/stStephensDayTest.php b/tests/Italy/stStephensDayTest.php index 2ec3e3bb4..861766087 100644 --- a/tests/Italy/stStephensDayTest.php +++ b/tests/Italy/stStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Italy; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class stStephensDayTest extends ItalyBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which St. Stephen's Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function teststStephensDay($year, $expected) { @@ -45,7 +47,7 @@ public function teststStephensDay($year, $expected) * Returns a list of random test dates used for assertion of St. Stephen's Day. * * @return array list of test dates for St. Stephen's Day - * @throws \Exception + * @throws Exception */ public function stStephensDayDataProvider(): array { @@ -54,7 +56,7 @@ public function stStephensDayDataProvider(): array /** * Tests translated name of St. Stephen's Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/AutumnalEquinoxDayTest.php b/tests/Japan/AutumnalEquinoxDayTest.php index 46a76d12d..584628dfd 100644 --- a/tests/Japan/AutumnalEquinoxDayTest.php +++ b/tests/Japan/AutumnalEquinoxDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -38,7 +40,7 @@ class AutumnalEquinoxDayTest extends JapanBaseTestCase implements YasumiTestCase * festival called Shūki kōrei-sai (秋季皇霊祭). * * After 2150 no calculations are available yet. - * @throws \ReflectionException + * @throws ReflectionException */ public function testAutumnalEquinoxDayOnAfter2150() { @@ -58,8 +60,8 @@ public function testAutumnalEquinoxDayOnAfter2150() * @param $month int month (number) of example data to be tested * @param $day int day of the month (number) of example data to be tested * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testAutumnalEquinoxDayBetween1948And2150($year, $month, $day) { @@ -91,7 +93,7 @@ public function autumnalEquinoxHolidaysProvider(): array * Tests Vernal Equinox Day before 1948. This national holiday was established in 1948 as a day on which to honor * one's ancestors and remember the dead. Prior to 1948, the autumnal equinox was an imperial ancestor worship * festival called Shūki kōrei-sai (秋季皇霊祭). - * @throws \ReflectionException + * @throws ReflectionException */ public function testAutumnalEquinoxDayBefore1948() { @@ -106,7 +108,7 @@ public function testAutumnalEquinoxDayBefore1948() * Tests Vernal Equinox Day between 1851 and 1948. This national holiday was established in 1948 as a day on * which to honor one's ancestors and remember the dead. Prior to 1948, the autumnal equinox was an imperial * ancestor worship festival called Shūki kōrei-sai (秋季皇霊祭). - * @throws \ReflectionException + * @throws ReflectionException */ public function testAutumnalEquinoxDayBetween1851And1948() { @@ -119,7 +121,7 @@ public function testAutumnalEquinoxDayBetween1851And1948() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -133,7 +135,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/ChildrensDayTest.php b/tests/Japan/ChildrensDayTest.php index 167100122..0cebc7b2b 100644 --- a/tests/Japan/ChildrensDayTest.php +++ b/tests/Japan/ChildrensDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class ChildrensDayTest extends JapanBaseTestCase implements YasumiTestCaseInterf /** * Tests Children's Day after 1948. Children's Day was established after 1948 - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testChildrensDayOnAfter1948() { @@ -50,8 +52,8 @@ public function testChildrensDayOnAfter1948() /** * Tests Children's Day after 1948 substituted next working day (when Children's Day falls on a Sunday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testChildrensDayOnAfter1948SubstitutedNextWorkingDay() { @@ -66,7 +68,7 @@ public function testChildrensDayOnAfter1948SubstitutedNextWorkingDay() /** * Tests Children's Day before 1948. Children's Day was established after 1948 - * @throws \ReflectionException + * @throws ReflectionException */ public function testChildrensDayBefore1948() { @@ -79,7 +81,7 @@ public function testChildrensDayBefore1948() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/ComingOfAgeDayTest.php b/tests/Japan/ComingOfAgeDayTest.php index b528835ba..d386e261d 100644 --- a/tests/Japan/ComingOfAgeDayTest.php +++ b/tests/Japan/ComingOfAgeDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class ComingOfAgeDayTest extends JapanBaseTestCase implements YasumiTestCaseInte /** * Tests Coming of Age Day after 2000. Coming of Age Day was established after 1948 on January 15th. After 2000 it * was changed to be the second monday of January. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testComingOfAgeDayOnAfter2000() { @@ -53,8 +55,8 @@ public function testComingOfAgeDayOnAfter2000() /** * Tests Coming of Age Day between 1948 and 2000. Coming of Age Day was established after 1948 on January 15th. * After 2000 it was changed to be the second monday of January. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testComingOfAgeDayBetween1948And2000() { @@ -70,7 +72,7 @@ public function testComingOfAgeDayBetween1948And2000() /** * Tests Coming of Age Day before 1948. Coming of Age Day was established after 1948 on January 15th. After 2000 it * was changed to be the second monday of January. - * @throws \ReflectionException + * @throws ReflectionException */ public function testConstitutionMemorialDayBefore1948() { @@ -83,7 +85,7 @@ public function testConstitutionMemorialDayBefore1948() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -97,7 +99,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/ConstitutionMemorialDayTest.php b/tests/Japan/ConstitutionMemorialDayTest.php index c8bc151c2..4bfd6ea2f 100644 --- a/tests/Japan/ConstitutionMemorialDayTest.php +++ b/tests/Japan/ConstitutionMemorialDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class ConstitutionMemorialDayTest extends JapanBaseTestCase implements YasumiTes /** * Tests Constitution Memorial Day after 1948. Constitution Memorial Day was established after 1948 - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testConstitutionMemorialDayOnAfter1948() { @@ -51,8 +53,8 @@ public function testConstitutionMemorialDayOnAfter1948() /** * Tests Constitution Memorial Day after 1948 substituted next working day (when Constitution Memorial Day falls on * a Sunday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testConstitutionMemorialDayOnAfter1948SubstitutedNextWorkingDay() { @@ -67,7 +69,7 @@ public function testConstitutionMemorialDayOnAfter1948SubstitutedNextWorkingDay( /** * Tests Constitution Memorial Day before 1948. Constitution Memorial Day was established after 1948 - * @throws \ReflectionException + * @throws ReflectionException */ public function testConstitutionMemorialDayBefore1948() { @@ -80,7 +82,7 @@ public function testConstitutionMemorialDayBefore1948() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -94,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/CoronationDayTest.php b/tests/Japan/CoronationDayTest.php index e249d1fdc..79f0d7c4b 100644 --- a/tests/Japan/CoronationDayTest.php +++ b/tests/Japan/CoronationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class CoronationDayTest extends JapanBaseTestCase implements YasumiTestCaseInter * * * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEmperorsCoronationDay() { @@ -51,7 +53,7 @@ public function testEmperorsCoronationDay() /** - * @throws \ReflectionException + * @throws ReflectionException */ public function testEmperorsBirthdayBefore2019() { @@ -63,7 +65,7 @@ public function testEmperorsBirthdayBefore2019() } /** - * @throws \ReflectionException + * @throws ReflectionException */ public function testEmperorsBirthdayAfter2020() { @@ -77,7 +79,7 @@ public function testEmperorsBirthdayAfter2020() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -91,7 +93,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/CultureDayTest.php b/tests/Japan/CultureDayTest.php index 3c976a07b..7f8aef427 100644 --- a/tests/Japan/CultureDayTest.php +++ b/tests/Japan/CultureDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class CultureDayTest extends JapanBaseTestCase implements YasumiTestCaseInterfac /** * Tests Culture Day after 1948. Culture Day Day was established after 1948 - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCultureDayOnAfter1948() { @@ -50,8 +52,8 @@ public function testCultureDayOnAfter1948() /** * Tests Culture Day after 1948 substituted next working day (when Culture Day falls on a Sunday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCultureDayOnAfter1948SubstitutedNextWorkingDay() { @@ -66,7 +68,7 @@ public function testCultureDayOnAfter1948SubstitutedNextWorkingDay() /** * Tests Culture Day before 1948. Culture Day was established after 1948 - * @throws \ReflectionException + * @throws ReflectionException */ public function testCultureDayBefore1948() { @@ -79,7 +81,7 @@ public function testCultureDayBefore1948() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/EmperorsBirthdayTest.php b/tests/Japan/EmperorsBirthdayTest.php index ea1c487c0..4d9229b76 100644 --- a/tests/Japan/EmperorsBirthdayTest.php +++ b/tests/Japan/EmperorsBirthdayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class EmperorsBirthdayTest extends JapanBaseTestCase implements YasumiTestCaseIn /** * Tests the Emperors Birthday after 1949 to 1988. The Emperors Birthday is on April 28rd and celebrated as such since * 1949. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEmperorsBirthdayOnAfter1949() { @@ -54,8 +56,8 @@ public function testEmperorsBirthdayOnAfter1949() * Tests the Emperors Birthday after 1989 to 2018. The Emperors Birthday is on December 23rd and celebrated as such since * 1989. Prior to the death of Emperor Hirohito in 1989, this holiday was celebrated on April 29. See also "Shōwa * Day". - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEmperorsBirthdayOnAfter1989() { @@ -71,8 +73,8 @@ public function testEmperorsBirthdayOnAfter1989() /** * Tests the Emperors Birthday after 2020. The Emperors Birthday is on February 23rd and celebrated as such since * 2020. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEmperorsBirthdayOnAfter2020() { @@ -88,8 +90,8 @@ public function testEmperorsBirthdayOnAfter2020() /** * Tests the Emperors Birthday after 1989 substituted next working day (when the Emperors Birthday falls on a * Sunday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEmperorsBirthdayOnAfter1989SubstitutedNextWorkingDay() { @@ -106,7 +108,7 @@ public function testEmperorsBirthdayOnAfter1989SubstitutedNextWorkingDay() * Tests the Emperors Birthday before 1989. The Emperors Birthday is on December 23rd and celebrated as such since * 1989. Prior to the death of Emperor Hirohito in 1989, this holiday was celebrated on April 29. See also "Shōwa * Day"/"Greenery Day" - * @throws \ReflectionException + * @throws ReflectionException */ public function testEmperorsBirthdayBefore1989() { @@ -120,7 +122,7 @@ public function testEmperorsBirthdayBefore1989() /** * Tests the Emperors Birthday at 2019. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testEmperorsBirthdayAt2019() { @@ -133,7 +135,7 @@ public function testEmperorsBirthdayAt2019() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -147,7 +149,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/EnthronementProclamationCeremonyTest.php b/tests/Japan/EnthronementProclamationCeremonyTest.php index 0dd9e37a8..c865513b8 100644 --- a/tests/Japan/EnthronementProclamationCeremonyTest.php +++ b/tests/Japan/EnthronementProclamationCeremonyTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class EnthronementProclamationCeremonyTest extends JapanBaseTestCase implements * * * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEmperorsCoronationDay() { @@ -51,7 +53,7 @@ public function testEmperorsCoronationDay() /** - * @throws \ReflectionException + * @throws ReflectionException */ public function testEmperorsBirthdayBefore2019() { @@ -63,7 +65,7 @@ public function testEmperorsBirthdayBefore2019() } /** - * @throws \ReflectionException + * @throws ReflectionException */ public function testEmperorsBirthdayAfter2020() { @@ -76,7 +78,7 @@ public function testEmperorsBirthdayAfter2020() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -90,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/GreeneryDayTest.php b/tests/Japan/GreeneryDayTest.php index d6b2e06b9..1ba1cd5c3 100644 --- a/tests/Japan/GreeneryDayTest.php +++ b/tests/Japan/GreeneryDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class GreeneryDayTest extends JapanBaseTestCase implements YasumiTestCaseInterfa /** * Tests Greenery Day after 2007. Greenery Day was established from 1989 on April 29th. After 2007 * it was changed to be May 4th. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfter2007() { @@ -51,8 +53,8 @@ public function testHolidayOnAfter2007() /** * Tests Greenery Day after 2007 substituted next working day (when Greenery Day falls on a Sunday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfter2007SubstitutedNextWorkingDay() { @@ -68,8 +70,8 @@ public function testHolidayOnAfter2007SubstitutedNextWorkingDay() /** * Tests Greenery Day between 1989 and 2007. Greenery Day was established from 1989 on April 29th. After 2007 * it was changed to be May 4th. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayBetween1989And2007() { @@ -84,8 +86,8 @@ public function testHolidayBetween1989And2007() /** * Tests Greenery Day between 1989 and 2007 substituted next working day (when Greenery Day falls on a Sunday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayBetween1989And2007SubstitutedNextWorkingDay() { @@ -101,7 +103,7 @@ public function testHolidayBetween1989And2007SubstitutedNextWorkingDay() /** * Tests Greenery Day before 1989. Greenery Day was established from 1989 on April 29th. After 2007 * it was changed to be May 4th. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBefore1989() { @@ -114,7 +116,7 @@ public function testHolidayBefore1989() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -128,7 +130,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/JapanTest.php b/tests/Japan/JapanTest.php index 1edf88652..002909133 100644 --- a/tests/Japan/JapanTest.php +++ b/tests/Japan/JapanTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Japan; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class JapanTest extends JapanBaseTestCase /** * Tests if all official holidays in Japan are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -52,7 +53,7 @@ public function testOfficialHolidays(): void /** * Tests if all official holidays in Japan At 2019 are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidaysAt2019(): void { @@ -79,7 +80,7 @@ public function testOfficialHolidaysAt2019(): void /** * Tests if all observed holidays in Japan are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -88,7 +89,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Japan are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -97,7 +98,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Japan are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -106,7 +107,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Japan are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Japan/LabourThanksgivingDayTest.php b/tests/Japan/LabourThanksgivingDayTest.php index 428c239de..cd8643a1e 100644 --- a/tests/Japan/LabourThanksgivingDayTest.php +++ b/tests/Japan/LabourThanksgivingDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class LabourThanksgivingDayTest extends JapanBaseTestCase implements YasumiTestC /** * Tests Labor Thanksgiving Day after 1948. Labor Thanksgiving Day is held on November 23rd and established since * 1948. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testLabourThanksgivingDayOnAfter1948() { @@ -52,8 +54,8 @@ public function testLabourThanksgivingDayOnAfter1948() /** * Tests Labor Thanksgiving Day after 1948 substituted next working day (when Labor Thanksgiving Day falls on a * Sunday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testLabourThanksgivingDayOnAfter1948SubstitutedNextWorkingDay() { @@ -69,7 +71,7 @@ public function testLabourThanksgivingDayOnAfter1948SubstitutedNextWorkingDay() /** * Tests Labor Thanksgiving Day before 1948. Labor Thanksgiving Day is held on November 23rd and established since * 1948. - * @throws \ReflectionException + * @throws ReflectionException */ public function testLabourThanksgivingDayBefore1948() { @@ -82,7 +84,7 @@ public function testLabourThanksgivingDayBefore1948() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -96,7 +98,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/MarineDayTest.php b/tests/Japan/MarineDayTest.php index 494c1545c..0965e85c9 100644 --- a/tests/Japan/MarineDayTest.php +++ b/tests/Japan/MarineDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class MarineDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface /** * Tests Marine Day in 2020. Marine Day in 2020 is July 23th for the Olympic Games. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testMarineDayIn2020() { @@ -51,8 +53,8 @@ public function testMarineDayIn2020() /** * Tests Marine Day after 2003. Marine Day was established since 1996 on July 20th. After 2003 it was changed * to be the third monday of July. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testMarineDayOnAfter2003() { @@ -68,8 +70,8 @@ public function testMarineDayOnAfter2003() /** * Tests Marine Day between 1996 and 2003. Marine Day was established since 1996 on July 20th. After 2003 it was * changed to be the third monday of July. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testMarineDayBetween1996And2003() { @@ -84,8 +86,8 @@ public function testMarineDayBetween1996And2003() /** * Tests Marine Day between 1996 and 2003 substituted next working day (when Marine Day falls on a Sunday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testMarineDayBetween1996And2003SubstitutedNextWorkingDay() { @@ -101,7 +103,7 @@ public function testMarineDayBetween1996And2003SubstitutedNextWorkingDay() /** * Tests Marine Day before 1996. Marine Day was established since 1996 on July 20th. After 2003 it was changed * to be the third monday of July. - * @throws \ReflectionException + * @throws ReflectionException */ public function testMarineDayBefore1996() { @@ -114,7 +116,7 @@ public function testMarineDayBefore1996() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -128,7 +130,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/MountainDayTest.php b/tests/Japan/MountainDayTest.php index 735a34330..83f65e2e6 100644 --- a/tests/Japan/MountainDayTest.php +++ b/tests/Japan/MountainDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class MountainDayTest extends JapanBaseTestCase implements YasumiTestCaseInterfa /** * Tests Mountain Day in 2020. Mountain Day in 2020 is August 10th for the Olympic Games. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testMountainDayIn2020() { @@ -50,8 +52,8 @@ public function testMountainDayIn2020() /** * Tests Mountain Day after 2016. Mountain Day was established in 2014 and is held from 2016 on August 11th. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testMountainDayOnAfter2016() { @@ -66,8 +68,8 @@ public function testMountainDayOnAfter2016() /** * Tests Mountain Day after 2016 substituted next working day (when Mountain Day falls on a Sunday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testMountainDayOnAfter2016SubstitutedNextWorkingDay() { @@ -82,7 +84,7 @@ public function testMountainDayOnAfter2016SubstitutedNextWorkingDay() /** * Tests Mountain Day before 2016. Mountain Day was established in 2014 and is held from 2016 on August 11th. - * @throws \ReflectionException + * @throws ReflectionException */ public function testMountainDayBefore2016() { @@ -95,7 +97,7 @@ public function testMountainDayBefore2016() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -109,7 +111,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/NationalFoundationDayTest.php b/tests/Japan/NationalFoundationDayTest.php index 829cc6342..99bae2986 100644 --- a/tests/Japan/NationalFoundationDayTest.php +++ b/tests/Japan/NationalFoundationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class NationalFoundationDayTest extends JapanBaseTestCase implements YasumiTestC /** * Tests National Foundation Day after 1966. National Foundation day was established after 1966 - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testNationalFoundationDayOnAfter1966() { @@ -51,8 +53,8 @@ public function testNationalFoundationDayOnAfter1966() /** * Tests National Foundation Day after 1966. substituted next working day (when National Foundation Day falls on a * Sunday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testNationalFoundationDayOnAfter1966SubstitutedNextWorkingDay() { @@ -67,7 +69,7 @@ public function testNationalFoundationDayOnAfter1966SubstitutedNextWorkingDay() /** * Tests National Foundation Day before 1966. National Foundation day was established after 1966 - * @throws \ReflectionException + * @throws ReflectionException */ public function testNationalFoundationDayBefore1966() { @@ -80,7 +82,7 @@ public function testNationalFoundationDayBefore1966() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -94,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/NewYearsDayTest.php b/tests/Japan/NewYearsDayTest.php index 1b3fb0f97..f1dd672fe 100644 --- a/tests/Japan/NewYearsDayTest.php +++ b/tests/Japan/NewYearsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class NewYearsDayTest extends JapanBaseTestCase implements YasumiTestCaseInterfa /** * Tests New Years Day after 1948. New Years Day was established after 1948 - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testNewYearsDayOnAfter1948() { @@ -50,8 +52,8 @@ public function testNewYearsDayOnAfter1948() /** * Tests New Years Day after 1948 substituted next working day (when New Years Day falls on a Sunday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testNewYearsDayOnAfter1948SubstitutedNextWorkingDay() { @@ -66,7 +68,7 @@ public function testNewYearsDayOnAfter1948SubstitutedNextWorkingDay() /** * Tests New Years Day before 1948. New Years Day was established after 1948 - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDayBefore1948() { @@ -79,7 +81,7 @@ public function testNewYearsDayBefore1948() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/PublicBridgeDayTest.php b/tests/Japan/PublicBridgeDayTest.php index d099cf811..df0b3b396 100644 --- a/tests/Japan/PublicBridgeDayTest.php +++ b/tests/Japan/PublicBridgeDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -33,8 +35,8 @@ class PublicBridgeDayTest extends JapanBaseTestCase implements YasumiTestCaseInt /** * Tests public bridge days. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPublicBridgeDay() { @@ -54,7 +56,7 @@ public function testPublicBridgeDay() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -63,7 +65,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/RespectForTheAgedDayTest.php b/tests/Japan/RespectForTheAgedDayTest.php index ba7070e1a..79d9d38a4 100644 --- a/tests/Japan/RespectForTheAgedDayTest.php +++ b/tests/Japan/RespectForTheAgedDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class RespectForTheAgedDayTest extends JapanBaseTestCase implements YasumiTestCa /** * Tests Respect for the Aged Day after 2003. Respect for the Aged Day was established since 1996 on September * 15th. After 2003 it was changed to be the third monday of September. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testRespectForTheAgedDayOnAfter2003() { @@ -52,8 +54,8 @@ public function testRespectForTheAgedDayOnAfter2003() /** * Tests Respect for the Aged Day between 1996 and 2003. Respect for the Aged Day was established since 1996 on * September 15th. After 2003 it was changed to be the third monday of September. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testRespectForTheAgedDayBetween1996And2003() { @@ -69,8 +71,8 @@ public function testRespectForTheAgedDayBetween1996And2003() /** * Tests Respect for the Aged Day between 1996 and 2003 substituted next working day (when Respect for the Aged Day * falls on a Sunday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testRespectForTheAgedDayBetween1996And2003SubstitutedNextWorkingDay() { @@ -86,7 +88,7 @@ public function testRespectForTheAgedDayBetween1996And2003SubstitutedNextWorking /** * Tests Respect for the Aged Day before 1996. Respect for the Aged Day was established since 1996 on September * 15th. After 2003 it was changed to be the third monday of September. - * @throws \ReflectionException + * @throws ReflectionException */ public function testRespectForTheAgedDayBefore1996() { @@ -99,7 +101,7 @@ public function testRespectForTheAgedDayBefore1996() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -113,7 +115,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/ShowaDayTest.php b/tests/Japan/ShowaDayTest.php index 380391398..aa695cb3a 100644 --- a/tests/Japan/ShowaDayTest.php +++ b/tests/Japan/ShowaDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class ShowaDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in the test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfter2007() { @@ -50,8 +52,8 @@ public function testHolidayOnAfter2007() /** * Tests the holiday defined in the test on or after the establishment and substituted next working day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishmentSubstitutedNextWorkingDay() { @@ -66,7 +68,7 @@ public function testHolidayOnAfterEstablishmentSubstitutedNextWorkingDay() /** * Tests the holiday defined in the test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -79,7 +81,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/SportsDayTest.php b/tests/Japan/SportsDayTest.php index 87654a7da..099ebfc25 100644 --- a/tests/Japan/SportsDayTest.php +++ b/tests/Japan/SportsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class SportsDayTest extends JapanBaseTestCase implements YasumiTestCaseInterface /** * Tests Health And Sports Day in 2020. Health And Sports Day in 2020 is July 24th for the Olympic Games. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testSportsDayIn2020() { @@ -51,8 +53,8 @@ public function testSportsDayIn2020() /** * Tests Health And Sports Day after 2000. Health And Sports Day was established since 1996 on October 10th. After * 2000 it was changed to be the second monday of October. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testSportsDayOnAfter2000() { @@ -68,8 +70,8 @@ public function testSportsDayOnAfter2000() /** * Tests Health And Sports Day between 1996 and 2000. Health And Sports Day was established since 1996 on October * 10th. After 2000 it was changed to be the second monday of October. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testSportsDayBetween1996And2000() { @@ -85,8 +87,8 @@ public function testSportsDayBetween1996And2000() /** * Tests Health And Sports Day between 1996 and 2000 substituted next working day (when Health And Sports Day falls * on a Sunday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testSportsDayBetween1996And2000SubstitutedNextWorkingDay() { @@ -102,7 +104,7 @@ public function testSportsDayBetween1996And2000SubstitutedNextWorkingDay() /** * Tests Health And Sports Day before. Health And Sports Day was established since 1996 on October 10th. After * 2000 it was changed to be the second monday of October. - * @throws \ReflectionException + * @throws ReflectionException */ public function testSportsDayBefore1996() { @@ -116,7 +118,7 @@ public function testSportsDayBefore1996() /** * Tests the translated name of the holiday defined in this test. * 1996-2019:Health And Sports Day - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -131,7 +133,7 @@ public function testTranslation(): void /** * Tests the translated name of the holiday defined in this test. * 2020 - :Sports Day - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslationFrom2020(): void { @@ -146,7 +148,7 @@ public function testTranslationFrom2020(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Japan/VernalEquinoxDayTest.php b/tests/Japan/VernalEquinoxDayTest.php index 003671230..b57a2ae08 100644 --- a/tests/Japan/VernalEquinoxDayTest.php +++ b/tests/Japan/VernalEquinoxDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -38,7 +40,7 @@ class VernalEquinoxDayTest extends JapanBaseTestCase implements YasumiTestCaseIn * festival called Shunki kōrei-sai (春季皇霊祭). * * After 2150 no calculations are available yet. - * @throws \ReflectionException + * @throws ReflectionException */ public function testVernalEquinoxDayOnAfter2150() { @@ -58,8 +60,8 @@ public function testVernalEquinoxDayOnAfter2150() * @param $month int month (number) of example data to be tested * @param $day int day of the month (number) of example data to be tested * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testVernalEquinoxDayBetween1948And2150($year, $month, $day) { @@ -92,7 +94,7 @@ public function vernalEquinoxHolidaysProvider(): array * Tests Vernal Equinox Day before 1948. This national holiday was established in 1948 as a day for the admiration * of nature and the love of living things. Prior to 1948, the vernal equinox was an imperial ancestor worship * festival called Shunki kōrei-sai (春季皇霊祭). - * @throws \ReflectionException + * @throws ReflectionException */ public function testVernalEquinoxDayBefore1948() { @@ -107,7 +109,7 @@ public function testVernalEquinoxDayBefore1948() * Tests Vernal Equinox Day between 1851 and 1948. This national holiday was established in 1948 as a day for * the admiration of nature and the love of living things. Prior to 1948, the vernal equinox was an imperial * ancestor worship festival called Shunki kōrei-sai (春季皇霊祭). - * @throws \ReflectionException + * @throws ReflectionException */ public function testVernalEquinoxDayBetween1851And1948() { @@ -120,7 +122,7 @@ public function testVernalEquinoxDayBetween1851And1948() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -134,7 +136,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Latvia/ChristmasDayTest.php b/tests/Latvia/ChristmasDayTest.php index b13788463..657e1d325 100644 --- a/tests/Latvia/ChristmasDayTest.php +++ b/tests/Latvia/ChristmasDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Latvia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class ChristmasDayTest extends LatviaBaseTestCase implements YasumiTestCaseInter /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Latvia/ChristmasEveDayTest.php b/tests/Latvia/ChristmasEveDayTest.php index 6b2a65341..5e8a411f5 100644 --- a/tests/Latvia/ChristmasEveDayTest.php +++ b/tests/Latvia/ChristmasEveDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Latvia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class ChristmasEveDayTest extends LatviaBaseTestCase implements YasumiTestCaseIn /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Latvia/EasterDayTest.php b/tests/Latvia/EasterDayTest.php index f1f8b9927..d8b372808 100644 --- a/tests/Latvia/EasterDayTest.php +++ b/tests/Latvia/EasterDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Latvia; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +34,7 @@ class EasterDayTest extends LatviaBaseTestCase implements YasumiTestCaseInterfac /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -45,8 +49,8 @@ public function holidayDataProvider(): array * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -54,13 +58,13 @@ public function testHoliday($year, $expected) self::REGION, self::HOLIDAY, $year, - new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -74,7 +78,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Latvia/EasterMondayDayTest.php b/tests/Latvia/EasterMondayDayTest.php index 6483022ea..c00934134 100644 --- a/tests/Latvia/EasterMondayDayTest.php +++ b/tests/Latvia/EasterMondayDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Latvia; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +34,7 @@ class EasterMondayDayTest extends LatviaBaseTestCase implements YasumiTestCaseIn /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -45,8 +49,8 @@ public function holidayDataProvider(): array * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -54,13 +58,13 @@ public function testHoliday($year, $expected) self::REGION, self::HOLIDAY, $year, - new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -74,7 +78,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Latvia/GoodFridayDayTest.php b/tests/Latvia/GoodFridayDayTest.php index 4ec9d62ef..de267883c 100644 --- a/tests/Latvia/GoodFridayDayTest.php +++ b/tests/Latvia/GoodFridayDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Latvia; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +34,7 @@ class GoodFridayDayTest extends LatviaBaseTestCase implements YasumiTestCaseInte /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -45,8 +49,8 @@ public function holidayDataProvider(): array * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -54,13 +58,13 @@ public function testHoliday($year, $expected) self::REGION, self::HOLIDAY, $year, - new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -74,7 +78,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Latvia/InternationalWorkersDayTest.php b/tests/Latvia/InternationalWorkersDayTest.php index b23b2dc97..f7b27cdc6 100644 --- a/tests/Latvia/InternationalWorkersDayTest.php +++ b/tests/Latvia/InternationalWorkersDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Latvia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class InternationalWorkersDayTest extends LatviaBaseTestCase implements YasumiTe /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Latvia/LatviaTest.php b/tests/Latvia/LatviaTest.php index 4988fda1b..d3517e9dc 100644 --- a/tests/Latvia/LatviaTest.php +++ b/tests/Latvia/LatviaTest.php @@ -13,6 +13,7 @@ namespace Yasumi\tests\Latvia; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Latvia; @@ -25,7 +26,7 @@ class LatviaTest extends LatviaBaseTestCase { /** * Tests if all official holidays in Latvia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -58,7 +59,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Latvia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -67,7 +68,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Latvia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -76,7 +77,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Latvia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -85,7 +86,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Latvia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Latvia/MidsummerEveDayTest.php b/tests/Latvia/MidsummerEveDayTest.php index 48f65b085..7b7a60564 100644 --- a/tests/Latvia/MidsummerEveDayTest.php +++ b/tests/Latvia/MidsummerEveDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Latvia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class MidsummerEveDayTest extends LatviaBaseTestCase implements YasumiTestCaseIn /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Latvia/NewYearsDayTest.php b/tests/Latvia/NewYearsDayTest.php index f14bd3599..81933470c 100644 --- a/tests/Latvia/NewYearsDayTest.php +++ b/tests/Latvia/NewYearsDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Latvia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class NewYearsDayTest extends LatviaBaseTestCase implements YasumiTestCaseInterf /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Latvia/NewYearsEveDayTest.php b/tests/Latvia/NewYearsEveDayTest.php index 7af954529..73dbc4892 100644 --- a/tests/Latvia/NewYearsEveDayTest.php +++ b/tests/Latvia/NewYearsEveDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Latvia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class NewYearsEveDayTest extends LatviaBaseTestCase implements YasumiTestCaseInt /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php index 24370f310..17aef6735 100644 --- a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php +++ b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Latvia; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Latvia; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,7 +35,7 @@ class ProclamationOfTheRepublicOfLatviaDayTest extends LatviaBaseTestCase implem /** * Test if holiday is not defined before proclamation - * @throws \ReflectionException + * @throws ReflectionException */ public function testNotHoliday() { @@ -44,7 +48,7 @@ public function testNotHoliday() /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -65,8 +69,8 @@ public function holidayDataProvider(): array * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,13 +78,13 @@ public function testHoliday($year, $expected) self::REGION, self::HOLIDAY, $year, - new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -97,7 +101,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Latvia/RestorationOfIndependenceDayTest.php b/tests/Latvia/RestorationOfIndependenceDayTest.php index 2cfbe4485..cbeb84311 100644 --- a/tests/Latvia/RestorationOfIndependenceDayTest.php +++ b/tests/Latvia/RestorationOfIndependenceDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Latvia; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Latvia; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,7 +35,7 @@ class RestorationOfIndependenceDayTest extends LatviaBaseTestCase implements Yas /** * Test if holiday is not defined before restoration - * @throws \ReflectionException + * @throws ReflectionException */ public function testNotHoliday() { @@ -44,7 +48,7 @@ public function testNotHoliday() /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -65,8 +69,8 @@ public function holidayDataProvider(): array * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -74,13 +78,13 @@ public function testHoliday($year, $expected) self::REGION, self::HOLIDAY, $year, - new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -97,7 +101,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Latvia/SecondChristmasDayTest.php b/tests/Latvia/SecondChristmasDayTest.php index c321983b2..5f42a2f3c 100644 --- a/tests/Latvia/SecondChristmasDayTest.php +++ b/tests/Latvia/SecondChristmasDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Latvia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class SecondChristmasDayTest extends LatviaBaseTestCase implements YasumiTestCas /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Latvia/StJohnsDayTest.php b/tests/Latvia/StJohnsDayTest.php index aef33ea08..1bf72e39b 100644 --- a/tests/Latvia/StJohnsDayTest.php +++ b/tests/Latvia/StJohnsDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Latvia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class StJohnsDayTest extends LatviaBaseTestCase implements YasumiTestCaseInterfa /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Lithuania/AllSaintsDayTest.php b/tests/Lithuania/AllSaintsDayTest.php index 3ef9da2cf..763a708bd 100644 --- a/tests/Lithuania/AllSaintsDayTest.php +++ b/tests/Lithuania/AllSaintsDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Lithuania; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class AllSaintsDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseIn /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Lithuania/AssumptionOfMaryDayTest.php b/tests/Lithuania/AssumptionOfMaryDayTest.php index 54f050c42..e7e440dba 100644 --- a/tests/Lithuania/AssumptionOfMaryDayTest.php +++ b/tests/Lithuania/AssumptionOfMaryDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Lithuania; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class AssumptionOfMaryDayTest extends LithuaniaBaseTestCase implements YasumiTes /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Lithuania/ChristmasDayTest.php b/tests/Lithuania/ChristmasDayTest.php index 36934f574..d51125955 100644 --- a/tests/Lithuania/ChristmasDayTest.php +++ b/tests/Lithuania/ChristmasDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Lithuania; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class ChristmasDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseIn /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Lithuania/ChristmasEveDayTest.php b/tests/Lithuania/ChristmasEveDayTest.php index 4686f5de6..ef98d9890 100644 --- a/tests/Lithuania/ChristmasEveDayTest.php +++ b/tests/Lithuania/ChristmasEveDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Lithuania; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class ChristmasEveDayTest extends LithuaniaBaseTestCase implements YasumiTestCas /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Lithuania/EasterDayTest.php b/tests/Lithuania/EasterDayTest.php index 1f3f4e97e..82ac7fd03 100644 --- a/tests/Lithuania/EasterDayTest.php +++ b/tests/Lithuania/EasterDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Lithuania; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +34,7 @@ class EasterDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInter /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -45,8 +49,8 @@ public function holidayDataProvider(): array * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -54,13 +58,13 @@ public function testHoliday($year, $expected) self::REGION, self::HOLIDAY, $year, - new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -74,7 +78,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Lithuania/EasterMondayDayTest.php b/tests/Lithuania/EasterMondayDayTest.php index f2a17e0a2..d4abb35d8 100644 --- a/tests/Lithuania/EasterMondayDayTest.php +++ b/tests/Lithuania/EasterMondayDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Lithuania; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +34,7 @@ class EasterMondayDayTest extends LithuaniaBaseTestCase implements YasumiTestCas /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -45,8 +49,8 @@ public function holidayDataProvider(): array * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -54,13 +58,13 @@ public function testHoliday($year, $expected) self::REGION, self::HOLIDAY, $year, - new \DateTime($expected, new \DateTimeZone(self::TIMEZONE)) + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -74,7 +78,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Lithuania/InternationalWorkersDayTest.php b/tests/Lithuania/InternationalWorkersDayTest.php index a68b5b07c..bffa5d71d 100644 --- a/tests/Lithuania/InternationalWorkersDayTest.php +++ b/tests/Lithuania/InternationalWorkersDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Lithuania; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class InternationalWorkersDayTest extends LithuaniaBaseTestCase implements Yasum /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Lithuania/LithuaniaTest.php b/tests/Lithuania/LithuaniaTest.php index f4d95d7f2..900647337 100644 --- a/tests/Lithuania/LithuaniaTest.php +++ b/tests/Lithuania/LithuaniaTest.php @@ -13,6 +13,7 @@ namespace Yasumi\tests\Lithuania; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; @@ -25,7 +26,7 @@ class LithuaniaTest extends LithuaniaBaseTestCase { /** * Tests if all official holidays in Lithuania are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -61,7 +62,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Lithuania are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -70,7 +71,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Lithuania are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -79,7 +80,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Lithuania are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -88,7 +89,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Lithuania are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Lithuania/NewYearsDayTest.php b/tests/Lithuania/NewYearsDayTest.php index 28e509a65..1b76db011 100644 --- a/tests/Lithuania/NewYearsDayTest.php +++ b/tests/Lithuania/NewYearsDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Lithuania; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class NewYearsDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInt /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php index fe901ab69..53052d52c 100644 --- a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Lithuania; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,7 +35,7 @@ class RestorationOfIndependenceOfLithuaniaDayTest extends LithuaniaBaseTestCase /** * Test if holiday is not defined before restoration - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeRestoration() { @@ -44,8 +48,8 @@ public function testHolidayBeforeRestoration() /** * Test if holiday is defined after restoration - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayAfterRestoration() { @@ -55,14 +59,14 @@ public function testHolidayAfterRestoration() self::REGION, self::HOLIDAY, $year, - new \DateTime("{$year}-03-11", new \DateTimeZone(self::TIMEZONE)) + new DateTime("{$year}-03-11", new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -82,7 +86,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php index 576d192d7..2d4a43127 100644 --- a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Lithuania; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,7 +35,7 @@ class RestorationOfTheStateOfLithuaniaDayTest extends LithuaniaBaseTestCase impl /** * Test if holiday is not defined before restoration - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeRestoration() { @@ -44,8 +48,8 @@ public function testHolidayBeforeRestoration() /** * Test if holiday is defined after restoration - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayAfterRestoration() { @@ -55,14 +59,14 @@ public function testHolidayAfterRestoration() self::REGION, self::HOLIDAY, $year, - new \DateTime("{$year}-02-16", new \DateTimeZone(self::TIMEZONE)) + new DateTime("{$year}-02-16", new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -82,7 +86,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Lithuania/SecondChristmasDayTest.php b/tests/Lithuania/SecondChristmasDayTest.php index 544461a53..6413c4c17 100644 --- a/tests/Lithuania/SecondChristmasDayTest.php +++ b/tests/Lithuania/SecondChristmasDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Lithuania; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class SecondChristmasDayTest extends LithuaniaBaseTestCase implements YasumiTest /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Lithuania/StJohnsDayTest.php b/tests/Lithuania/StJohnsDayTest.php index d119c729f..22e2e841c 100644 --- a/tests/Lithuania/StJohnsDayTest.php +++ b/tests/Lithuania/StJohnsDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Lithuania; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class StJohnsDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseInte /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Lithuania/StatehoodDayTest.php b/tests/Lithuania/StatehoodDayTest.php index 0cb69ff74..f74a5aed4 100644 --- a/tests/Lithuania/StatehoodDayTest.php +++ b/tests/Lithuania/StatehoodDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Lithuania; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Lithuania; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,7 +35,7 @@ class StatehoodDayTest extends LithuaniaBaseTestCase implements YasumiTestCaseIn /** * Test if holiday is not defined before restoration - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeRestoration() { @@ -44,8 +48,8 @@ public function testHolidayBeforeRestoration() /** * Test if holiday is defined after restoration - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayAfterRestoration() { @@ -55,14 +59,14 @@ public function testHolidayAfterRestoration() self::REGION, self::HOLIDAY, $year, - new \DateTime("{$year}-07-06", new \DateTimeZone(self::TIMEZONE)) + new DateTime("{$year}-07-06", new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -82,7 +86,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/AscensionDayTest.php b/tests/Netherlands/AscensionDayTest.php index d737ba2be..d69356819 100644 --- a/tests/Netherlands/AscensionDayTest.php +++ b/tests/Netherlands/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends NetherlandsBaseTestCase implements YasumiTestCase /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/AshWednesdayTest.php b/tests/Netherlands/AshWednesdayTest.php index 6576c79df..1ef86afc0 100644 --- a/tests/Netherlands/AshWednesdayTest.php +++ b/tests/Netherlands/AshWednesdayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AshWednesdayTest extends NetherlandsBaseTestCase implements YasumiTestCase /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of Ash Wednesday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/ChristmasDayTest.php b/tests/Netherlands/ChristmasDayTest.php index e93bc7271..150293c5a 100644 --- a/tests/Netherlands/ChristmasDayTest.php +++ b/tests/Netherlands/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Netherlands; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends NetherlandsBaseTestCase implements YasumiTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/CommemorationDayTest.php b/tests/Netherlands/CommemorationDayTest.php index 9050043ce..5dc334dc1 100644 --- a/tests/Netherlands/CommemorationDayTest.php +++ b/tests/Netherlands/CommemorationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class CommemorationDayTest extends NetherlandsBaseTestCase implements YasumiTest /** * Tests Commemoration Day before 1947. Commemoration Day was established after WWII in 1947. - * @throws \ReflectionException + * @throws ReflectionException */ public function testCommemorationDayBefore1947() { @@ -47,8 +49,8 @@ public function testCommemorationDayBefore1947() /** * Tests Commemoration Day after 1947. Commemoration Day was established after WWII in 1947. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCommemorationDayOnAfter1947() { @@ -63,7 +65,7 @@ public function testCommemorationDayOnAfter1947() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/EasterMondayTest.php b/tests/Netherlands/EasterMondayTest.php index 9f018dd85..99ad74088 100644 --- a/tests/Netherlands/EasterMondayTest.php +++ b/tests/Netherlands/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends NetherlandsBaseTestCase implements YasumiTestCase /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/EasterTest.php b/tests/Netherlands/EasterTest.php index 9c612ff05..89cf43f27 100644 --- a/tests/Netherlands/EasterTest.php +++ b/tests/Netherlands/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterTest extends NetherlandsBaseTestCase implements YasumiTestCaseInterf /** * Tests Easter. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEaster() { @@ -45,7 +47,7 @@ public function testEaster() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/EpiphanyTest.php b/tests/Netherlands/EpiphanyTest.php index 73b678bbe..c0a6f3431 100644 --- a/tests/Netherlands/EpiphanyTest.php +++ b/tests/Netherlands/EpiphanyTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Netherlands; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class EpiphanyTest extends NetherlandsBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which Epiphany needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testEpiphany($year, $expected) { @@ -45,7 +47,7 @@ public function testEpiphany($year, $expected) * Returns a list of random test dates used for assertion of Epiphany. * * @return array list of test dates for Epiphany - * @throws \Exception + * @throws Exception */ public function EpiphanyDataProvider(): array { @@ -54,7 +56,7 @@ public function EpiphanyDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/FathersDayTest.php b/tests/Netherlands/FathersDayTest.php index ed4577d20..d0afe8096 100644 --- a/tests/Netherlands/FathersDayTest.php +++ b/tests/Netherlands/FathersDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class FathersDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseIn /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/GoodFridayTest.php b/tests/Netherlands/GoodFridayTest.php index df2eb3075..816f54f89 100644 --- a/tests/Netherlands/GoodFridayTest.php +++ b/tests/Netherlands/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends NetherlandsBaseTestCase implements YasumiTestCaseIn /** * Tests Good Friday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testGoodFriday() { @@ -45,7 +47,7 @@ public function testGoodFriday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/HalloweenTest.php b/tests/Netherlands/HalloweenTest.php index b190966ab..a7d9982a5 100644 --- a/tests/Netherlands/HalloweenTest.php +++ b/tests/Netherlands/HalloweenTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Netherlands; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class HalloweenTest extends NetherlandsBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which Halloween needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($year, $expected) * Returns a list of random test dates used for assertion of Halloween. * * @return array list of test dates for Halloween - * @throws \Exception + * @throws Exception */ public function HalloweenDataProvider(): array { @@ -54,7 +56,7 @@ public function HalloweenDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/InternationalWorkersDayTest.php b/tests/Netherlands/InternationalWorkersDayTest.php index d49bc4bc2..7451a1e5b 100644 --- a/tests/Netherlands/InternationalWorkersDayTest.php +++ b/tests/Netherlands/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Netherlands; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends NetherlandsBaseTestCase implements Yas * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testInternationalWorkersDay($year, $expected) { @@ -45,7 +47,7 @@ public function testInternationalWorkersDay($year, $expected) * Returns a list of random test dates used for assertion of International Workers' Day. * * @return array list of test dates for International Workers' Day - * @throws \Exception + * @throws Exception */ public function InternationalWorkersDayDataProvider(): array { @@ -54,7 +56,7 @@ public function InternationalWorkersDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/KingsDayTest.php b/tests/Netherlands/KingsDayTest.php index 3ba65e6f3..91eb6ecce 100644 --- a/tests/Netherlands/KingsDayTest.php +++ b/tests/Netherlands/KingsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class KingsDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInte /** * Tests Kings Day on or after 2014. King's Day is celebrated from 2014 onwards on April 27th. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testKingsDayOnAfter2014() { @@ -50,8 +52,8 @@ public function testKingsDayOnAfter2014() /** * Tests Kings Day substituted on Saturday (when Kings Day falls on a Sunday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testKingsDayOnAfter2014SubstitutedDay() { @@ -66,7 +68,7 @@ public function testKingsDayOnAfter2014SubstitutedDay() /** * Tests Kings Day before 2014. King's Day is celebrated from 2014 onwards on April 27th. - * @throws \ReflectionException + * @throws ReflectionException */ public function testKingsDayBefore2014() { @@ -79,7 +81,7 @@ public function testKingsDayBefore2014() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/LiberationDayTest.php b/tests/Netherlands/LiberationDayTest.php index 38a7730be..89650fce9 100644 --- a/tests/Netherlands/LiberationDayTest.php +++ b/tests/Netherlands/LiberationDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class LiberationDayTest extends NetherlandsBaseTestCase implements YasumiTestCas /** * Tests Liberation Day before 1947. Liberation Day was established after WWII in 1947. - * @throws \ReflectionException + * @throws ReflectionException */ public function testLiberationDayBefore1947() { @@ -47,8 +49,8 @@ public function testLiberationDayBefore1947() /** * Tests Liberation Day after 1947. Liberation Day was established after WWII in 1947. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testLiberationDayOnAfter1947() { @@ -63,7 +65,7 @@ public function testLiberationDayOnAfter1947() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/MothersDayTest.php b/tests/Netherlands/MothersDayTest.php index 27c521267..62d2219c4 100644 --- a/tests/Netherlands/MothersDayTest.php +++ b/tests/Netherlands/MothersDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class MothersDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseIn /** * Tests Mother's Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testMothersDay() { @@ -45,7 +47,7 @@ public function testMothersDay() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/NetherlandsTest.php b/tests/Netherlands/NetherlandsTest.php index 9aace9629..20a5af423 100644 --- a/tests/Netherlands/NetherlandsTest.php +++ b/tests/Netherlands/NetherlandsTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Netherlands; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class NetherlandsTest extends NetherlandsBaseTestCase /** * Tests if all official holidays in Netherlands are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -46,7 +47,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Netherlands are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -65,7 +66,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Netherlands are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -75,7 +76,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Netherlands are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -84,7 +85,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Netherlands are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Netherlands/NewYearsDayTest.php b/tests/Netherlands/NewYearsDayTest.php index 93f3cbf8a..6f1fbc950 100644 --- a/tests/Netherlands/NewYearsDayTest.php +++ b/tests/Netherlands/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Netherlands; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseI * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -45,7 +47,7 @@ public function testNewYearsDay($year, $expected) * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { @@ -54,7 +56,7 @@ public function NewYearsDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/PentecostTest.php b/tests/Netherlands/PentecostTest.php index b0eec6e8e..de891ab0b 100644 --- a/tests/Netherlands/PentecostTest.php +++ b/tests/Netherlands/PentecostTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostTest extends NetherlandsBaseTestCase implements YasumiTestCaseInt /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/QueensDayTest.php b/tests/Netherlands/QueensDayTest.php index 99ab5a78e..bf714c129 100644 --- a/tests/Netherlands/QueensDayTest.php +++ b/tests/Netherlands/QueensDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class QueensDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseInt /** * Tests Queens Day between 1891 and 1948. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testQueensBetween1891and1948() { @@ -45,8 +47,8 @@ public function testQueensBetween1891and1948() /** * Tests Queens Day between 1891 and 1948 substituted one day later (when Queens Day falls on a Sunday). - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testQueensBetween1891and1948SubstitutedLater() { @@ -61,8 +63,8 @@ public function testQueensBetween1891and1948SubstitutedLater() /** * Tests Queens Day between 1949 and 2013. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testQueensBetween1949and2013() { @@ -77,8 +79,8 @@ public function testQueensBetween1949and2013() /** * Tests Queens Day between 1949 and 2013 substituted one day later. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testQueensBetween1949and2013SubstitutedLater() { @@ -93,8 +95,8 @@ public function testQueensBetween1949and2013SubstitutedLater() /** * Tests Queens Day between 1949 and 2013 substituted one day earlier. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testQueensBetween1949and2013SubstitutedEarlier() { @@ -109,7 +111,7 @@ public function testQueensBetween1949and2013SubstitutedEarlier() /** * Tests Queen's Day before 1891. - * @throws \ReflectionException + * @throws ReflectionException */ public function testQueensDayBefore1891() { @@ -118,7 +120,7 @@ public function testQueensDayBefore1891() /** * Tests Queen's Day after 2013. - * @throws \ReflectionException + * @throws ReflectionException */ public function testQueensDayAfter2013() { @@ -127,7 +129,7 @@ public function testQueensDayAfter2013() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -141,7 +143,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/SummertimeTest.php b/tests/Netherlands/SummertimeTest.php index 4334f3ee3..d8b68313a 100644 --- a/tests/Netherlands/SummertimeTest.php +++ b/tests/Netherlands/SummertimeTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class SummertimeTest extends NetherlandsBaseTestCase implements YasumiTestCaseIn /** * Tests Summertime. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testSummertime() { @@ -56,7 +58,7 @@ public function testSummertime() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -70,7 +72,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/ValentinesDayTest.php b/tests/Netherlands/ValentinesDayTest.php index b0726a7ad..e64fec84b 100644 --- a/tests/Netherlands/ValentinesDayTest.php +++ b/tests/Netherlands/ValentinesDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Netherlands; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ValentinesDayTest extends NetherlandsBaseTestCase implements YasumiTestCas * @param int $year the year for which Valentines Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testValentinesDay($year, $expected) { @@ -45,7 +47,7 @@ public function testValentinesDay($year, $expected) * Returns a list of random test dates used for assertion of Valentines Day. * * @return array list of test dates for Valentines Day - * @throws \Exception + * @throws Exception */ public function ValentinesDayDataProvider(): array { @@ -55,7 +57,7 @@ public function ValentinesDayDataProvider(): array /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -64,7 +66,7 @@ public function testHolidayType(): void /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { diff --git a/tests/Netherlands/WintertimeTest.php b/tests/Netherlands/WintertimeTest.php index e5fcdf126..186e3f6c0 100644 --- a/tests/Netherlands/WintertimeTest.php +++ b/tests/Netherlands/WintertimeTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class WintertimeTest extends NetherlandsBaseTestCase implements YasumiTestCaseIn /** * Tests Wintertime. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testWintertime() { @@ -55,7 +57,7 @@ public function testWintertime() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -69,7 +71,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/WorldAnimalDayTest.php b/tests/Netherlands/WorldAnimalDayTest.php index aa44862ce..7171d331b 100644 --- a/tests/Netherlands/WorldAnimalDayTest.php +++ b/tests/Netherlands/WorldAnimalDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class WorldAnimalDayTest extends NetherlandsBaseTestCase implements YasumiTestCa /** * Tests World Animal Day on or after 1931. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testWorldAnimalDayOnAfter1931() { @@ -50,7 +52,7 @@ public function testWorldAnimalDayOnAfter1931() /** * Tests World Animal Day before 1931. - * @throws \ReflectionException + * @throws ReflectionException */ public function testWorldAnimalBefore1931() { @@ -63,7 +65,7 @@ public function testWorldAnimalBefore1931() /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -77,7 +79,7 @@ public function testHolidayType(): void /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { diff --git a/tests/Netherlands/carnivalDayTest.php b/tests/Netherlands/carnivalDayTest.php index 8518936c3..91e5f4d79 100644 --- a/tests/Netherlands/carnivalDayTest.php +++ b/tests/Netherlands/carnivalDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class carnivalDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseI /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -46,7 +48,7 @@ public function testHoliday() /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -55,7 +57,7 @@ public function testHolidayType(): void /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { diff --git a/tests/Netherlands/pentecostMondayTest.php b/tests/Netherlands/pentecostMondayTest.php index 8a1e10fb8..6c2f69560 100644 --- a/tests/Netherlands/pentecostMondayTest.php +++ b/tests/Netherlands/pentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class pentecostMondayTest extends NetherlandsBaseTestCase implements YasumiTestC /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/princesDayTest.php b/tests/Netherlands/princesDayTest.php index ca696b1f0..e24acb23c 100644 --- a/tests/Netherlands/princesDayTest.php +++ b/tests/Netherlands/princesDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class princesDayTest extends NetherlandsBaseTestCase implements YasumiTestCaseIn /** * Tests Prince's Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPrincesDay() { @@ -45,7 +47,7 @@ public function testPrincesDay() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/secondCarnivalDay.php b/tests/Netherlands/secondCarnivalDay.php index 88fc749cd..a07c90013 100644 --- a/tests/Netherlands/secondCarnivalDay.php +++ b/tests/Netherlands/secondCarnivalDay.php @@ -14,6 +14,12 @@ use DateTime; use DateTimeZone; +use Exception; +use InvalidArgumentException; +use PHPUnit_Framework_AssertionFailedError; +use ReflectionException; +use RuntimeException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,12 +37,12 @@ class secondCarnivalDay extends NetherlandsBaseTestCase implements YasumiTestCas /** * Tests the holiday defined in this test. * - * @throws \Yasumi\Exception\UnknownLocaleException - * @throws \InvalidArgumentException - * @throws \PHPUnit_Framework_AssertionFailedError - * @throws \RuntimeException - * @throws \ReflectionException - * @throws \Exception + * @throws UnknownLocaleException + * @throws InvalidArgumentException + * @throws PHPUnit_Framework_AssertionFailedError + * @throws RuntimeException + * @throws ReflectionException + * @throws Exception */ public function testHoliday() { @@ -52,11 +58,11 @@ public function testHoliday() /** * Tests type of the holiday defined in this test. * - * @throws \InvalidArgumentException - * @throws \PHPUnit_Framework_AssertionFailedError - * @throws \RuntimeException - * @throws \Yasumi\Exception\UnknownLocaleException - * @throws \ReflectionException + * @throws InvalidArgumentException + * @throws PHPUnit_Framework_AssertionFailedError + * @throws RuntimeException + * @throws UnknownLocaleException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -66,11 +72,11 @@ public function testHolidayType(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws \InvalidArgumentException - * @throws \PHPUnit_Framework_AssertionFailedError - * @throws \RuntimeException - * @throws \Yasumi\Exception\UnknownLocaleException - * @throws \ReflectionException + * @throws InvalidArgumentException + * @throws PHPUnit_Framework_AssertionFailedError + * @throws RuntimeException + * @throws UnknownLocaleException + * @throws ReflectionException */ public function testTranslation(): void { diff --git a/tests/Netherlands/secondChristmasdayTest.php b/tests/Netherlands/secondChristmasdayTest.php index 65d8e7ea8..f591857c1 100644 --- a/tests/Netherlands/secondChristmasdayTest.php +++ b/tests/Netherlands/secondChristmasdayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Netherlands; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class secondChristmasdayTest extends NetherlandsBaseTestCase implements YasumiTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/stMartinsDayTest.php b/tests/Netherlands/stMartinsDayTest.php index 1d80e4736..94023ed4d 100644 --- a/tests/Netherlands/stMartinsDayTest.php +++ b/tests/Netherlands/stMartinsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Netherlands; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class stMartinsDayTest extends NetherlandsBaseTestCase implements YasumiTestCase * @param int $year the year for which Sint Martins Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function teststMartinsDay($year, $expected) { @@ -45,7 +47,7 @@ public function teststMartinsDay($year, $expected) * Returns a list of random test dates used for assertion of Sint Martins Day. * * @return array list of test dates for Sint Martins Day - * @throws \Exception + * @throws Exception */ public function stMartinsDayDataProvider(): array { @@ -54,7 +56,7 @@ public function stMartinsDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/stNicholasDayTest.php b/tests/Netherlands/stNicholasDayTest.php index 13df81c84..1020ad62d 100644 --- a/tests/Netherlands/stNicholasDayTest.php +++ b/tests/Netherlands/stNicholasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Netherlands; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,7 +37,7 @@ class stNicholasDayTest extends NetherlandsBaseTestCase implements YasumiTestCas * @param int $year the year for which Sint Nicholas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function teststNicholasDay($year, $expected) { @@ -46,7 +48,7 @@ public function teststNicholasDay($year, $expected) * Returns a list of random test dates used for assertion of Sint Nicholas Day. * * @return array list of test dates for Sint Nicholas Day - * @throws \Exception + * @throws Exception */ public function stNicholasDayDataProvider(): array { @@ -55,7 +57,7 @@ public function stNicholasDayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -69,7 +71,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Netherlands/thirdCarnivalDay.php b/tests/Netherlands/thirdCarnivalDay.php index a6ff63f68..bb6b121f4 100644 --- a/tests/Netherlands/thirdCarnivalDay.php +++ b/tests/Netherlands/thirdCarnivalDay.php @@ -14,6 +14,12 @@ use DateTime; use DateTimeZone; +use Exception; +use InvalidArgumentException; +use PHPUnit_Framework_AssertionFailedError; +use ReflectionException; +use RuntimeException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,12 +37,12 @@ class thirdCarnivalDay extends NetherlandsBaseTestCase implements YasumiTestCase /** * Tests the holiday defined in this test. * - * @throws \Yasumi\Exception\UnknownLocaleException - * @throws \InvalidArgumentException - * @throws \PHPUnit_Framework_AssertionFailedError - * @throws \RuntimeException - * @throws \ReflectionException - * @throws \Exception + * @throws UnknownLocaleException + * @throws InvalidArgumentException + * @throws PHPUnit_Framework_AssertionFailedError + * @throws RuntimeException + * @throws ReflectionException + * @throws Exception */ public function testHoliday() { @@ -52,11 +58,11 @@ public function testHoliday() /** * Tests type of the holiday defined in this test. * - * @throws \InvalidArgumentException - * @throws \PHPUnit_Framework_AssertionFailedError - * @throws \RuntimeException - * @throws \Yasumi\Exception\UnknownLocaleException - * @throws \ReflectionException + * @throws InvalidArgumentException + * @throws PHPUnit_Framework_AssertionFailedError + * @throws RuntimeException + * @throws UnknownLocaleException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -66,11 +72,11 @@ public function testHolidayType(): void /** * Tests the translated name of the holiday defined in this test. * - * @throws \InvalidArgumentException - * @throws \PHPUnit_Framework_AssertionFailedError - * @throws \RuntimeException - * @throws \Yasumi\Exception\UnknownLocaleException - * @throws \ReflectionException + * @throws InvalidArgumentException + * @throws PHPUnit_Framework_AssertionFailedError + * @throws RuntimeException + * @throws UnknownLocaleException + * @throws ReflectionException */ public function testTranslation(): void { diff --git a/tests/NewZealand/AnzacDayTest.php b/tests/NewZealand/AnzacDayTest.php index aa89eb7bb..fe68a34d6 100644 --- a/tests/NewZealand/AnzacDayTest.php +++ b/tests/NewZealand/AnzacDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class AnzacDayTest extends NewZealandBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -55,7 +57,7 @@ public function testHoliday($year, $expected) /** * Tests that Labour Day is not present before 1921 - * @throws \ReflectionException + * @throws ReflectionException */ public function testNotHoliday() { @@ -66,7 +68,7 @@ public function testNotHoliday() * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -80,7 +82,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -94,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/NewZealand/BoxingDayTest.php b/tests/NewZealand/BoxingDayTest.php index 7644edd3a..50ea6da5c 100644 --- a/tests/NewZealand/BoxingDayTest.php +++ b/tests/NewZealand/BoxingDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class BoxingDayTest extends NewZealandBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -75,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -89,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/NewZealand/ChristmasDayTest.php b/tests/NewZealand/ChristmasDayTest.php index 5e41b7e5c..a04e2faa1 100644 --- a/tests/NewZealand/ChristmasDayTest.php +++ b/tests/NewZealand/ChristmasDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class ChristmasDayTest extends NewZealandBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -75,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -89,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/NewZealand/DayAfterNewYearsDayTest.php b/tests/NewZealand/DayAfterNewYearsDayTest.php index ea239cf1b..a83cf6054 100644 --- a/tests/NewZealand/DayAfterNewYearsDayTest.php +++ b/tests/NewZealand/DayAfterNewYearsDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class DayAfterNewYearsDayTest extends NewZealandBaseTestCase implements YasumiTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -51,7 +53,7 @@ public function testHoliday($year, $expected) /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -65,7 +67,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -76,7 +78,7 @@ public function testHolidayType(): void * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { diff --git a/tests/NewZealand/EasterMondayTest.php b/tests/NewZealand/EasterMondayTest.php index fdb77c89b..1b2189470 100644 --- a/tests/NewZealand/EasterMondayTest.php +++ b/tests/NewZealand/EasterMondayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class EasterMondayTest extends NewZealandBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -72,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -86,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/NewZealand/GoodFridayTest.php b/tests/NewZealand/GoodFridayTest.php index 99ff9f2ab..b5a45019d 100644 --- a/tests/NewZealand/GoodFridayTest.php +++ b/tests/NewZealand/GoodFridayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class GoodFridayTest extends NewZealandBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -71,7 +73,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -85,7 +87,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/NewZealand/LabourDayTest.php b/tests/NewZealand/LabourDayTest.php index 3944c0fbc..12af78591 100644 --- a/tests/NewZealand/LabourDayTest.php +++ b/tests/NewZealand/LabourDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class LabourDayTest extends NewZealandBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -55,7 +57,7 @@ public function testHoliday($year, $expected) /** * Tests that Labour Day is not present before 1900 - * @throws \ReflectionException + * @throws ReflectionException */ public function testNotHoliday() { @@ -66,7 +68,7 @@ public function testNotHoliday() * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -87,7 +89,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -101,7 +103,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/NewZealand/NewYearsDayTest.php b/tests/NewZealand/NewYearsDayTest.php index 5ef3395b7..e6094ae78 100644 --- a/tests/NewZealand/NewYearsDayTest.php +++ b/tests/NewZealand/NewYearsDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class NewYearsDayTest extends NewZealandBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -80,7 +82,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -94,7 +96,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/NewZealand/NewZealandTest.php b/tests/NewZealand/NewZealandTest.php index 54058b068..b70efcd36 100644 --- a/tests/NewZealand/NewZealandTest.php +++ b/tests/NewZealand/NewZealandTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\NewZealand; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class NewZealandTest extends NewZealandBaseTestCase /** * Tests if all official holidays in New Zealand are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -45,7 +46,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in New Zealand are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -54,7 +55,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in New Zealand are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -63,7 +64,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in New Zealand are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -72,7 +73,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in New Zealand are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/NewZealand/QueensBirthdayTest.php b/tests/NewZealand/QueensBirthdayTest.php index f9b055da1..c04de4ac1 100644 --- a/tests/NewZealand/QueensBirthdayTest.php +++ b/tests/NewZealand/QueensBirthdayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,7 +42,7 @@ class QueensBirthdayTest extends NewZealandBaseTestCase implements YasumiTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -49,7 +51,7 @@ public function testHoliday($year, $expected) /** * Tests that Holiday is not present before 1952 - * @throws \ReflectionException + * @throws ReflectionException */ public function testNotHoliday() { @@ -60,7 +62,7 @@ public function testNotHoliday() * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -77,7 +79,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -91,7 +93,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/NewZealand/WaitangiDayTest.php b/tests/NewZealand/WaitangiDayTest.php index bd7708b35..981f72a83 100644 --- a/tests/NewZealand/WaitangiDayTest.php +++ b/tests/NewZealand/WaitangiDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class WaitangiDayTest extends NewZealandBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -55,7 +57,7 @@ public function testHoliday($year, $expected) /** * Tests that Holiday is not present before 1974 - * @throws \ReflectionException + * @throws ReflectionException */ public function testNotHoliday() { @@ -64,7 +66,7 @@ public function testNotHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -94,7 +96,7 @@ public function testHolidayType(): void * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { diff --git a/tests/Norway/AscensionDayTest.php b/tests/Norway/AscensionDayTest.php index 4e0278c8e..05aed7bba 100644 --- a/tests/Norway/AscensionDayTest.php +++ b/tests/Norway/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends NorwayBaseTestCase implements YasumiTestCaseInter /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Norway/ChristmasDayTest.php b/tests/Norway/ChristmasDayTest.php index dd99f9f4c..dadde5114 100644 --- a/tests/Norway/ChristmasDayTest.php +++ b/tests/Norway/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Norway; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends NorwayBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Norway/ConstitutionDayTest.php b/tests/Norway/ConstitutionDayTest.php index cac5ce94b..91485c2a8 100644 --- a/tests/Norway/ConstitutionDayTest.php +++ b/tests/Norway/ConstitutionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class ConstitutionDayTest extends NorwayBaseTestCase implements YasumiTestCaseIn /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Norway/EasterMondayTest.php b/tests/Norway/EasterMondayTest.php index e7eb773eb..6e7521890 100644 --- a/tests/Norway/EasterMondayTest.php +++ b/tests/Norway/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends NorwayBaseTestCase implements YasumiTestCaseInter /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Norway/EasterTest.php b/tests/Norway/EasterTest.php index b18f84fc6..3595be3cd 100644 --- a/tests/Norway/EasterTest.php +++ b/tests/Norway/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterTest extends NorwayBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Norway/GoodFridayTest.php b/tests/Norway/GoodFridayTest.php index 361eee5b2..1ab969688 100644 --- a/tests/Norway/GoodFridayTest.php +++ b/tests/Norway/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends NorwayBaseTestCase implements YasumiTestCaseInterfa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Norway/InternationalWorkersDayTest.php b/tests/Norway/InternationalWorkersDayTest.php index 81dc2dab9..0f60f466f 100644 --- a/tests/Norway/InternationalWorkersDayTest.php +++ b/tests/Norway/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Norway; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends NorwayBaseTestCase implements YasumiTe * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testInternationalWorkersDay($year, $expected) { @@ -43,7 +45,7 @@ public function testInternationalWorkersDay($year, $expected) /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of International Workers' Day. * * @return array list of test dates for International Workers' Day - * @throws \Exception + * @throws Exception */ public function InternationalWorkersDayDataProvider(): array { diff --git a/tests/Norway/MaundyThursdayTest.php b/tests/Norway/MaundyThursdayTest.php index 5be075298..60d240b3e 100644 --- a/tests/Norway/MaundyThursdayTest.php +++ b/tests/Norway/MaundyThursdayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class MaundyThursdayTest extends NorwayBaseTestCase implements YasumiTestCaseInt /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Norway/NewYearsDayTest.php b/tests/Norway/NewYearsDayTest.php index 2c512c17c..ae245f685 100644 --- a/tests/Norway/NewYearsDayTest.php +++ b/tests/Norway/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Norway; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends NorwayBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Norway/NorwayTest.php b/tests/Norway/NorwayTest.php index d283b6dd6..7e92fe9f4 100644 --- a/tests/Norway/NorwayTest.php +++ b/tests/Norway/NorwayTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Norway; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class NorwayTest extends NorwayBaseTestCase /** * Tests if all official holidays in Norway are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -48,7 +49,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Norway are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -57,7 +58,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Norway are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -66,7 +67,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Norway are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -75,7 +76,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Norway are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Norway/PentecostMondayTest.php b/tests/Norway/PentecostMondayTest.php index c9f3c8ac9..cbf225773 100644 --- a/tests/Norway/PentecostMondayTest.php +++ b/tests/Norway/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends NorwayBaseTestCase implements YasumiTestCaseIn /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Norway/PentecostTest.php b/tests/Norway/PentecostTest.php index 997601173..f91e91b87 100644 --- a/tests/Norway/PentecostTest.php +++ b/tests/Norway/PentecostTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostTest extends NorwayBaseTestCase implements YasumiTestCaseInterfac /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Norway/SecondChristmasDayTest.php b/tests/Norway/SecondChristmasDayTest.php index 86b86bb02..d45a25ffd 100644 --- a/tests/Norway/SecondChristmasDayTest.php +++ b/tests/Norway/SecondChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Norway; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class SecondChristmasDayTest extends NorwayBaseTestCase implements YasumiTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Poland/AllSaintsDayTest.php b/tests/Poland/AllSaintsDayTest.php index 350686ce6..6e07c825b 100644 --- a/tests/Poland/AllSaintsDayTest.php +++ b/tests/Poland/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Poland; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends PolandBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Poland/AssumptionOfMaryTest.php b/tests/Poland/AssumptionOfMaryTest.php index 5cc33bd0b..555dcbb33 100644 --- a/tests/Poland/AssumptionOfMaryTest.php +++ b/tests/Poland/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Poland; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends PolandBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Poland/ChristmasTest.php b/tests/Poland/ChristmasTest.php index ad1535fd4..ec11fec6f 100644 --- a/tests/Poland/ChristmasTest.php +++ b/tests/Poland/ChristmasTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Poland; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasTest extends PolandBaseTestCase implements YasumiTestCaseInterfac * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Poland/ConstitutionDayTest.php b/tests/Poland/ConstitutionDayTest.php index 474e600f2..a74636fc8 100644 --- a/tests/Poland/ConstitutionDayTest.php +++ b/tests/Poland/ConstitutionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class ConstitutionDayTest extends PolandBaseTestCase implements YasumiTestCaseIn /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Poland/CorpusChristiTest.php b/tests/Poland/CorpusChristiTest.php index beed798e2..4fa1f061f 100644 --- a/tests/Poland/CorpusChristiTest.php +++ b/tests/Poland/CorpusChristiTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class CorpusChristiTest extends PolandBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of Corpus Christi. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Poland/EasterMondayTest.php b/tests/Poland/EasterMondayTest.php index 7f87744df..611de49d4 100644 --- a/tests/Poland/EasterMondayTest.php +++ b/tests/Poland/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends PolandBaseTestCase implements YasumiTestCaseInter /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Poland/EasterTest.php b/tests/Poland/EasterTest.php index 1187399d7..1e7df2565 100644 --- a/tests/Poland/EasterTest.php +++ b/tests/Poland/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterTest extends PolandBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Poland/EpiphanyTest.php b/tests/Poland/EpiphanyTest.php index b8a1d3174..6a724f173 100644 --- a/tests/Poland/EpiphanyTest.php +++ b/tests/Poland/EpiphanyTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Poland; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class EpiphanyTest extends PolandBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which Epiphany needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testEpiphany($year, $expected) { @@ -45,7 +47,7 @@ public function testEpiphany($year, $expected) * Returns a list of random test dates used for assertion of Epiphany. * * @return array list of test dates for Epiphany - * @throws \Exception + * @throws Exception */ public function EpiphanyDataProvider(): array { @@ -54,7 +56,7 @@ public function EpiphanyDataProvider(): array /** * Tests translated name of Epiphany. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Poland/IndependenceDayTest.php b/tests/Poland/IndependenceDayTest.php index 6c5bc2b42..fa825c51c 100644 --- a/tests/Poland/IndependenceDayTest.php +++ b/tests/Poland/IndependenceDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class IndependenceDayTest extends PolandBaseTestCase implements YasumiTestCaseIn /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Poland/InternationalWorkersDayTest.php b/tests/Poland/InternationalWorkersDayTest.php index d516c63a6..c5b7c47de 100644 --- a/tests/Poland/InternationalWorkersDayTest.php +++ b/tests/Poland/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Poland; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends PolandBaseTestCase implements YasumiTe * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testInternationalWorkersDay($year, $expected) { @@ -43,7 +45,7 @@ public function testInternationalWorkersDay($year, $expected) /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of International Workers' Day. * * @return array list of test dates for International Workers' Day - * @throws \Exception + * @throws Exception */ public function InternationalWorkersDayDataProvider(): array { diff --git a/tests/Poland/NewYearsDayTest.php b/tests/Poland/NewYearsDayTest.php index 7f3d00431..68a3df316 100644 --- a/tests/Poland/NewYearsDayTest.php +++ b/tests/Poland/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Poland; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends PolandBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Poland/PentecostTest.php b/tests/Poland/PentecostTest.php index af5081ac3..a3eb8ea6a 100644 --- a/tests/Poland/PentecostTest.php +++ b/tests/Poland/PentecostTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostTest extends PolandBaseTestCase implements YasumiTestCaseInterfac /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Poland/PolandTest.php b/tests/Poland/PolandTest.php index 33fc6b9fd..e482a273e 100644 --- a/tests/Poland/PolandTest.php +++ b/tests/Poland/PolandTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Poland; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class PolandTest extends PolandBaseTestCase /** * Tests if all official holidays in Poland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -49,7 +50,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Poland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -58,7 +59,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Poland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -67,7 +68,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Poland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -76,7 +77,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Poland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Poland/SecondChristmasDayTest.php b/tests/Poland/SecondChristmasDayTest.php index c8ceb583a..7e1b85824 100644 --- a/tests/Poland/SecondChristmasDayTest.php +++ b/tests/Poland/SecondChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Poland; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class SecondChristmasDayTest extends PolandBaseTestCase implements YasumiTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Portugal/AllSaintsDayTest.php b/tests/Portugal/AllSaintsDayTest.php index bb3cf8312..6b80dba65 100644 --- a/tests/Portugal/AllSaintsDayTest.php +++ b/tests/Portugal/AllSaintsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -39,10 +41,10 @@ class AllSaintsDayTest extends PortugalBaseTestCase implements YasumiTestCaseInt /** * Tests the holiday defined in this test. - * @throws \ReflectionException - * @throws \Exception - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday() { @@ -57,7 +59,7 @@ public function testHoliday() /** * Test that the holiday did not happen in 2013-2015. - * @throws \ReflectionException + * @throws ReflectionException */ public function testNotHoliday() { @@ -67,7 +69,7 @@ public function testNotHoliday() /** * Tests translated name of Corpus Christi. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -83,7 +85,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Portugal/AssumptionOfMaryTest.php b/tests/Portugal/AssumptionOfMaryTest.php index 8a6d3714c..56df42605 100644 --- a/tests/Portugal/AssumptionOfMaryTest.php +++ b/tests/Portugal/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Portugal; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends PortugalBaseTestCase implements YasumiTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Portugal/CarnationRevolutionDayTest.php b/tests/Portugal/CarnationRevolutionDayTest.php index 6c39b0790..4a4368b75 100644 --- a/tests/Portugal/CarnationRevolutionDayTest.php +++ b/tests/Portugal/CarnationRevolutionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class CarnationRevolutionDayTest extends PortugalBaseTestCase implements YasumiT /** * Test that the holiday is valid after the year of establishment - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayAfterEstablishment() { @@ -46,7 +48,7 @@ public function testHolidayAfterEstablishment() /** * Tests that the holiday is not a holiday before the year of establishment - * @throws \ReflectionException + * @throws ReflectionException */ public function testNotHolidayBeforeEstablishment() { @@ -56,7 +58,7 @@ public function testNotHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +68,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Portugal/ChristmasTest.php b/tests/Portugal/ChristmasTest.php index ff67b8335..ff9705b7d 100644 --- a/tests/Portugal/ChristmasTest.php +++ b/tests/Portugal/ChristmasTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Portugal; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasTest extends PortugalBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Portugal/CorpusChristiTest.php b/tests/Portugal/CorpusChristiTest.php index 44927db7a..62d745ffc 100644 --- a/tests/Portugal/CorpusChristiTest.php +++ b/tests/Portugal/CorpusChristiTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -39,8 +41,8 @@ class CorpusChristiTest extends PortugalBaseTestCase implements YasumiTestCaseIn /** * Tests the holiday defined in this test. - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday() { @@ -51,7 +53,7 @@ public function testHoliday() /** * Test that the holiday did not happen in 2013-2015. - * @throws \ReflectionException + * @throws ReflectionException */ public function testNotHoliday() { @@ -61,7 +63,7 @@ public function testNotHoliday() /** * Tests translated name of Corpus Christi. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -72,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Portugal/EasterTest.php b/tests/Portugal/EasterTest.php index d99945082..1f6a8aad9 100644 --- a/tests/Portugal/EasterTest.php +++ b/tests/Portugal/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterTest extends PortugalBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Portugal/GoodFridayTest.php b/tests/Portugal/GoodFridayTest.php index c1c9d67b4..23cccd014 100644 --- a/tests/Portugal/GoodFridayTest.php +++ b/tests/Portugal/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends PortugalBaseTestCase implements YasumiTestCaseInter /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Portugal/ImmaculateConceptionTest.php b/tests/Portugal/ImmaculateConceptionTest.php index 9de0ac849..d64a83cf9 100644 --- a/tests/Portugal/ImmaculateConceptionTest.php +++ b/tests/Portugal/ImmaculateConceptionTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Portugal; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ImmaculateConceptionTest extends PortugalBaseTestCase implements YasumiTes * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Portugal/InternationalWorkersDayTest.php b/tests/Portugal/InternationalWorkersDayTest.php index 8df569ac2..428cc8824 100644 --- a/tests/Portugal/InternationalWorkersDayTest.php +++ b/tests/Portugal/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Portugal; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends PortugalBaseTestCase implements Yasumi * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testInternationalWorkersDay($year, $expected) { @@ -43,7 +45,7 @@ public function testInternationalWorkersDay($year, $expected) /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of International Workers' Day. * * @return array list of test dates for International Workers' Day - * @throws \Exception + * @throws Exception */ public function InternationalWorkersDayDataProvider(): array { diff --git a/tests/Portugal/NewYearsDayTest.php b/tests/Portugal/NewYearsDayTest.php index 96fa861f9..38e9c208d 100644 --- a/tests/Portugal/NewYearsDayTest.php +++ b/tests/Portugal/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Portugal; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends PortugalBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Portugal/PortugalDayTest.php b/tests/Portugal/PortugalDayTest.php index fe0b6c9ea..22e325e18 100644 --- a/tests/Portugal/PortugalDayTest.php +++ b/tests/Portugal/PortugalDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Portugal; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class PortugalDayTest extends PortugalBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test before it was abolished. - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception * @see Portugal::calculatePortugalDay() */ public function testHolidayBeforeAbolishment() @@ -53,8 +55,8 @@ public function testHolidayBeforeAbolishment() /** * Tests the holiday defined in this test after it was restored - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception * @see Portugal::calculatePortugalDay() */ public function testHolidayAfterRestoration() @@ -66,7 +68,7 @@ public function testHolidayAfterRestoration() /** * Tests that the holiday defined in this test does not exist during the period that it was abolished - * @throws \ReflectionException + * @throws ReflectionException * @see Portugal::calculatePortugalDay() * */ @@ -82,7 +84,7 @@ public function testNotHolidayDuringAbolishment() /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -96,7 +98,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Portugal/PortugalTest.php b/tests/Portugal/PortugalTest.php index 449180c9e..a28b982b8 100644 --- a/tests/Portugal/PortugalTest.php +++ b/tests/Portugal/PortugalTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Portugal; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class PortugalTest extends PortugalBaseTestCase /** * Tests if all official holidays in Portugal are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -48,7 +49,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Portugal are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -57,7 +58,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Portugal are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -66,7 +67,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Portugal are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -75,7 +76,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in PortugalPortugal are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index 26aa38eaf..988c21a68 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -44,10 +46,10 @@ class PortugueseRepublicDayTest extends PortugalBaseTestCase implements YasumiTe /** * Test that the holiday if in effect in 2016 and later dates. - * @throws \ReflectionException - * @throws \Exception - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayOnAfterRestoration() { @@ -64,7 +66,7 @@ public function testHolidayOnAfterRestoration() /** * Test that the holiday did not happen in 2013-2015. - * @throws \ReflectionException + * @throws ReflectionException */ public function testNotHolidayDuringAbolishment() { @@ -74,10 +76,10 @@ public function testNotHolidayDuringAbolishment() /** * Tests the holiday defined in this test on or after establishment. - * @throws \ReflectionException - * @throws \Exception - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayOnAfterEstablishment() { @@ -94,7 +96,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -107,7 +109,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -121,7 +123,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Portugal/RestorationOfIndependenceTest.php b/tests/Portugal/RestorationOfIndependenceTest.php index 62c1e53de..5c6cc84bf 100644 --- a/tests/Portugal/RestorationOfIndependenceTest.php +++ b/tests/Portugal/RestorationOfIndependenceTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -44,10 +46,10 @@ class RestorationOfIndependenceTest extends PortugalBaseTestCase implements Yasu /** * Tests the holiday defined in this test on or after establishment. - * @throws \ReflectionException - * @throws \Exception - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayOnAfterEstablishment() { @@ -63,10 +65,10 @@ public function testHolidayOnAfterEstablishment() /** * Test that the holiday if in effect in 2016 and later dates. - * @throws \ReflectionException - * @throws \Exception - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayOnAfterRestoration() { @@ -83,7 +85,7 @@ public function testHolidayOnAfterRestoration() /** * Test that the holiday did not happen in 2013-2015. - * @throws \ReflectionException + * @throws ReflectionException */ public function testNotHolidayDuringAbolishment() { @@ -94,7 +96,7 @@ public function testNotHolidayDuringAbolishment() /** * Tests the holiday defined in this test before establishment. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -108,7 +110,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -132,7 +134,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Romania/AssumptionOfMaryTest.php b/tests/Romania/AssumptionOfMaryTest.php index 51e38dad5..0c6dcbc68 100644 --- a/tests/Romania/AssumptionOfMaryTest.php +++ b/tests/Romania/AssumptionOfMaryTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class AssumptionOfMaryTest extends RomaniaBaseTestCase implements YasumiTestCase /** * Tests Assumption Of Mary Day on or after 2008. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAssumptionOfMaryDayOnAfter2008() { @@ -50,7 +52,7 @@ public function testAssumptionOfMaryDayOnAfter2008() /** * Tests Assumption of Mary Day before 2008. - * @throws \ReflectionException + * @throws ReflectionException */ public function testAssumptionOfMaryDayBefore2008() { @@ -63,7 +65,7 @@ public function testAssumptionOfMaryDayBefore2008() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Romania/ChildrensDayTest.php b/tests/Romania/ChildrensDayTest.php index 1bcbf41b1..c1ba428c4 100644 --- a/tests/Romania/ChildrensDayTest.php +++ b/tests/Romania/ChildrensDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class ChildrensDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInte /** * Tests Children's Day on or after 1950. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testChildrensDayOnAfter1950() { @@ -50,7 +52,7 @@ public function testChildrensDayOnAfter1950() /** * Tests Children's Day before 1950. - * @throws \ReflectionException + * @throws ReflectionException */ public function testChildrensDayBefore1950() { @@ -63,7 +65,7 @@ public function testChildrensDayBefore1950() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Romania/ChristmasDayTest.php b/tests/Romania/ChristmasDayTest.php index 1cdadde34..6a9193841 100644 --- a/tests/Romania/ChristmasDayTest.php +++ b/tests/Romania/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Romania; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Romania/ConstantinBrancusiDayTest.php b/tests/Romania/ConstantinBrancusiDayTest.php index e176f2390..1b8853047 100644 --- a/tests/Romania/ConstantinBrancusiDayTest.php +++ b/tests/Romania/ConstantinBrancusiDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class ConstantinBrancusiDayTest extends RomaniaBaseTestCase implements YasumiTes /** * Tests Constantin Brancusi Day on or after 2016. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testConstantinBrancusiDayOnAfter2016() { @@ -50,7 +52,7 @@ public function testConstantinBrancusiDayOnAfter2016() /** * Tests Constantin Brancusi Day before 2016. - * @throws \ReflectionException + * @throws ReflectionException */ public function testConstantinBrancusiDayBefore2016() { @@ -63,7 +65,7 @@ public function testConstantinBrancusiDayBefore2016() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Romania/DayAfterNewYearsDayTest.php b/tests/Romania/DayAfterNewYearsDayTest.php index cc4388bcc..e4f2b6f06 100644 --- a/tests/Romania/DayAfterNewYearsDayTest.php +++ b/tests/Romania/DayAfterNewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Romania; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class DayAfterNewYearsDayTest extends RomaniaBaseTestCase implements YasumiTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Romania/EasterMondayTest.php b/tests/Romania/EasterMondayTest.php index 1e5585084..013f6099d 100755 --- a/tests/Romania/EasterMondayTest.php +++ b/tests/Romania/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class EasterMondayTest extends RomaniaBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -46,7 +48,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -60,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Romania/EasterTest.php b/tests/Romania/EasterTest.php index c79d6ba35..eeb233d0c 100755 --- a/tests/Romania/EasterTest.php +++ b/tests/Romania/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class EasterTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -46,7 +48,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -60,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Romania/InternationalWorkersDayTest.php b/tests/Romania/InternationalWorkersDayTest.php index fe6b4a2d0..2be68657d 100755 --- a/tests/Romania/InternationalWorkersDayTest.php +++ b/tests/Romania/InternationalWorkersDayTest.php @@ -12,6 +12,9 @@ namespace Yasumi\tests\Romania; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,9 +35,9 @@ class InternationalWorkersDayTest extends RomaniaBaseTestCase implements YasumiT * @dataProvider InternationalWorkersDayDataProvider * * @param int $year the year for which International Workers' Day needs to be tested - * @param \DateTime $expected the expected date + * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testInternationalWorkersDay($year, $expected) { @@ -43,7 +46,7 @@ public function testInternationalWorkersDay($year, $expected) /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +71,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of International Workers' Day. * * @return array list of test dates for International Workers' Day - * @throws \Exception + * @throws Exception */ public function InternationalWorkersDayDataProvider(): array { diff --git a/tests/Romania/NationalDayTest.php b/tests/Romania/NationalDayTest.php index b078e2c97..7a9e045b7 100644 --- a/tests/Romania/NationalDayTest.php +++ b/tests/Romania/NationalDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class NationalDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInter /** * Tests National Day on or after 1990. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testNationalDayOnAfter1990() { @@ -50,8 +52,8 @@ public function testNationalDayOnAfter1990() /** * Tests National Day between 1948 - 1989. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testNationalDayBetween1948_1989() { @@ -66,8 +68,8 @@ public function testNationalDayBetween1948_1989() /** * Tests National Day between 1866 - 1947. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testNationalDayBetween1866_1947() { @@ -82,7 +84,7 @@ public function testNationalDayBetween1866_1947() /** * Tests National Day before 1865. - * @throws \ReflectionException + * @throws ReflectionException */ public function testNationalDayBefore1865() { @@ -95,7 +97,7 @@ public function testNationalDayBefore1865() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -109,7 +111,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Romania/NewYearsDayTest.php b/tests/Romania/NewYearsDayTest.php index a454ddea6..7dab74787 100644 --- a/tests/Romania/NewYearsDayTest.php +++ b/tests/Romania/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Romania; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Romania/PentecostMondayTest.php b/tests/Romania/PentecostMondayTest.php index d357c06d6..99dbe67f6 100644 --- a/tests/Romania/PentecostMondayTest.php +++ b/tests/Romania/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class PentecostMondayTest extends RomaniaBaseTestCase implements YasumiTestCaseI /** * Tests the Pentecost Monday Day on and after 2008. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMondayOnAfter2008() { @@ -51,7 +53,7 @@ public function testPentecostMondayOnAfter2008() /** * Tests the Pentecost Day before 2008. - * @throws \ReflectionException + * @throws ReflectionException */ public function testPentecostMondayBefore2008() { @@ -64,7 +66,7 @@ public function testPentecostMondayBefore2008() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Romania/PentecostTest.php b/tests/Romania/PentecostTest.php index 41164c5b2..fcc87799f 100644 --- a/tests/Romania/PentecostTest.php +++ b/tests/Romania/PentecostTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class PentecostTest extends RomaniaBaseTestCase implements YasumiTestCaseInterfa /** * Tests the Pentecost Day on and after 2008. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostDayOnAfter2008() { @@ -51,7 +53,7 @@ public function testPentecostDayOnAfter2008() /** * Tests the Pentecost Day before 2008. - * @throws \ReflectionException + * @throws ReflectionException */ public function testPentecostDayBefore2008() { @@ -64,7 +66,7 @@ public function testPentecostDayBefore2008() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Romania/RomaniaTest.php b/tests/Romania/RomaniaTest.php index c2b71afcd..8a190afb2 100755 --- a/tests/Romania/RomaniaTest.php +++ b/tests/Romania/RomaniaTest.php @@ -13,6 +13,7 @@ namespace Yasumi\tests\Romania; +use ReflectionException; use Yasumi\Holiday; /** @@ -28,7 +29,7 @@ class RomaniaTest extends RomaniaBaseTestCase /** * Tests if all official holidays in Romania are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -57,7 +58,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Romania are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -76,7 +77,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Romania are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -85,7 +86,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Romania are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -94,7 +95,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Romania are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Romania/SecondChristmasDayTest.php b/tests/Romania/SecondChristmasDayTest.php index 5a467aec2..434b48ebc 100644 --- a/tests/Romania/SecondChristmasDayTest.php +++ b/tests/Romania/SecondChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Romania; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class SecondChristmasDayTest extends RomaniaBaseTestCase implements YasumiTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Romania/StAndrewDayTest.php b/tests/Romania/StAndrewDayTest.php index e07e650e6..fb36c6cb3 100644 --- a/tests/Romania/StAndrewDayTest.php +++ b/tests/Romania/StAndrewDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class StAndrewDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInter /** * Tests Saint Andrew Day on or after 2012. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testStAndrewDayOnAfter2012() { @@ -50,7 +52,7 @@ public function testStAndrewDayOnAfter2012() /** * Tests Saint Andrew before 2012. - * @throws \ReflectionException + * @throws ReflectionException */ public function testStAndrewDayBefore2012() { @@ -63,7 +65,7 @@ public function testStAndrewDayBefore2012() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Romania/UnitedPrincipalitiesDayTest.php b/tests/Romania/UnitedPrincipalitiesDayTest.php index efcf8d273..108701b8b 100644 --- a/tests/Romania/UnitedPrincipalitiesDayTest.php +++ b/tests/Romania/UnitedPrincipalitiesDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class UnitedPrincipalitiesDayTest extends RomaniaBaseTestCase implements YasumiT /** * Tests united Principalities Day on or after 2015. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testUnitedPrincipalitiesDayOnAfter2015() { @@ -50,7 +52,7 @@ public function testUnitedPrincipalitiesDayOnAfter2015() /** * Tests unitedPrincipalitiesDay before 2015. - * @throws \ReflectionException + * @throws ReflectionException */ public function testUnitedPrincipalitiesDayBefore2015() { @@ -63,7 +65,7 @@ public function testUnitedPrincipalitiesDayBefore2015() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Russia/DefenceOfTheFatherlandDayTest.php b/tests/Russia/DefenceOfTheFatherlandDayTest.php index f39bc455a..081e61334 100644 --- a/tests/Russia/DefenceOfTheFatherlandDayTest.php +++ b/tests/Russia/DefenceOfTheFatherlandDayTest.php @@ -12,6 +12,10 @@ namespace Yasumi\tests\Russia; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Russia; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +34,7 @@ class DefenceOfTheFatherlandDayTest extends RussiaBaseTestCase implements Yasumi /** * Test if holiday is not defined before - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBefore() { @@ -43,8 +47,8 @@ public function testHolidayBefore() /** * Test if holiday is defined after - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayAfter() { @@ -54,14 +58,14 @@ public function testHolidayAfter() self::REGION, self::HOLIDAY, $year, - new \DateTime("{$year}-02-23", new \DateTimeZone(self::TIMEZONE)) + new DateTime("{$year}-02-23", new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -81,7 +85,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Russia/InternationalWomensDayTest.php b/tests/Russia/InternationalWomensDayTest.php index e47609806..bffc0f623 100644 --- a/tests/Russia/InternationalWomensDayTest.php +++ b/tests/Russia/InternationalWomensDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Russia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class InternationalWomensDayTest extends RussiaBaseTestCase implements YasumiTes /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay2Test.php b/tests/Russia/NewYearHolidaysDay2Test.php index b1f19b345..e2eabe8c8 100644 --- a/tests/Russia/NewYearHolidaysDay2Test.php +++ b/tests/Russia/NewYearHolidaysDay2Test.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Russia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class NewYearHolidaysDay2Test extends RussiaBaseTestCase implements YasumiTestCa /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay3Test.php b/tests/Russia/NewYearHolidaysDay3Test.php index de37ea286..050de5d29 100644 --- a/tests/Russia/NewYearHolidaysDay3Test.php +++ b/tests/Russia/NewYearHolidaysDay3Test.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Russia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class NewYearHolidaysDay3Test extends RussiaBaseTestCase implements YasumiTestCa /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay4Test.php b/tests/Russia/NewYearHolidaysDay4Test.php index 84a51cb95..9bc976a4b 100644 --- a/tests/Russia/NewYearHolidaysDay4Test.php +++ b/tests/Russia/NewYearHolidaysDay4Test.php @@ -12,6 +12,9 @@ namespace Yasumi\tests\Russia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,7 +32,7 @@ class NewYearHolidaysDay4Test extends RussiaBaseTestCase implements YasumiTestCa /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -40,18 +43,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -65,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay5Test.php b/tests/Russia/NewYearHolidaysDay5Test.php index f85a6c442..4ed776272 100644 --- a/tests/Russia/NewYearHolidaysDay5Test.php +++ b/tests/Russia/NewYearHolidaysDay5Test.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Russia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class NewYearHolidaysDay5Test extends RussiaBaseTestCase implements YasumiTestCa /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay6Test.php b/tests/Russia/NewYearHolidaysDay6Test.php index 997adfb4e..996e62e69 100644 --- a/tests/Russia/NewYearHolidaysDay6Test.php +++ b/tests/Russia/NewYearHolidaysDay6Test.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Russia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class NewYearHolidaysDay6Test extends RussiaBaseTestCase implements YasumiTestCa /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearHolidaysDay8Test.php b/tests/Russia/NewYearHolidaysDay8Test.php index a81ee7f6f..acc320f8a 100644 --- a/tests/Russia/NewYearHolidaysDay8Test.php +++ b/tests/Russia/NewYearHolidaysDay8Test.php @@ -12,6 +12,9 @@ namespace Yasumi\tests\Russia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,7 +32,7 @@ class NewYearHolidaysDay8Test extends RussiaBaseTestCase implements YasumiTestCa /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -40,18 +43,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -65,7 +68,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Russia/NewYearsDayTest.php b/tests/Russia/NewYearsDayTest.php index d3b71fd1e..db1b9e7f4 100644 --- a/tests/Russia/NewYearsDayTest.php +++ b/tests/Russia/NewYearsDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Russia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class NewYearsDayTest extends RussiaBaseTestCase implements YasumiTestCaseInterf /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Russia/OrthodoxChristmasDayTest.php b/tests/Russia/OrthodoxChristmasDayTest.php index 59a9b441b..0bcf478e7 100644 --- a/tests/Russia/OrthodoxChristmasDayTest.php +++ b/tests/Russia/OrthodoxChristmasDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Russia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class OrthodoxChristmasDayTest extends RussiaBaseTestCase implements YasumiTestC /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Russia/RussiaDayTest.php b/tests/Russia/RussiaDayTest.php index a6d37ed91..4672435d5 100644 --- a/tests/Russia/RussiaDayTest.php +++ b/tests/Russia/RussiaDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Russia; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Russia; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,7 +35,7 @@ class RussiaDayTest extends RussiaBaseTestCase implements YasumiTestCaseInterfac /** * Test if holiday is not defined before - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBefore() { @@ -44,8 +48,8 @@ public function testHolidayBefore() /** * Test if holiday is defined after - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayAfter() { @@ -55,14 +59,14 @@ public function testHolidayAfter() self::REGION, self::HOLIDAY, $year, - new \DateTime("{$year}-06-12", new \DateTimeZone(self::TIMEZONE)) + new DateTime("{$year}-06-12", new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -82,7 +86,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Russia/RussiaTest.php b/tests/Russia/RussiaTest.php index 3ad00eed8..3241d59d0 100644 --- a/tests/Russia/RussiaTest.php +++ b/tests/Russia/RussiaTest.php @@ -13,6 +13,7 @@ namespace Yasumi\tests\Russia; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Russia; @@ -25,7 +26,7 @@ class RussiaTest extends RussiaBaseTestCase { /** * Tests if all official holidays in Russia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -62,7 +63,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Russia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -71,7 +72,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Russia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -80,7 +81,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Russia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,7 +90,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Russia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Russia/SpringAndLabourDayTest.php b/tests/Russia/SpringAndLabourDayTest.php index 379599d28..6513894a3 100644 --- a/tests/Russia/SpringAndLabourDayTest.php +++ b/tests/Russia/SpringAndLabourDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Russia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class SpringAndLabourDayTest extends RussiaBaseTestCase implements YasumiTestCas /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Russia/UnityDayTest.php b/tests/Russia/UnityDayTest.php index fddd335bc..0089e3273 100644 --- a/tests/Russia/UnityDayTest.php +++ b/tests/Russia/UnityDayTest.php @@ -13,6 +13,10 @@ namespace Yasumi\tests\Russia; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\Russia; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,7 +35,7 @@ class UnityDayTest extends RussiaBaseTestCase implements YasumiTestCaseInterface /** * Test if holiday is not defined before - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBefore() { @@ -44,8 +48,8 @@ public function testHolidayBefore() /** * Test if holiday is defined after - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayAfter() { @@ -55,14 +59,14 @@ public function testHolidayAfter() self::REGION, self::HOLIDAY, $year, - new \DateTime("{$year}-11-04", new \DateTimeZone(self::TIMEZONE)) + new DateTime("{$year}-11-04", new DateTimeZone(self::TIMEZONE)) ); } /** * {@inheritdoc} * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -82,7 +86,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Russia/VictoryDayTest.php b/tests/Russia/VictoryDayTest.php index f37b4f51c..d512d6f06 100644 --- a/tests/Russia/VictoryDayTest.php +++ b/tests/Russia/VictoryDayTest.php @@ -13,6 +13,9 @@ namespace Yasumi\tests\Russia; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,7 +33,7 @@ class VictoryDayTest extends RussiaBaseTestCase implements YasumiTestCaseInterfa /** * @return array - * @throws \Exception + * @throws Exception */ public function holidayDataProvider(): array { @@ -41,18 +44,18 @@ public function holidayDataProvider(): array * @dataProvider holidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ - public function testHoliday($year, \DateTime $expected) + public function testHoliday($year, DateTime $expected) { $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $expected); } /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * {@inheritdoc} - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Slovakia/AllSaintsDayTest.php b/tests/Slovakia/AllSaintsDayTest.php index ae43c7bf3..b102ba9b1 100644 --- a/tests/Slovakia/AllSaintsDayTest.php +++ b/tests/Slovakia/AllSaintsDayTest.php @@ -15,6 +15,8 @@ namespace Yasumi\tests\Slovakia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -41,7 +43,7 @@ class AllSaintsDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -63,7 +65,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Slovakia/ChristmasDayTest.php b/tests/Slovakia/ChristmasDayTest.php index 6d12a2940..f074a5d14 100644 --- a/tests/Slovakia/ChristmasDayTest.php +++ b/tests/Slovakia/ChristmasDayTest.php @@ -15,6 +15,8 @@ namespace Yasumi\tests\Slovakia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -41,7 +43,7 @@ class ChristmasDayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -53,7 +55,7 @@ public function testChristmasDay($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -63,7 +65,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Slovakia/ChristmasEveTest.php b/tests/Slovakia/ChristmasEveTest.php index d076f842f..ba24dd0b5 100644 --- a/tests/Slovakia/ChristmasEveTest.php +++ b/tests/Slovakia/ChristmasEveTest.php @@ -15,6 +15,8 @@ namespace Yasumi\tests\Slovakia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -41,7 +43,7 @@ class ChristmasEveTest extends SlovakiaBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasEve($year, $expected) { @@ -53,7 +55,7 @@ public function testChristmasEve($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -63,7 +65,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Eve. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Slovakia/EasterMondayTest.php b/tests/Slovakia/EasterMondayTest.php index e6b036874..06978660d 100644 --- a/tests/Slovakia/EasterMondayTest.php +++ b/tests/Slovakia/EasterMondayTest.php @@ -16,6 +16,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -42,7 +44,7 @@ class EasterMondayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -54,7 +56,7 @@ public function testHoliday($year, $expected) * Returns a list of 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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -75,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -90,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Slovakia/EpiphanyTest.php b/tests/Slovakia/EpiphanyTest.php index 0c5991e50..2ef59f29b 100644 --- a/tests/Slovakia/EpiphanyTest.php +++ b/tests/Slovakia/EpiphanyTest.php @@ -15,6 +15,8 @@ namespace Yasumi\tests\Slovakia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -41,7 +43,7 @@ class EpiphanyTest extends SlovakiaBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -63,7 +65,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Slovakia/GoodFridayTest.php b/tests/Slovakia/GoodFridayTest.php index 33ea3a01c..4aead4984 100644 --- a/tests/Slovakia/GoodFridayTest.php +++ b/tests/Slovakia/GoodFridayTest.php @@ -16,6 +16,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -42,7 +44,7 @@ class GoodFridayTest extends SlovakiaBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -54,7 +56,7 @@ public function testHoliday($year, $expected) * Returns a list of 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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -75,7 +77,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -90,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Slovakia/InternationalWorkersDayTest.php b/tests/Slovakia/InternationalWorkersDayTest.php index 71850522a..e72e4fc30 100644 --- a/tests/Slovakia/InternationalWorkersDayTest.php +++ b/tests/Slovakia/InternationalWorkersDayTest.php @@ -15,6 +15,8 @@ namespace Yasumi\tests\Slovakia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -41,7 +43,7 @@ class InternationalWorkersDayTest extends SlovakiaBaseTestCase implements Yasumi * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -63,7 +65,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Slovakia/OurLadyOfSorrowsDayTest.php b/tests/Slovakia/OurLadyOfSorrowsDayTest.php index 957a68c51..3e6d6d002 100644 --- a/tests/Slovakia/OurLadyOfSorrowsDayTest.php +++ b/tests/Slovakia/OurLadyOfSorrowsDayTest.php @@ -15,6 +15,8 @@ namespace Yasumi\tests\Slovakia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -41,7 +43,7 @@ class OurLadyOfSorrowsDayTest extends SlovakiaBaseTestCase implements YasumiTest * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -63,7 +65,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php index ee1b738ec..17c33e4b9 100644 --- a/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php +++ b/tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php @@ -15,6 +15,8 @@ namespace Yasumi\tests\Slovakia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -41,7 +43,7 @@ class SaintsCyrilAndMethodiusDayTest extends SlovakiaBaseTestCase implements Yas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -63,7 +65,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SecondChristmasDayTest.php b/tests/Slovakia/SecondChristmasDayTest.php index c39085bca..277b7c1c3 100644 --- a/tests/Slovakia/SecondChristmasDayTest.php +++ b/tests/Slovakia/SecondChristmasDayTest.php @@ -15,6 +15,8 @@ namespace Yasumi\tests\Slovakia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -41,7 +43,7 @@ class SecondChristmasDayTest extends SlovakiaBaseTestCase implements YasumiTestC * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -63,7 +65,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Second Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SlovakConstitutionDayTest.php b/tests/Slovakia/SlovakConstitutionDayTest.php index bb3114199..2d66f881e 100644 --- a/tests/Slovakia/SlovakConstitutionDayTest.php +++ b/tests/Slovakia/SlovakConstitutionDayTest.php @@ -15,6 +15,8 @@ namespace Yasumi\tests\Slovakia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,7 +42,7 @@ class SlovakConstitutionDayTest extends SlovakiaBaseTestCase implements YasumiTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -52,7 +54,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -62,7 +64,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SlovakIndependeceDayTest.php b/tests/Slovakia/SlovakIndependeceDayTest.php index 9baefbf6c..d864ba56d 100644 --- a/tests/Slovakia/SlovakIndependeceDayTest.php +++ b/tests/Slovakia/SlovakIndependeceDayTest.php @@ -15,6 +15,8 @@ namespace Yasumi\tests\Slovakia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -42,7 +44,7 @@ class SlovakIndependeceDayTest extends SlovakiaBaseTestCase implements YasumiTes * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -54,7 +56,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -64,7 +66,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -79,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SlovakNationalUprisingDayTest.php b/tests/Slovakia/SlovakNationalUprisingDayTest.php index d859f94b6..b7a53c8ff 100644 --- a/tests/Slovakia/SlovakNationalUprisingDayTest.php +++ b/tests/Slovakia/SlovakNationalUprisingDayTest.php @@ -15,6 +15,8 @@ namespace Yasumi\tests\Slovakia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -41,7 +43,7 @@ class SlovakNationalUprisingDayTest extends SlovakiaBaseTestCase implements Yasu * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -63,7 +65,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Slovakia/SlovakiaTest.php b/tests/Slovakia/SlovakiaTest.php index 2c79c6212..f6d164230 100644 --- a/tests/Slovakia/SlovakiaTest.php +++ b/tests/Slovakia/SlovakiaTest.php @@ -14,6 +14,7 @@ namespace Yasumi\tests\Slovakia; +use ReflectionException; use Yasumi\Holiday; /** @@ -33,7 +34,7 @@ class SlovakiaTest extends SlovakiaBaseTestCase /** * Tests if all official holidays in Slovakia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -49,7 +50,7 @@ public function testOfficialHolidays(): void /** * Tests if all bank holidays in Slovakia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -70,7 +71,7 @@ public function testBankHolidays(): void /** * Tests if all observed holidays in Slovakia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -80,7 +81,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Slovakia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -90,7 +91,7 @@ public function testSeasonalHolidays(): void /** * Tests if all other holidays in Slovakia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php index 97800a6fc..ccb23345f 100644 --- a/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php +++ b/tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php @@ -15,6 +15,8 @@ namespace Yasumi\tests\Slovakia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -41,7 +43,7 @@ class StruggleForFreedomAndDemocracyDayTest extends SlovakiaBaseTestCase impleme * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -63,7 +65,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Slovakia/VictoryInEuropeDayTest.php b/tests/Slovakia/VictoryInEuropeDayTest.php index 922a9c0a1..6f712dfa2 100644 --- a/tests/Slovakia/VictoryInEuropeDayTest.php +++ b/tests/Slovakia/VictoryInEuropeDayTest.php @@ -15,6 +15,8 @@ namespace Yasumi\tests\Slovakia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -41,7 +43,7 @@ class VictoryInEuropeDayTest extends SlovakiaBaseTestCase implements YasumiTestC * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -63,7 +65,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/ChristmasDayTest.php b/tests/SouthAfrica/ChristmasDayTest.php index 9d6be2d3f..7dd47621f 100644 --- a/tests/SouthAfrica/ChristmasDayTest.php +++ b/tests/SouthAfrica/ChristmasDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -45,8 +47,8 @@ class ChristmasDayTest extends SouthAfricaBaseTestCase implements YasumiTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -64,7 +66,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -81,7 +83,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -94,7 +96,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -108,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/FamilyDayTest.php b/tests/SouthAfrica/FamilyDayTest.php index 8bfaebb16..05c694de3 100644 --- a/tests/SouthAfrica/FamilyDayTest.php +++ b/tests/SouthAfrica/FamilyDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -45,8 +47,8 @@ class FamilyDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -62,7 +64,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -80,7 +82,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -93,7 +95,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -107,7 +109,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/FreedomDayTest.php b/tests/SouthAfrica/FreedomDayTest.php index 65be912dc..96ad5cc3f 100644 --- a/tests/SouthAfrica/FreedomDayTest.php +++ b/tests/SouthAfrica/FreedomDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -45,8 +47,8 @@ class FreedomDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -64,7 +66,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -81,7 +83,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -94,7 +96,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -108,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/GoodFridayTest.php b/tests/SouthAfrica/GoodFridayTest.php index 2d094c917..8841c1f77 100644 --- a/tests/SouthAfrica/GoodFridayTest.php +++ b/tests/SouthAfrica/GoodFridayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -45,8 +47,8 @@ class GoodFridayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -62,7 +64,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -80,7 +82,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -93,7 +95,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -107,7 +109,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/HeritageDayTest.php b/tests/SouthAfrica/HeritageDayTest.php index 46bf7060d..bfe3dcc33 100644 --- a/tests/SouthAfrica/HeritageDayTest.php +++ b/tests/SouthAfrica/HeritageDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -45,8 +47,8 @@ class HeritageDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -64,7 +66,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -81,7 +83,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -94,7 +96,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -108,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/HumanRightsDayTest.php b/tests/SouthAfrica/HumanRightsDayTest.php index e7e8f4d5c..30d1a0d88 100644 --- a/tests/SouthAfrica/HumanRightsDayTest.php +++ b/tests/SouthAfrica/HumanRightsDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -45,8 +47,8 @@ class HumanRightsDayTest extends SouthAfricaBaseTestCase implements YasumiTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -64,7 +66,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -81,7 +83,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -94,7 +96,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -108,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/MunicipalElections2016DayTest.php b/tests/SouthAfrica/MunicipalElections2016DayTest.php index 8276e9d3a..6e182c644 100644 --- a/tests/SouthAfrica/MunicipalElections2016DayTest.php +++ b/tests/SouthAfrica/MunicipalElections2016DayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -38,8 +40,8 @@ class MunicipalElections2016DayTest extends SouthAfricaBaseTestCase implements Y /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -53,7 +55,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -66,7 +68,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the holiday defined in this test after completion. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayDayAfterCompletion() { @@ -75,7 +77,7 @@ public function testHolidayDayAfterCompletion() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -89,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/NationalWomensDayTest.php b/tests/SouthAfrica/NationalWomensDayTest.php index 7fcd5e411..8e8a305c3 100644 --- a/tests/SouthAfrica/NationalWomensDayTest.php +++ b/tests/SouthAfrica/NationalWomensDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -45,8 +47,8 @@ class NationalWomensDayTest extends SouthAfricaBaseTestCase implements YasumiTes * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -64,7 +66,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -81,7 +83,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -94,7 +96,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -108,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/NewYearsDayTest.php b/tests/SouthAfrica/NewYearsDayTest.php index 9c467fbbd..ccf9bc329 100644 --- a/tests/SouthAfrica/NewYearsDayTest.php +++ b/tests/SouthAfrica/NewYearsDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -45,8 +47,8 @@ class NewYearsDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -64,7 +66,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -81,7 +83,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -94,7 +96,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -108,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/ReconciliationDayTest.php b/tests/SouthAfrica/ReconciliationDayTest.php index 063e1c32d..650d28104 100644 --- a/tests/SouthAfrica/ReconciliationDayTest.php +++ b/tests/SouthAfrica/ReconciliationDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -45,8 +47,8 @@ class ReconciliationDayTest extends SouthAfricaBaseTestCase implements YasumiTes * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -64,7 +66,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -81,7 +83,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -94,7 +96,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -108,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/SecondChristmasDayTest.php b/tests/SouthAfrica/SecondChristmasDayTest.php index 80e133b2c..f3872dce3 100644 --- a/tests/SouthAfrica/SecondChristmasDayTest.php +++ b/tests/SouthAfrica/SecondChristmasDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -45,8 +47,8 @@ class SecondChristmasDayTest extends SouthAfricaBaseTestCase implements YasumiTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -64,7 +66,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -81,7 +83,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -94,7 +96,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -108,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/SouthAfricaTest.php b/tests/SouthAfrica/SouthAfricaTest.php index bdbd7164c..ece801783 100644 --- a/tests/SouthAfrica/SouthAfricaTest.php +++ b/tests/SouthAfrica/SouthAfricaTest.php @@ -13,6 +13,7 @@ namespace Yasumi\tests\SouthAfrica; +use ReflectionException; use Yasumi\Holiday; /** @@ -30,7 +31,7 @@ class SouthAfricaTest extends SouthAfricaBaseTestCase /** * Tests if all official holidays in SouthAfrica are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -59,7 +60,7 @@ public function testOfficialHolidays(): void /** * Tests if all bank holidays in South Africa are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -68,7 +69,7 @@ public function testBankHolidays(): void /** * Tests if all observed holidays in South Africa are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -77,7 +78,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in South Africa are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -86,7 +87,7 @@ public function testSeasonalHolidays(): void /** * Tests if all other holidays in South Africa are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php b/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php index 4aa10f7e2..9622aa80a 100644 --- a/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php +++ b/tests/SouthAfrica/SubstituteDayOfGoodwillTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -38,8 +40,8 @@ class SubstituteDayOfGoodwillTest extends SouthAfricaBaseTestCase implements Yas /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -53,7 +55,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -66,7 +68,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the holiday defined in this test after completion. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayDayAfterCompletion() { @@ -75,7 +77,7 @@ public function testHolidayDayAfterCompletion() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -89,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/WorkersDayTest.php b/tests/SouthAfrica/WorkersDayTest.php index fed33a087..210bf70f8 100644 --- a/tests/SouthAfrica/WorkersDayTest.php +++ b/tests/SouthAfrica/WorkersDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -45,8 +47,8 @@ class WorkersDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -64,7 +66,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -81,7 +83,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -94,7 +96,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -108,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthAfrica/YouthDayTest.php b/tests/SouthAfrica/YouthDayTest.php index 8691179b1..9a459b852 100644 --- a/tests/SouthAfrica/YouthDayTest.php +++ b/tests/SouthAfrica/YouthDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -45,8 +47,8 @@ class YouthDayTest extends SouthAfricaBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -64,7 +66,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -81,7 +83,7 @@ public function HolidayDataProvider(): array /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -94,7 +96,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -108,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ArborDayTest.php b/tests/SouthKorea/ArborDayTest.php index b74bbe816..375a94a31 100644 --- a/tests/SouthKorea/ArborDayTest.php +++ b/tests/SouthKorea/ArborDayTest.php @@ -15,6 +15,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class ArborDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInter /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -64,7 +66,7 @@ public function testHoliday() /** * Tests the holiday defined in this test after removal. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayAfterRemoval() { @@ -77,7 +79,7 @@ public function testHolidayAfterRemoval() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -90,7 +92,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -107,7 +109,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ArmedForcesDayTest.php b/tests/SouthKorea/ArmedForcesDayTest.php index 4458b2cb5..39a4406ff 100644 --- a/tests/SouthKorea/ArmedForcesDayTest.php +++ b/tests/SouthKorea/ArmedForcesDayTest.php @@ -15,6 +15,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class ArmedForcesDayTest extends SouthKoreaBaseTestCase implements YasumiTestCas /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -56,7 +58,7 @@ public function testHoliday() /** * Tests the holiday defined in this test after removal. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayAfterRemoval() { @@ -69,7 +71,7 @@ public function testHolidayAfterRemoval() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -82,7 +84,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -96,7 +98,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/BuddhasBirthdayTest.php b/tests/SouthKorea/BuddhasBirthdayTest.php index 7571d44a1..2f6bc0ba3 100644 --- a/tests/SouthKorea/BuddhasBirthdayTest.php +++ b/tests/SouthKorea/BuddhasBirthdayTest.php @@ -15,6 +15,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\SouthKorea; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class BuddhasBirthdayTest extends SouthKoreaBaseTestCase implements YasumiTestCa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -54,7 +56,7 @@ public function testHoliday() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -67,7 +69,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -84,7 +86,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ChildrensDayTest.php b/tests/SouthKorea/ChildrensDayTest.php index 2388494bf..5f9e0cac3 100644 --- a/tests/SouthKorea/ChildrensDayTest.php +++ b/tests/SouthKorea/ChildrensDayTest.php @@ -15,6 +15,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class ChildrensDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseI /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testMainHoliday() { @@ -51,8 +53,8 @@ public function testMainHoliday() /** * Tests the substitute holiday defined in this test (conflict with Buddha's Birthday). - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testSubstituteHolidayByBuddhasBirthday() { @@ -68,8 +70,8 @@ public function testSubstituteHolidayByBuddhasBirthday() /** * Tests the substitute holiday defined in this test (conflict with Saturday). - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testSubstituteHolidayBySaturday() { @@ -84,8 +86,8 @@ public function testSubstituteHolidayBySaturday() /** * Tests the substitute holiday defined in this test (conflict with Sunday). - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testSubstituteHolidayBySunday() { @@ -100,7 +102,7 @@ public function testSubstituteHolidayBySunday() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -113,7 +115,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -127,7 +129,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ChristmasDayTest.php b/tests/SouthKorea/ChristmasDayTest.php index 526630edc..2e7b103f3 100644 --- a/tests/SouthKorea/ChristmasDayTest.php +++ b/tests/SouthKorea/ChristmasDayTest.php @@ -15,6 +15,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class ChristmasDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseI /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -51,7 +53,7 @@ public function testHoliday() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -64,7 +66,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ChuseokTest.php b/tests/SouthKorea/ChuseokTest.php index 4000434c6..57934dfa6 100644 --- a/tests/SouthKorea/ChuseokTest.php +++ b/tests/SouthKorea/ChuseokTest.php @@ -16,6 +16,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\SouthKorea; use Yasumi\tests\YasumiTestCaseInterface; @@ -37,8 +39,8 @@ class ChuseokTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -73,8 +75,8 @@ public function testHoliday() /** * Tests the substitute holiday defined in this test (conflict with Gaecheonjeol). - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testSubstituteHolidayByGaecheonjeol() { @@ -100,8 +102,8 @@ public function testSubstituteHolidayByGaecheonjeol() /** * Tests the substitute holiday defined in this test (conflict with Sunday). - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testSubstituteHolidayBySunday() { @@ -128,7 +130,7 @@ public function testSubstituteHolidayBySunday() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -141,7 +143,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -174,7 +176,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/ConstitutionDayTest.php b/tests/SouthKorea/ConstitutionDayTest.php index 339252313..1b1d7e647 100644 --- a/tests/SouthKorea/ConstitutionDayTest.php +++ b/tests/SouthKorea/ConstitutionDayTest.php @@ -15,6 +15,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class ConstitutionDayTest extends SouthKoreaBaseTestCase implements YasumiTestCa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -56,7 +58,7 @@ public function testHoliday() /** * Tests the holiday defined in this test after removal. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayAfterRemoval() { @@ -69,7 +71,7 @@ public function testHolidayAfterRemoval() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -82,7 +84,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -96,7 +98,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/GaecheonjeolTest.php b/tests/SouthKorea/GaecheonjeolTest.php index 728cface9..4070251e8 100644 --- a/tests/SouthKorea/GaecheonjeolTest.php +++ b/tests/SouthKorea/GaecheonjeolTest.php @@ -15,6 +15,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class GaecheonjeolTest extends SouthKoreaBaseTestCase implements YasumiTestCaseI /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -51,7 +53,7 @@ public function testHoliday() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -64,7 +66,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/HangulDayTest.php b/tests/SouthKorea/HangulDayTest.php index 17f59cba7..a948c34ef 100644 --- a/tests/SouthKorea/HangulDayTest.php +++ b/tests/SouthKorea/HangulDayTest.php @@ -15,6 +15,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class HangulDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -59,7 +61,7 @@ public function testHoliday() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -72,7 +74,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -89,7 +91,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/IndependenceMovementDayTest.php b/tests/SouthKorea/IndependenceMovementDayTest.php index b52013b85..c07c11fa3 100644 --- a/tests/SouthKorea/IndependenceMovementDayTest.php +++ b/tests/SouthKorea/IndependenceMovementDayTest.php @@ -15,6 +15,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class IndependenceMovementDayTest extends SouthKoreaBaseTestCase implements Yasu /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -51,7 +53,7 @@ public function testHoliday() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -64,7 +66,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/LiberationDayTest.php b/tests/SouthKorea/LiberationDayTest.php index ae398f8b7..1d706138a 100644 --- a/tests/SouthKorea/LiberationDayTest.php +++ b/tests/SouthKorea/LiberationDayTest.php @@ -15,6 +15,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class LiberationDayTest extends SouthKoreaBaseTestCase implements YasumiTestCase /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -51,7 +53,7 @@ public function testHoliday() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -64,7 +66,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/MemorialDayTest.php b/tests/SouthKorea/MemorialDayTest.php index 16b2b69b6..5490b1a06 100644 --- a/tests/SouthKorea/MemorialDayTest.php +++ b/tests/SouthKorea/MemorialDayTest.php @@ -15,6 +15,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class MemorialDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseIn /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -51,7 +53,7 @@ public function testHoliday() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -64,7 +66,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -78,7 +80,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/NewYearsDayTest.php b/tests/SouthKorea/NewYearsDayTest.php index e1b489ea4..eb371f53e 100644 --- a/tests/SouthKorea/NewYearsDayTest.php +++ b/tests/SouthKorea/NewYearsDayTest.php @@ -16,6 +16,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class NewYearsDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseIn /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -70,7 +72,7 @@ public function testHoliday() /** * Tests the holiday defined in this test after removal. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayAfterRemoval() { @@ -88,7 +90,7 @@ public function testHolidayAfterRemoval() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -101,7 +103,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -127,7 +129,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/SeollalTest.php b/tests/SouthKorea/SeollalTest.php index ac291d544..69cacd3ab 100644 --- a/tests/SouthKorea/SeollalTest.php +++ b/tests/SouthKorea/SeollalTest.php @@ -16,6 +16,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\SouthKorea; use Yasumi\tests\YasumiTestCaseInterface; @@ -37,8 +39,8 @@ class SeollalTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -71,8 +73,8 @@ public function testHoliday() /** * Tests the substitute holiday defined in this test (conflict with Sunday). - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testSubstituteHolidayBySunday() { @@ -98,7 +100,7 @@ public function testSubstituteHolidayBySunday() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -111,7 +113,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -142,7 +144,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/SouthKorea/SouthKoreaTest.php b/tests/SouthKorea/SouthKoreaTest.php index 4e81817d6..28da81504 100644 --- a/tests/SouthKorea/SouthKoreaTest.php +++ b/tests/SouthKorea/SouthKoreaTest.php @@ -13,6 +13,7 @@ namespace Yasumi\tests\SouthKorea; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\SouthKorea; @@ -28,7 +29,7 @@ class SouthKoreaTest extends SouthKoreaBaseTestCase /** * Tests if all official holidays in South Korea are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -90,7 +91,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in South Korea are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -99,7 +100,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in South Korea are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -108,7 +109,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in South Korea are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -117,7 +118,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in South Korea are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/AllSaintsDayTest.php b/tests/Spain/AllSaintsDayTest.php index 80f84c637..206a6036b 100644 --- a/tests/Spain/AllSaintsDayTest.php +++ b/tests/Spain/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Spain; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends SpainBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/Andalusia/AndalusiaDayTest.php b/tests/Spain/Andalusia/AndalusiaDayTest.php index b3eb56729..1b38e272e 100644 --- a/tests/Spain/Andalusia/AndalusiaDayTest.php +++ b/tests/Spain/Andalusia/AndalusiaDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class AndalusiaDayTest extends AndalusiaBaseTestCase implements YasumiTestCaseIn /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/Andalusia/AndalusiaTest.php b/tests/Spain/Andalusia/AndalusiaTest.php index d17e430ec..e11d7bea5 100644 --- a/tests/Spain/Andalusia/AndalusiaTest.php +++ b/tests/Spain/Andalusia/AndalusiaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\Andalusia; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class AndalusiaTest extends AndalusiaBaseTestCase /** * Tests if all official holidays in Andalusia (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Andalusia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -59,7 +60,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Andalusia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -68,7 +69,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Andalusia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -77,7 +78,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Andalusia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/Aragon/AragonTest.php b/tests/Spain/Aragon/AragonTest.php index 7f573590c..3b8f31617 100644 --- a/tests/Spain/Aragon/AragonTest.php +++ b/tests/Spain/Aragon/AragonTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\Aragon; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class AragonTest extends AragonBaseTestCase /** * Tests if all official holidays in Aragon (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -46,7 +47,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Aragon are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -59,7 +60,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Aragon are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -68,7 +69,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Aragon are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -77,7 +78,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Aragon are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/Aragon/StGeorgesDayTest.php b/tests/Spain/Aragon/StGeorgesDayTest.php index 922ee21dd..a19583a7f 100644 --- a/tests/Spain/Aragon/StGeorgesDayTest.php +++ b/tests/Spain/Aragon/StGeorgesDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class StGeorgesDayTest extends AragonBaseTestCase implements YasumiTestCaseInter /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/AssumptionOfMaryTest.php b/tests/Spain/AssumptionOfMaryTest.php index b772cae88..f6f9febb6 100644 --- a/tests/Spain/AssumptionOfMaryTest.php +++ b/tests/Spain/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Spain; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends SpainBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/Asturias/AsturiasDayTest.php b/tests/Spain/Asturias/AsturiasDayTest.php index 87447548e..2b1fea30c 100644 --- a/tests/Spain/Asturias/AsturiasDayTest.php +++ b/tests/Spain/Asturias/AsturiasDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class AsturiasDayTest extends AsturiasBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/Asturias/AsturiasTest.php b/tests/Spain/Asturias/AsturiasTest.php index c8118bd94..7e6a7b8d9 100644 --- a/tests/Spain/Asturias/AsturiasTest.php +++ b/tests/Spain/Asturias/AsturiasTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\Asturias; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class AsturiasTest extends AsturiasBaseTestCase /** * Tests if all official holidays in Asturias (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Asturias are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -60,7 +61,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Asturias are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -69,7 +70,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Asturias are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -78,7 +79,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Asturias are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php b/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php index 55c4e8f11..559399b8c 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class BalearicIslandsDayTest extends BalearicIslandsBaseTestCase implements Yasu /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/BalearicIslands/BalearicIslandsTest.php b/tests/Spain/BalearicIslands/BalearicIslandsTest.php index 87666ce0e..2ab28fa4c 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\BalearicIslands; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class BalearicIslandsTest extends BalearicIslandsBaseTestCase /** * Tests if all official holidays in the Balearic Islands (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the Balearic Islands are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -62,7 +63,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the Balearic Islands are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -71,7 +72,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the Balearic Islands are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -80,7 +81,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the Balearic Islands are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/BasqueCountry/BasqueCountryDayTest.php b/tests/Spain/BasqueCountry/BasqueCountryDayTest.php index 9b65ef58b..a41e822f3 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryDayTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -39,8 +41,8 @@ class BasqueCountryDayTest extends BasqueCountryBaseTestCase implements YasumiTe /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -55,7 +57,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -68,7 +70,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the holiday defined in this test after abolishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayDayAfterAbolishment() { @@ -77,7 +79,7 @@ public function testHolidayDayAfterAbolishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -91,7 +93,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/BasqueCountry/BasqueCountryTest.php b/tests/Spain/BasqueCountry/BasqueCountryTest.php index c73977296..cbe31cae0 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\BasqueCountry; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class BasqueCountryTest extends BasqueCountryBaseTestCase /** * Tests if all official holidays in Basque Country (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Basque Country are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -60,7 +61,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Basque Country are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -69,7 +70,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Basque Country are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -78,7 +79,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Basque Country are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php b/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php index dc1a3eb3e..43f53eabe 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class CanaryIslandsDayTest extends CanaryIslandsBaseTestCase implements YasumiTe /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/CanaryIslands/CanaryIslandsTest.php b/tests/Spain/CanaryIslands/CanaryIslandsTest.php index 0fd627452..5df4b0827 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\CanaryIslands; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class CanaryIslandsTest extends CanaryIslandsBaseTestCase /** * Tests if all official holidays in the Canary Islands (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the Canary Islands are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -59,7 +60,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the Canary Islands are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -68,7 +69,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the Canary Islands are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -77,7 +78,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the Canary Islands are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/Cantabria/CantabriaDayTest.php b/tests/Spain/Cantabria/CantabriaDayTest.php index afbc24080..3038790ef 100644 --- a/tests/Spain/Cantabria/CantabriaDayTest.php +++ b/tests/Spain/Cantabria/CantabriaDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class CantabriaDayTest extends CantabriaBaseTestCase implements YasumiTestCaseIn /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/Cantabria/CantabriaTest.php b/tests/Spain/Cantabria/CantabriaTest.php index 876fb89b8..36d39277a 100644 --- a/tests/Spain/Cantabria/CantabriaTest.php +++ b/tests/Spain/Cantabria/CantabriaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\Cantabria; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class CantabriaTest extends CantabriaBaseTestCase /** * Tests if all official holidays in Cantabria (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Cantabria are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -59,7 +60,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Cantabria are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -68,7 +69,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Cantabria are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -77,7 +78,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Cantabria are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php index bed03d85b..51f598ffa 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class CastileAndLeonDayTest extends CastileAndLeonBaseTestCase implements Yasumi /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php index d9f1a9bb4..9aa4abd3f 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\CastileAndLeon; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class CastileAndLeonTest extends CastileAndLeonBaseTestCase /** * Tests if all official holidays in Castile And Leon (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Castile And Leon are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -59,7 +60,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Castile And Leon are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -68,7 +69,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Castile And Leon are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -77,7 +78,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Castile And Leon are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php index df0772d0f..33a2042f9 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class CastillaLaManchaDayTest extends CastillaLaManchaBaseTestCase implements Ya /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php index 233e1ed38..39cb2b576 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\CastillaLaMancha; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class CastillaLaManchaTest extends CastillaLaManchaBaseTestCase /** * Tests if all official holidays in Castilla-La Mancha (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Castilla-La Mancha are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -60,7 +61,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Castilla-La Mancha are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -69,7 +70,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Castilla-La Mancha are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -78,7 +79,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Castilla-La Mancha are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/Catalonia/CataloniaTest.php b/tests/Spain/Catalonia/CataloniaTest.php index 1f2caa6fc..a6fb94883 100644 --- a/tests/Spain/Catalonia/CataloniaTest.php +++ b/tests/Spain/Catalonia/CataloniaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\Catalonia; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class CataloniaTest extends CataloniaBaseTestCase /** * Tests if all official holidays in Catalonia (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Catalonia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -61,7 +62,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Catalonia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -70,7 +71,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Catalonia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -79,7 +80,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Catalonia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/Catalonia/nationalCataloniaDayTest.php b/tests/Spain/Catalonia/nationalCataloniaDayTest.php index b6385f183..cb6768a8c 100644 --- a/tests/Spain/Catalonia/nationalCataloniaDayTest.php +++ b/tests/Spain/Catalonia/nationalCataloniaDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class nationalCataloniaDayTest extends CataloniaBaseTestCase implements YasumiTe /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/Catalonia/stJohnsDayTest.php b/tests/Spain/Catalonia/stJohnsDayTest.php index da662d073..42024ea2f 100644 --- a/tests/Spain/Catalonia/stJohnsDayTest.php +++ b/tests/Spain/Catalonia/stJohnsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Spain\Catalonia; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class stJohnsDayTest extends CataloniaBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/Ceuta/CeutaTest.php b/tests/Spain/Ceuta/CeutaTest.php index 1ea76015a..f903e03fa 100644 --- a/tests/Spain/Ceuta/CeutaTest.php +++ b/tests/Spain/Ceuta/CeutaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\Ceuta; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class CeutaTest extends CeutaBaseTestCase /** * Tests if all official holidays in Ceuta (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Ceuta are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -59,7 +60,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Ceuta are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -68,7 +69,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Ceuta are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -77,7 +78,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Ceuta are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/Ceuta/ceutaDayTest.php b/tests/Spain/Ceuta/ceutaDayTest.php index fcae69cc9..db10cf8b9 100644 --- a/tests/Spain/Ceuta/ceutaDayTest.php +++ b/tests/Spain/Ceuta/ceutaDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class ceutaDayTest extends CeutaBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/ChristmasTest.php b/tests/Spain/ChristmasTest.php index 817631502..fa67447d5 100644 --- a/tests/Spain/ChristmasTest.php +++ b/tests/Spain/ChristmasTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Spain; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasTest extends SpainBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php index 6388660a4..333f6748a 100644 --- a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php +++ b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\CommunityOfMadrid; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class CommunityOfMadridTest extends CommunityOfMadridBaseTestCase /** * Tests if all official holidays in the Community of Madrid (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the Community of Madrid are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -61,7 +62,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the Community of Madrid are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -70,7 +71,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the Community of Madrid are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -79,7 +80,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the Community of Madrid are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php b/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php index bf0b92edd..6b107c8e5 100644 --- a/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php +++ b/tests/Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class DosdeMayoUprisingDayTest extends CommunityOfMadridBaseTestCase implements /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/ConstitutionDayTest.php b/tests/Spain/ConstitutionDayTest.php index fe9cb9e73..5b49da7fd 100644 --- a/tests/Spain/ConstitutionDayTest.php +++ b/tests/Spain/ConstitutionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class ConstitutionDayTest extends SpainBaseTestCase implements YasumiTestCaseInt /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/EasterMondayTest.php b/tests/Spain/EasterMondayTest.php index 67e990d07..b0fc7c978 100644 --- a/tests/Spain/EasterMondayTest.php +++ b/tests/Spain/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class EasterMondayTest extends SpainBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -51,7 +53,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -65,7 +67,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/EpiphanyTest.php b/tests/Spain/EpiphanyTest.php index f9392c81d..b4dc729e6 100644 --- a/tests/Spain/EpiphanyTest.php +++ b/tests/Spain/EpiphanyTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Spain; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class EpiphanyTest extends SpainBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/Extremadura/ExtremaduraDayTest.php b/tests/Spain/Extremadura/ExtremaduraDayTest.php index b064c2c3d..e84424292 100644 --- a/tests/Spain/Extremadura/ExtremaduraDayTest.php +++ b/tests/Spain/Extremadura/ExtremaduraDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class ExtremaduraDayTest extends ExtremaduraBaseTestCase implements YasumiTestCa /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/Extremadura/ExtremaduraTest.php b/tests/Spain/Extremadura/ExtremaduraTest.php index 2a545e985..1a13436d5 100644 --- a/tests/Spain/Extremadura/ExtremaduraTest.php +++ b/tests/Spain/Extremadura/ExtremaduraTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\Extremadura; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class ExtremaduraTest extends ExtremaduraBaseTestCase /** * Tests if all official holidays in Extremadura (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Extremadura are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -59,7 +60,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Extremadura are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -68,7 +69,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Extremadura are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -77,7 +78,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Extremadura are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/Galicia/GaliciaTest.php b/tests/Spain/Galicia/GaliciaTest.php index af75d1559..583e58e18 100644 --- a/tests/Spain/Galicia/GaliciaTest.php +++ b/tests/Spain/Galicia/GaliciaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\Galicia; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class GaliciaTest extends GaliciaBaseTestCase /** * Tests if all official holidays in Galicia (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -48,7 +49,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Galicia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -61,7 +62,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Galicia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -70,7 +71,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Galicia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -79,7 +80,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Galicia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/Galicia/GalicianLiteratureDayTest.php b/tests/Spain/Galicia/GalicianLiteratureDayTest.php index b1779c075..e16d3997e 100644 --- a/tests/Spain/Galicia/GalicianLiteratureDayTest.php +++ b/tests/Spain/Galicia/GalicianLiteratureDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class GalicianLiteratureDayTest extends GaliciaBaseTestCase implements YasumiTes /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/Galicia/stJamesDayTest.php b/tests/Spain/Galicia/stJamesDayTest.php index e7a4ad630..7922af69b 100644 --- a/tests/Spain/Galicia/stJamesDayTest.php +++ b/tests/Spain/Galicia/stJamesDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class stJamesDayTest extends GaliciaBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/GoodFridayTest.php b/tests/Spain/GoodFridayTest.php index 57d56a282..4031c41fd 100644 --- a/tests/Spain/GoodFridayTest.php +++ b/tests/Spain/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends SpainBaseTestCase implements YasumiTestCaseInterfac /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/ImmaculateConceptionTest.php b/tests/Spain/ImmaculateConceptionTest.php index b7b4ae7c3..b67b071e6 100644 --- a/tests/Spain/ImmaculateConceptionTest.php +++ b/tests/Spain/ImmaculateConceptionTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Spain; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ImmaculateConceptionTest extends SpainBaseTestCase implements YasumiTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/InternationalWorkersDayTest.php b/tests/Spain/InternationalWorkersDayTest.php index d3e8d4f74..9bcf50d25 100644 --- a/tests/Spain/InternationalWorkersDayTest.php +++ b/tests/Spain/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Spain; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends SpainBaseTestCase implements YasumiTes * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/LaRioja/LaRiojaDayTest.php b/tests/Spain/LaRioja/LaRiojaDayTest.php index 43363c26e..287e47d75 100644 --- a/tests/Spain/LaRioja/LaRiojaDayTest.php +++ b/tests/Spain/LaRioja/LaRiojaDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class LaRiojaDayTest extends LaRiojaBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/LaRioja/LaRiojaTest.php b/tests/Spain/LaRioja/LaRiojaTest.php index 0e440930c..03bbed81a 100644 --- a/tests/Spain/LaRioja/LaRiojaTest.php +++ b/tests/Spain/LaRioja/LaRiojaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\LaRioja; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class LaRiojaTest extends LaRiojaBaseTestCase /** * Tests if all official holidays in La Rioja (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in La Rioja are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -59,7 +60,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in La Rioja are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -68,7 +69,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in La Rioja are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -77,7 +78,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in La Rioja are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/MaundyThursdayTest.php b/tests/Spain/MaundyThursdayTest.php index ab72b930a..a272d241a 100644 --- a/tests/Spain/MaundyThursdayTest.php +++ b/tests/Spain/MaundyThursdayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class MaundyThursdayTest extends SpainBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -51,7 +53,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -65,7 +67,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/Melilla/MelillaTest.php b/tests/Spain/Melilla/MelillaTest.php index fb4bb1154..61df62532 100644 --- a/tests/Spain/Melilla/MelillaTest.php +++ b/tests/Spain/Melilla/MelillaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\Melilla; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class MelillaTest extends MelillaBaseTestCase /** * Tests if all official holidays in Melilla (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -46,7 +47,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Melilla are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -59,7 +60,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Melilla are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -68,7 +69,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Melilla are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -77,7 +78,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Melilla are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/NationalDayTest.php b/tests/Spain/NationalDayTest.php index dcf03f8a0..06202b01e 100644 --- a/tests/Spain/NationalDayTest.php +++ b/tests/Spain/NationalDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class NationalDayTest extends SpainBaseTestCase implements YasumiTestCaseInterfa /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/Navarre/NavarreTest.php b/tests/Spain/Navarre/NavarreTest.php index e70a52efd..b3c955126 100644 --- a/tests/Spain/Navarre/NavarreTest.php +++ b/tests/Spain/Navarre/NavarreTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\Navarre; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class NavarreTest extends NavarreBaseTestCase /** * Tests if all official holidays in Navarre (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -46,7 +47,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Navarre are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -60,7 +61,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Navarre are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -69,7 +70,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Navarre are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -78,7 +79,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Navarre are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/NewYearsDayTest.php b/tests/Spain/NewYearsDayTest.php index 206ccee3d..aba7b2f3c 100644 --- a/tests/Spain/NewYearsDayTest.php +++ b/tests/Spain/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Spain; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends SpainBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php index 8be0e5335..c86cda935 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class RegionOfMurciaDayTest extends RegionOfMurciaBaseTestCase implements Yasumi /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php index cb93e9c7d..cfedb6e1d 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\RegionOfMurcia; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class RegionOfMurciaTest extends RegionOfMurciaBaseTestCase /** * Tests if all official holidays in the Region of Murcia (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the Region of Murcia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -60,7 +61,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the Region of Murcia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -69,7 +70,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the Region of Murcia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -78,7 +79,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the Region of Murcia are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/SpainTest.php b/tests/Spain/SpainTest.php index c9de57ff5..80b5559ab 100644 --- a/tests/Spain/SpainTest.php +++ b/tests/Spain/SpainTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class SpainTest extends SpainBaseTestCase /** * Tests if all official holidays in Spain are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -46,7 +47,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Spain are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -55,7 +56,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Spain are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -64,7 +65,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Spain are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -73,7 +74,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Spain are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php index ae431eccb..42dbe86a7 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class ValencianCommunityDayTest extends ValencianCommunityBaseTestCase implement /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php index 033668cca..3c8969dea 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Spain\ValencianCommunity; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class ValencianCommunityTest extends ValencianCommunityBaseTestCase /** * Tests if all official holidays in the Valencian Community (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -47,7 +48,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the Valencian Community are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -60,7 +61,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the Valencian Community are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -69,7 +70,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the Valencian Community are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -78,7 +79,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the Valencian Community are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Spain/ValentinesDayTest.php b/tests/Spain/ValentinesDayTest.php index 2c9e61191..86cbc37ff 100644 --- a/tests/Spain/ValentinesDayTest.php +++ b/tests/Spain/ValentinesDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Spain; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ValentinesDayTest extends SpainBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Spain/stJosephsDayTest.php b/tests/Spain/stJosephsDayTest.php index d2aa621a2..e7a74fc73 100644 --- a/tests/Spain/stJosephsDayTest.php +++ b/tests/Spain/stJosephsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Spain; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,7 +42,7 @@ class stJosephsDayTest extends SpainBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -51,7 +53,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -60,7 +62,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -74,7 +76,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/AllSaintsDayTest.php b/tests/Sweden/AllSaintsDayTest.php index 94a2cbc94..13c2263e0 100644 --- a/tests/Sweden/AllSaintsDayTest.php +++ b/tests/Sweden/AllSaintsDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,7 +38,7 @@ class AllSaintsDayTest extends SwedenBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -47,7 +49,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -72,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -86,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/AllSaintsEveTest.php b/tests/Sweden/AllSaintsEveTest.php index bf86c24e7..18508142d 100644 --- a/tests/Sweden/AllSaintsEveTest.php +++ b/tests/Sweden/AllSaintsEveTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,7 +38,7 @@ class AllSaintsEveTest extends SwedenBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -47,7 +49,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -72,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -86,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/AscensionDayTest.php b/tests/Sweden/AscensionDayTest.php index 983b419e9..d11e834be 100644 --- a/tests/Sweden/AscensionDayTest.php +++ b/tests/Sweden/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends SwedenBaseTestCase implements YasumiTestCaseInter /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/ChristmasDayTest.php b/tests/Sweden/ChristmasDayTest.php index fce72e791..a20c13699 100644 --- a/tests/Sweden/ChristmasDayTest.php +++ b/tests/Sweden/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Sweden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends SwedenBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/ChristmasEveTest.php b/tests/Sweden/ChristmasEveTest.php index dde6accbe..79a22b906 100644 --- a/tests/Sweden/ChristmasEveTest.php +++ b/tests/Sweden/ChristmasEveTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Sweden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasEveTest extends SwedenBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/EasterMondayTest.php b/tests/Sweden/EasterMondayTest.php index 92c9d53ea..c6107f803 100644 --- a/tests/Sweden/EasterMondayTest.php +++ b/tests/Sweden/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends SwedenBaseTestCase implements YasumiTestCaseInter /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/EasterTest.php b/tests/Sweden/EasterTest.php index 7e4265e3f..a7f5da63b 100644 --- a/tests/Sweden/EasterTest.php +++ b/tests/Sweden/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterTest extends SwedenBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/EpiphanyEveTest.php b/tests/Sweden/EpiphanyEveTest.php index f7a72a16b..ee00bcfdc 100644 --- a/tests/Sweden/EpiphanyEveTest.php +++ b/tests/Sweden/EpiphanyEveTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Sweden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class EpiphanyEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/EpiphanyTest.php b/tests/Sweden/EpiphanyTest.php index a27b19fb4..795365704 100644 --- a/tests/Sweden/EpiphanyTest.php +++ b/tests/Sweden/EpiphanyTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Sweden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class EpiphanyTest extends SwedenBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/GoodFridayTest.php b/tests/Sweden/GoodFridayTest.php index 3f8d993f4..420afe35b 100644 --- a/tests/Sweden/GoodFridayTest.php +++ b/tests/Sweden/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends SwedenBaseTestCase implements YasumiTestCaseInterfa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/InternationalWorkersDayTest.php b/tests/Sweden/InternationalWorkersDayTest.php index 532d75155..1c5277639 100644 --- a/tests/Sweden/InternationalWorkersDayTest.php +++ b/tests/Sweden/InternationalWorkersDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Sweden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class InternationalWorkersDayTest extends SwedenBaseTestCase implements YasumiTe * @param int $year the year for which International Workers' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testInternationalWorkersDay($year, $expected) { @@ -43,7 +45,7 @@ public function testInternationalWorkersDay($year, $expected) /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of International Workers' Day. * * @return array list of test dates for International Workers' Day - * @throws \Exception + * @throws Exception */ public function InternationalWorkersDayDataProvider(): array { diff --git a/tests/Sweden/NationalDayTest.php b/tests/Sweden/NationalDayTest.php index 59b93a054..26a5547fc 100644 --- a/tests/Sweden/NationalDayTest.php +++ b/tests/Sweden/NationalDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class NationalDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test on or after establishment. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHolidayOnAfterEstablishment() { @@ -50,7 +52,7 @@ public function testHolidayOnAfterEstablishment() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test on or after establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -91,7 +93,7 @@ public function testHolidayType(): void /** * Tests the translated name of the holiday defined in this test on or after establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslationOnAfterNameChange() { diff --git a/tests/Sweden/NewYearsDayTest.php b/tests/Sweden/NewYearsDayTest.php index 5137f2f0c..99d806873 100644 --- a/tests/Sweden/NewYearsDayTest.php +++ b/tests/Sweden/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Sweden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/NewYearsEveTest.php b/tests/Sweden/NewYearsEveTest.php index 70fa18c8e..a6fa6913e 100644 --- a/tests/Sweden/NewYearsEveTest.php +++ b/tests/Sweden/NewYearsEveTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Sweden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/PentecostTest.php b/tests/Sweden/PentecostTest.php index 57c62dbca..341454af1 100644 --- a/tests/Sweden/PentecostTest.php +++ b/tests/Sweden/PentecostTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostTest extends SwedenBaseTestCase implements YasumiTestCaseInterfac /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/SecondChristmasDayTest.php b/tests/Sweden/SecondChristmasDayTest.php index 8000756fc..310952e7d 100644 --- a/tests/Sweden/SecondChristmasDayTest.php +++ b/tests/Sweden/SecondChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Sweden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class SecondChristmasDayTest extends SwedenBaseTestCase implements YasumiTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/StJohnsDayTest.php b/tests/Sweden/StJohnsDayTest.php index 2131473c8..968574f93 100644 --- a/tests/Sweden/StJohnsDayTest.php +++ b/tests/Sweden/StJohnsDayTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Sweden; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; use Yasumi\Yasumi; @@ -28,7 +29,7 @@ class StJohnsDayTest extends SwedenBaseTestCase implements YasumiTestCaseInterfa /** * Tests the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday() { @@ -52,7 +53,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +67,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/StJohnsEveTest.php b/tests/Sweden/StJohnsEveTest.php index b85f20f58..c8e63074c 100644 --- a/tests/Sweden/StJohnsEveTest.php +++ b/tests/Sweden/StJohnsEveTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Sweden; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; use Yasumi\Yasumi; @@ -28,7 +29,7 @@ class StJohnsEveTest extends SwedenBaseTestCase implements YasumiTestCaseInterfa /** * Tests the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday() { @@ -52,7 +53,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +67,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Sweden/SwedenTest.php b/tests/Sweden/SwedenTest.php index 5d5453208..45c433ed7 100644 --- a/tests/Sweden/SwedenTest.php +++ b/tests/Sweden/SwedenTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Sweden; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class SwedenTest extends SwedenBaseTestCase /** * Tests if all official holidays in Sweden (Spain) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -49,7 +50,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Sweden are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -65,7 +66,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Sweden are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -74,7 +75,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Sweden are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -83,7 +84,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Sweden are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Sweden/WalpurgisEveTest.php b/tests/Sweden/WalpurgisEveTest.php index cf077d0c3..d8fc8e0f2 100644 --- a/tests/Sweden/WalpurgisEveTest.php +++ b/tests/Sweden/WalpurgisEveTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Sweden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class WalpurgisEveTest extends SwedenBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Aargau/AargauTest.php b/tests/Switzerland/Aargau/AargauTest.php index 4d44ddbdb..e04496217 100644 --- a/tests/Switzerland/Aargau/AargauTest.php +++ b/tests/Switzerland/Aargau/AargauTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Aargau; +use ReflectionException; use Yasumi\Holiday; /** @@ -27,7 +28,7 @@ class AargauTest extends AargauBaseTestCase /** * Tests if all official holidays in Aargau (Switzerland) are defined by the provider class * - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -41,7 +42,7 @@ public function testOfficialHolidays(): void /** * Tests if all official holidays in Aargau (Switzerland) are defined by the provider class * - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -56,7 +57,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Aargau (Switzerland) are defined by the provider class * - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -71,7 +72,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Aargau (Switzerland) are defined by the provider class * - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -81,7 +82,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Aargau (Switzerland) are defined by the provider class * - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -91,7 +92,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Aargau (Switzerland) are defined by the provider class * - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Aargau/AscensionDayTest.php b/tests/Switzerland/Aargau/AscensionDayTest.php index 68f596701..2df1864c4 100644 --- a/tests/Switzerland/Aargau/AscensionDayTest.php +++ b/tests/Switzerland/Aargau/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends AargauBaseTestCase implements YasumiTestCaseInter /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Aargau/ChristmasDayTest.php b/tests/Switzerland/Aargau/ChristmasDayTest.php index 81d53c642..f59883c85 100644 --- a/tests/Switzerland/Aargau/ChristmasDayTest.php +++ b/tests/Switzerland/Aargau/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Aargau; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends AargauBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Aargau/GoodFridayTest.php b/tests/Switzerland/Aargau/GoodFridayTest.php index d5fdc92a8..c1269775b 100644 --- a/tests/Switzerland/Aargau/GoodFridayTest.php +++ b/tests/Switzerland/Aargau/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends AargauBaseTestCase implements YasumiTestCaseInterfa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Aargau/NewYearsDayTest.php b/tests/Switzerland/Aargau/NewYearsDayTest.php index 6ee1fa4ad..bfde7e04a 100644 --- a/tests/Switzerland/Aargau/NewYearsDayTest.php +++ b/tests/Switzerland/Aargau/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Aargau; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends AargauBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php index 5b8d03b93..2e76a552f 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class AppenzellAusserrhodenTest extends AppenzellAusserrhodenBaseTestCase /** * Tests if all official holidays in Appenzell Ausserrhoden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Appenzell Ausserrhoden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -56,7 +57,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Appenzell Ausserrhoden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -70,7 +71,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Appenzell Ausserrhoden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -79,7 +80,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Appenzell Ausserrhoden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -88,7 +89,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Appenzell Ausserrhoden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php index b4d50a241..9cc16f931 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends AppenzellAusserrhodenBaseTestCase implements Yasu /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php index f45787fbe..db3e1dfc7 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends AppenzellAusserrhodenBaseTestCase implements Yasu * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php b/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php index 2a7d584ac..e7e12983f 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends AppenzellAusserrhodenBaseTestCase implements Yasu /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php b/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php index 842e71428..3fc4902d8 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends AppenzellAusserrhodenBaseTestCase implements Yasumi /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php index 4baddbc33..ce487d8ec 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends AppenzellAusserrhodenBaseTestCase implements Yasum * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php b/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php index 73e288d44..c6ff9ed1e 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends AppenzellAusserrhodenBaseTestCase implements Y /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php index c86ae6370..7aef43e0f 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\AppenzellAusserrhoden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends AppenzellAusserrhodenBaseTestCase implements Yas * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php index 7c7e4db0e..f70a0d2ab 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends AppenzellInnerrhodenBaseTestCase implements Yasum * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAllSaintsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testAllSaintsDay($year, $expected) /** * Tests translated name of All Saints' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of All Saints' Day. * * @return array list of test dates for All Saints' Day - * @throws \Exception + * @throws Exception */ public function AllSaintsDayDataProvider(): array { diff --git a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php index 3f4c500ef..72a4f04ca 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class AppenzellInnerrhodenTest extends AppenzellInnerrhodenBaseTestCase /** * Tests if all official holidays in Appenzell Innerrhoden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Appenzell Innerrhoden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -60,7 +61,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Appenzell Innerrhoden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -74,7 +75,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Appenzell Innerrhoden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -83,7 +84,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Appenzell Innerrhoden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -92,7 +93,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Appenzell Innerrhoden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php index 599e704e5..3090e3e3b 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends AppenzellInnerrhodenBaseTestCase implements Yasum /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php index 73920fae3..d30127e0f 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends AppenzellInnerrhodenBaseTestCase implements Y * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAssumptionOfMary($year, $expected) { @@ -43,7 +45,7 @@ public function testAssumptionOfMary($year, $expected) /** * Tests translated name of the day of the Assumption of Mary. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of the day of the Assumption of Mary. * * @return array list of test dates for the day of the Assumption of Mary - * @throws \Exception + * @throws Exception */ public function AssumptionOfMaryDataProvider(): array { diff --git a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php index bb6e1ac3c..deae2516b 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends AppenzellInnerrhodenBaseTestCase implements Yasum * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php b/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php index 3ee8a5d31..4dd7db52e 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends AppenzellInnerrhodenBaseTestCase implements Yasu /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php b/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php index bbfa64464..2f671d8d7 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends AppenzellInnerrhodenBaseTestCase implements Yasum /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php b/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php index 662677557..5c0840c22 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends AppenzellInnerrhodenBaseTestCase implements YasumiT /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php index a2d7c5fd1..8426c9049 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/ImmaculateConceptionTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ImmaculateConceptionTest extends AppenzellInnerrhodenBaseTestCase implemen * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php index ea553eee9..a8830793b 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends AppenzellInnerrhodenBaseTestCase implements Yasumi * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php b/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php index e70729a20..cbf11c424 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends AppenzellInnerrhodenBaseTestCase implements Ya /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php index 533491349..8ef96093d 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\AppenzellInnerrhoden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends AppenzellInnerrhodenBaseTestCase implements Yasu * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/AscensionDayTest.php b/tests/Switzerland/BaselLandschaft/AscensionDayTest.php index 43548e229..b6289068b 100644 --- a/tests/Switzerland/BaselLandschaft/AscensionDayTest.php +++ b/tests/Switzerland/BaselLandschaft/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends BaselLandschaftBaseTestCase implements YasumiTest /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php index c58869126..7cdba357b 100644 --- a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php +++ b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\BaselLandschaft; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class BaselLandschaftTest extends BaselLandschaftBaseTestCase /** * Tests if all official holidays in BaselLandschaft (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in BaselLandschaft (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -57,7 +58,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in BaselLandschaft (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -71,7 +72,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in BaselLandschaft (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -80,7 +81,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in BaselLandschaft (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,7 +90,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in BaselLandschaft (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php index 67eef40de..57048adc1 100644 --- a/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php +++ b/tests/Switzerland/BaselLandschaft/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\BaselLandschaft; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends BaselLandschaftBaseTestCase implements YasumiTest * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/EasterMondayTest.php b/tests/Switzerland/BaselLandschaft/EasterMondayTest.php index e183c74ab..56a5b360c 100644 --- a/tests/Switzerland/BaselLandschaft/EasterMondayTest.php +++ b/tests/Switzerland/BaselLandschaft/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends BaselLandschaftBaseTestCase implements YasumiTest /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/GoodFridayTest.php b/tests/Switzerland/BaselLandschaft/GoodFridayTest.php index af822c9af..7378c50d2 100644 --- a/tests/Switzerland/BaselLandschaft/GoodFridayTest.php +++ b/tests/Switzerland/BaselLandschaft/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends BaselLandschaftBaseTestCase implements YasumiTestCa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php index ef42d8b89..4cbb21d65 100644 --- a/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php +++ b/tests/Switzerland/BaselLandschaft/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\BaselLandschaft; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends BaselLandschaftBaseTestCase implements YasumiTestC * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php b/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php index ba42f5336..bbce81f87 100644 --- a/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php +++ b/tests/Switzerland/BaselLandschaft/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends BaselLandschaftBaseTestCase implements YasumiT /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php index a1ca7cd10..bb311ce42 100644 --- a/tests/Switzerland/BaselLandschaft/StStephensDayTest.php +++ b/tests/Switzerland/BaselLandschaft/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\BaselLandschaft; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends BaselLandschaftBaseTestCase implements YasumiTes * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php index b671d4706..cbc00caaf 100644 --- a/tests/Switzerland/BaselLandschaft/WorkersDayTest.php +++ b/tests/Switzerland/BaselLandschaft/WorkersDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class WorkersDayTest extends BaselLandschaftBaseTestCase implements YasumiTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -48,7 +50,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -65,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -79,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/AscensionDayTest.php b/tests/Switzerland/BaselStadt/AscensionDayTest.php index 26ba32905..757640e53 100644 --- a/tests/Switzerland/BaselStadt/AscensionDayTest.php +++ b/tests/Switzerland/BaselStadt/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends BaselStadtBaseTestCase implements YasumiTestCaseI /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/BaselStadtTest.php b/tests/Switzerland/BaselStadt/BaselStadtTest.php index 51157162d..ab676b813 100644 --- a/tests/Switzerland/BaselStadt/BaselStadtTest.php +++ b/tests/Switzerland/BaselStadt/BaselStadtTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\BaselStadt; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class BaselStadtTest extends BaselStadtBaseTestCase /** * Tests if all official holidays in Basel Stadt (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Basel Stadt (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -57,7 +58,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Basel Stadt (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -71,7 +72,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Basel Stadt (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -80,7 +81,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Basel Stadt (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,7 +90,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Basel Stadt (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/BaselStadt/ChristmasDayTest.php b/tests/Switzerland/BaselStadt/ChristmasDayTest.php index 67476f736..b2c93e0cd 100644 --- a/tests/Switzerland/BaselStadt/ChristmasDayTest.php +++ b/tests/Switzerland/BaselStadt/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\BaselStadt; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends BaselStadtBaseTestCase implements YasumiTestCaseI * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/EasterMondayTest.php b/tests/Switzerland/BaselStadt/EasterMondayTest.php index c673dff22..3b6c027be 100644 --- a/tests/Switzerland/BaselStadt/EasterMondayTest.php +++ b/tests/Switzerland/BaselStadt/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends BaselStadtBaseTestCase implements YasumiTestCaseI /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/GoodFridayTest.php b/tests/Switzerland/BaselStadt/GoodFridayTest.php index 63da9fc6e..01b3ac955 100644 --- a/tests/Switzerland/BaselStadt/GoodFridayTest.php +++ b/tests/Switzerland/BaselStadt/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends BaselStadtBaseTestCase implements YasumiTestCaseInt /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/NewYearsDayTest.php b/tests/Switzerland/BaselStadt/NewYearsDayTest.php index c7c4e1fb1..2870e09d6 100644 --- a/tests/Switzerland/BaselStadt/NewYearsDayTest.php +++ b/tests/Switzerland/BaselStadt/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\BaselStadt; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends BaselStadtBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/BaselStadt/PentecostMondayTest.php b/tests/Switzerland/BaselStadt/PentecostMondayTest.php index 342f3799b..5456b93a3 100644 --- a/tests/Switzerland/BaselStadt/PentecostMondayTest.php +++ b/tests/Switzerland/BaselStadt/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends BaselStadtBaseTestCase implements YasumiTestCa /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/StStephensDayTest.php b/tests/Switzerland/BaselStadt/StStephensDayTest.php index c8eff1e1a..c5f285e10 100644 --- a/tests/Switzerland/BaselStadt/StStephensDayTest.php +++ b/tests/Switzerland/BaselStadt/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\BaselStadt; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends BaselStadtBaseTestCase implements YasumiTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/BaselStadt/WorkersDayTest.php b/tests/Switzerland/BaselStadt/WorkersDayTest.php index f723c4b4e..43d0dfaa4 100644 --- a/tests/Switzerland/BaselStadt/WorkersDayTest.php +++ b/tests/Switzerland/BaselStadt/WorkersDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class WorkersDayTest extends BaselStadtBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -48,7 +50,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -65,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -79,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/AscensionDayTest.php b/tests/Switzerland/Bern/AscensionDayTest.php index b9008a546..acb8eafcf 100644 --- a/tests/Switzerland/Bern/AscensionDayTest.php +++ b/tests/Switzerland/Bern/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends BernBaseTestCase implements YasumiTestCaseInterfa /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/BerchtoldsTagTest.php b/tests/Switzerland/Bern/BerchtoldsTagTest.php index 1c895eeed..26e76d0c7 100644 --- a/tests/Switzerland/Bern/BerchtoldsTagTest.php +++ b/tests/Switzerland/Bern/BerchtoldsTagTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class BerchtoldsTagTest extends BernBaseTestCase implements YasumiTestCaseInterf /** * Tests BerchtoldsTag * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testBerchtoldsTag() { @@ -44,7 +46,7 @@ public function testBerchtoldsTag() /** * Tests translated name of BerchtoldsTag. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -58,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/BernTest.php b/tests/Switzerland/Bern/BernTest.php index e43aade14..f3523a2de 100644 --- a/tests/Switzerland/Bern/BernTest.php +++ b/tests/Switzerland/Bern/BernTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Bern; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class BernTest extends BernBaseTestCase /** * Tests if all official holidays in Bern (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Bern (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -57,7 +58,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Bern (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -71,7 +72,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Bern (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -80,7 +81,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Bern (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,7 +90,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Bern (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Bern/ChristmasDayTest.php b/tests/Switzerland/Bern/ChristmasDayTest.php index 6b6c8a7ef..9e900aa48 100644 --- a/tests/Switzerland/Bern/ChristmasDayTest.php +++ b/tests/Switzerland/Bern/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Bern; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends BernBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/EasterMondayTest.php b/tests/Switzerland/Bern/EasterMondayTest.php index 04e38a5b9..c2275a63e 100644 --- a/tests/Switzerland/Bern/EasterMondayTest.php +++ b/tests/Switzerland/Bern/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends BernBaseTestCase implements YasumiTestCaseInterfa /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/GoodFridayTest.php b/tests/Switzerland/Bern/GoodFridayTest.php index 28c887ead..785b5b3c7 100644 --- a/tests/Switzerland/Bern/GoodFridayTest.php +++ b/tests/Switzerland/Bern/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends BernBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/NewYearsDayTest.php b/tests/Switzerland/Bern/NewYearsDayTest.php index 968bd3078..f7dcc99f9 100644 --- a/tests/Switzerland/Bern/NewYearsDayTest.php +++ b/tests/Switzerland/Bern/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Bern; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends BernBaseTestCase implements YasumiTestCaseInterfac * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Bern/PentecostMondayTest.php b/tests/Switzerland/Bern/PentecostMondayTest.php index ed11bd0ac..48873ba80 100644 --- a/tests/Switzerland/Bern/PentecostMondayTest.php +++ b/tests/Switzerland/Bern/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends BernBaseTestCase implements YasumiTestCaseInte /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Bern/StStephensDayTest.php b/tests/Switzerland/Bern/StStephensDayTest.php index d0ce536a4..130742394 100644 --- a/tests/Switzerland/Bern/StStephensDayTest.php +++ b/tests/Switzerland/Bern/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Bern; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends BernBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/AscensionDayTest.php b/tests/Switzerland/Fribourg/AscensionDayTest.php index 0d1414cac..a23b144cd 100644 --- a/tests/Switzerland/Fribourg/AscensionDayTest.php +++ b/tests/Switzerland/Fribourg/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends FribourgBaseTestCase implements YasumiTestCaseInt /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/ChristmasDayTest.php b/tests/Switzerland/Fribourg/ChristmasDayTest.php index 3e218f977..5686aeaa4 100644 --- a/tests/Switzerland/Fribourg/ChristmasDayTest.php +++ b/tests/Switzerland/Fribourg/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Fribourg; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends FribourgBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/EasterMondayTest.php b/tests/Switzerland/Fribourg/EasterMondayTest.php index c8dd5fe95..6ebbefdfb 100644 --- a/tests/Switzerland/Fribourg/EasterMondayTest.php +++ b/tests/Switzerland/Fribourg/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends FribourgBaseTestCase implements YasumiTestCaseInt /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/FribourgTest.php b/tests/Switzerland/Fribourg/FribourgTest.php index d104885a2..c62bff047 100644 --- a/tests/Switzerland/Fribourg/FribourgTest.php +++ b/tests/Switzerland/Fribourg/FribourgTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Fribourg; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class FribourgTest extends FribourgBaseTestCase /** * Tests if all official holidays in Fribourg (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Fribourg (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -55,7 +56,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Fribourg (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -69,7 +70,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Fribourg (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -78,7 +79,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Fribourg (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -87,7 +88,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Fribourg (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Fribourg/GoodFridayTest.php b/tests/Switzerland/Fribourg/GoodFridayTest.php index 3a7455cd8..e4ad50357 100644 --- a/tests/Switzerland/Fribourg/GoodFridayTest.php +++ b/tests/Switzerland/Fribourg/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends FribourgBaseTestCase implements YasumiTestCaseInter /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Fribourg/NewYearsDayTest.php b/tests/Switzerland/Fribourg/NewYearsDayTest.php index 69bb74d3e..6d03301d6 100644 --- a/tests/Switzerland/Fribourg/NewYearsDayTest.php +++ b/tests/Switzerland/Fribourg/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Fribourg; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends FribourgBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Fribourg/PentecostMondayTest.php b/tests/Switzerland/Fribourg/PentecostMondayTest.php index 682f5a393..af8ec45eb 100644 --- a/tests/Switzerland/Fribourg/PentecostMondayTest.php +++ b/tests/Switzerland/Fribourg/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends FribourgBaseTestCase implements YasumiTestCase /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/AscensionDayTest.php b/tests/Switzerland/Geneva/AscensionDayTest.php index 1b7693bec..8c4ba7f48 100644 --- a/tests/Switzerland/Geneva/AscensionDayTest.php +++ b/tests/Switzerland/Geneva/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends GenevaBaseTestCase implements YasumiTestCaseInter /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/ChristmasDayTest.php b/tests/Switzerland/Geneva/ChristmasDayTest.php index 6d347067a..318b0fc88 100644 --- a/tests/Switzerland/Geneva/ChristmasDayTest.php +++ b/tests/Switzerland/Geneva/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Geneva; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends GenevaBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/EasterMondayTest.php b/tests/Switzerland/Geneva/EasterMondayTest.php index d6756cf64..ed1f90741 100644 --- a/tests/Switzerland/Geneva/EasterMondayTest.php +++ b/tests/Switzerland/Geneva/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends GenevaBaseTestCase implements YasumiTestCaseInter /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/GenevaTest.php b/tests/Switzerland/Geneva/GenevaTest.php index 8576e74f8..001f9b5b3 100644 --- a/tests/Switzerland/Geneva/GenevaTest.php +++ b/tests/Switzerland/Geneva/GenevaTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Geneva; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class GenevaTest extends GenevaBaseTestCase /** * Tests if all official holidays in Geneva (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Geneva (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -61,7 +62,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Geneva (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -79,7 +80,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Geneva (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -88,7 +89,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Geneva (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -97,7 +98,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Geneva (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Geneva/GoodFridayTest.php b/tests/Switzerland/Geneva/GoodFridayTest.php index 15fa98fd2..5d42ab27a 100644 --- a/tests/Switzerland/Geneva/GoodFridayTest.php +++ b/tests/Switzerland/Geneva/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends GenevaBaseTestCase implements YasumiTestCaseInterfa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/JeuneGenevoisTest.php b/tests/Switzerland/Geneva/JeuneGenevoisTest.php index 5dcc25ce6..97b8e027e 100644 --- a/tests/Switzerland/Geneva/JeuneGenevoisTest.php +++ b/tests/Switzerland/Geneva/JeuneGenevoisTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,8 +33,8 @@ class JeuneGenevoisTest extends GenevaBaseTestCase implements YasumiTestCaseInte /** * Tests Jeune Genevois on or after 1966 * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testJeuneGenevoisOnAfter1966() { @@ -49,8 +51,8 @@ public function testJeuneGenevoisOnAfter1966() /** * Tests Jeune Genevois between 1870 and 1965 * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testJeuneGenevoisBetween1870And1965() { @@ -67,8 +69,8 @@ public function testJeuneGenevoisBetween1870And1965() /** * Tests Jeune Genevois between 1840 and 1869 * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testJeuneGenevoisBetween1840And1869() { @@ -84,7 +86,7 @@ public function testJeuneGenevoisBetween1840And1869() /** * Tests Jeune Genevois before 1840 - * @throws \ReflectionException + * @throws ReflectionException */ public function testJeuneGenevoisBefore1840() { @@ -94,7 +96,7 @@ public function testJeuneGenevoisBefore1840() /** * Tests translated name of Jeune Genevois. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -108,7 +110,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/NewYearsDayTest.php b/tests/Switzerland/Geneva/NewYearsDayTest.php index dcd6763c4..6187c0e16 100644 --- a/tests/Switzerland/Geneva/NewYearsDayTest.php +++ b/tests/Switzerland/Geneva/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Geneva; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends GenevaBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Geneva/PentecostMondayTest.php b/tests/Switzerland/Geneva/PentecostMondayTest.php index ce1d8d0cf..0e93f25ff 100644 --- a/tests/Switzerland/Geneva/PentecostMondayTest.php +++ b/tests/Switzerland/Geneva/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends GenevaBaseTestCase implements YasumiTestCaseIn /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php b/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php index 84e07713f..b9ce2715a 100644 --- a/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php +++ b/tests/Switzerland/Geneva/RestaurationGenevoiseTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class RestaurationGenevoiseTest extends GenevaBaseTestCase implements YasumiTest /** * Tests Restauration Genevoise. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testRestaurationGenevoiseAfter1813() { @@ -46,7 +48,7 @@ public function testRestaurationGenevoiseAfter1813() /** * Tests translated name of Restauration Genevoise. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -60,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/AllSaintsDayTest.php b/tests/Switzerland/Glarus/AllSaintsDayTest.php index 8cf5c0f1a..c34fdd213 100644 --- a/tests/Switzerland/Glarus/AllSaintsDayTest.php +++ b/tests/Switzerland/Glarus/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Glarus; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends GlarusBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAllSaintsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testAllSaintsDay($year, $expected) /** * Tests translated name of All Saints' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of All Saints' Day. * * @return array list of test dates for All Saints' Day - * @throws \Exception + * @throws Exception */ public function AllSaintsDayDataProvider(): array { diff --git a/tests/Switzerland/Glarus/AscensionDayTest.php b/tests/Switzerland/Glarus/AscensionDayTest.php index de0701ebf..866a9ddfa 100644 --- a/tests/Switzerland/Glarus/AscensionDayTest.php +++ b/tests/Switzerland/Glarus/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends GlarusBaseTestCase implements YasumiTestCaseInter /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/BerchtoldsTagTest.php b/tests/Switzerland/Glarus/BerchtoldsTagTest.php index 33fb69dff..d63898b98 100644 --- a/tests/Switzerland/Glarus/BerchtoldsTagTest.php +++ b/tests/Switzerland/Glarus/BerchtoldsTagTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class BerchtoldsTagTest extends GlarusBaseTestCase implements YasumiTestCaseInte /** * Tests BerchtoldsTag * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testBerchtoldsTag() { @@ -44,7 +46,7 @@ public function testBerchtoldsTag() /** * Tests translated name of BerchtoldsTag. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -58,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/ChristmasDayTest.php b/tests/Switzerland/Glarus/ChristmasDayTest.php index ae3b395c4..3a3d6c784 100644 --- a/tests/Switzerland/Glarus/ChristmasDayTest.php +++ b/tests/Switzerland/Glarus/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Glarus; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends GlarusBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/EasterMondayTest.php b/tests/Switzerland/Glarus/EasterMondayTest.php index ba5155acf..69476e034 100644 --- a/tests/Switzerland/Glarus/EasterMondayTest.php +++ b/tests/Switzerland/Glarus/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends GlarusBaseTestCase implements YasumiTestCaseInter /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/GlarusTest.php b/tests/Switzerland/Glarus/GlarusTest.php index ade009b5a..f2aab0331 100644 --- a/tests/Switzerland/Glarus/GlarusTest.php +++ b/tests/Switzerland/Glarus/GlarusTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Glarus; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class GlarusTest extends GlarusBaseTestCase /** * Tests if all official holidays in Glarus (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Glarus (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -59,7 +60,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Glarus (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -73,7 +74,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Glarus (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -82,7 +83,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Glarus (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -91,7 +92,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Glarus (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Glarus/GoodFridayTest.php b/tests/Switzerland/Glarus/GoodFridayTest.php index 587fe53e3..007aef383 100644 --- a/tests/Switzerland/Glarus/GoodFridayTest.php +++ b/tests/Switzerland/Glarus/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends GlarusBaseTestCase implements YasumiTestCaseInterfa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/NafelserFahrtTest.php b/tests/Switzerland/Glarus/NafelserFahrtTest.php index 0f1ff6255..78b039973 100644 --- a/tests/Switzerland/Glarus/NafelserFahrtTest.php +++ b/tests/Switzerland/Glarus/NafelserFahrtTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class NafelserFahrtTest extends GlarusBaseTestCase implements YasumiTestCaseInte /** * Tests Näfelser Fahrt on or after 1389 - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testNafelserFahrtOnAfter1389() { @@ -47,7 +49,7 @@ public function testNafelserFahrtOnAfter1389() /** * Tests Näfelser Fahrt before 1389 - * @throws \ReflectionException + * @throws ReflectionException */ public function testNafelserFahrtBefore1389() { @@ -57,7 +59,7 @@ public function testNafelserFahrtBefore1389() /** * Tests translated name of Näfelser Fahrt. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -71,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/NewYearsDayTest.php b/tests/Switzerland/Glarus/NewYearsDayTest.php index bfea1dd0c..72c84e91e 100644 --- a/tests/Switzerland/Glarus/NewYearsDayTest.php +++ b/tests/Switzerland/Glarus/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Glarus; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends GlarusBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Glarus/PentecostMondayTest.php b/tests/Switzerland/Glarus/PentecostMondayTest.php index bab326a1a..5932b5418 100644 --- a/tests/Switzerland/Glarus/PentecostMondayTest.php +++ b/tests/Switzerland/Glarus/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends GlarusBaseTestCase implements YasumiTestCaseIn /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Glarus/StStephensDayTest.php b/tests/Switzerland/Glarus/StStephensDayTest.php index 2ec0027f2..e4b26f3f8 100644 --- a/tests/Switzerland/Glarus/StStephensDayTest.php +++ b/tests/Switzerland/Glarus/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Glarus; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends GlarusBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/AscensionDayTest.php b/tests/Switzerland/Grisons/AscensionDayTest.php index 3702675d7..e6354ddc8 100644 --- a/tests/Switzerland/Grisons/AscensionDayTest.php +++ b/tests/Switzerland/Grisons/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends GrisonsBaseTestCase implements YasumiTestCaseInte /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/ChristmasDayTest.php b/tests/Switzerland/Grisons/ChristmasDayTest.php index b18f547dd..253543ca8 100644 --- a/tests/Switzerland/Grisons/ChristmasDayTest.php +++ b/tests/Switzerland/Grisons/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Grisons; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends GrisonsBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/EasterMondayTest.php b/tests/Switzerland/Grisons/EasterMondayTest.php index 2b61b1490..a2b9e6ccc 100644 --- a/tests/Switzerland/Grisons/EasterMondayTest.php +++ b/tests/Switzerland/Grisons/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends GrisonsBaseTestCase implements YasumiTestCaseInte /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/GoodFridayTest.php b/tests/Switzerland/Grisons/GoodFridayTest.php index 6b88ac619..f69fafb7c 100644 --- a/tests/Switzerland/Grisons/GoodFridayTest.php +++ b/tests/Switzerland/Grisons/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends GrisonsBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/GrisonsTest.php b/tests/Switzerland/Grisons/GrisonsTest.php index 9b0cd7ad4..901829334 100644 --- a/tests/Switzerland/Grisons/GrisonsTest.php +++ b/tests/Switzerland/Grisons/GrisonsTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Grisons; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class GrisonsTest extends GrisonsBaseTestCase /** * Tests if all official holidays in Grisons (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Grisons (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -56,7 +57,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Grisons (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -70,7 +71,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Grisons (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -79,7 +80,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Grisons (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -88,7 +89,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Grisons (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Grisons/NewYearsDayTest.php b/tests/Switzerland/Grisons/NewYearsDayTest.php index 49dd96157..9c26211c0 100644 --- a/tests/Switzerland/Grisons/NewYearsDayTest.php +++ b/tests/Switzerland/Grisons/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Grisons; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends GrisonsBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Grisons/PentecostMondayTest.php b/tests/Switzerland/Grisons/PentecostMondayTest.php index 0a13bf1a2..54e6113b5 100644 --- a/tests/Switzerland/Grisons/PentecostMondayTest.php +++ b/tests/Switzerland/Grisons/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends GrisonsBaseTestCase implements YasumiTestCaseI /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Grisons/StStephensDayTest.php b/tests/Switzerland/Grisons/StStephensDayTest.php index 922528591..9465fe260 100644 --- a/tests/Switzerland/Grisons/StStephensDayTest.php +++ b/tests/Switzerland/Grisons/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Grisons; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends GrisonsBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/AllSaintsDayTest.php b/tests/Switzerland/Jura/AllSaintsDayTest.php index 6748b39ac..486e993e7 100644 --- a/tests/Switzerland/Jura/AllSaintsDayTest.php +++ b/tests/Switzerland/Jura/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Jura; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends JuraBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAllSaintsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testAllSaintsDay($year, $expected) /** * Tests translated name of All Saints' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of All Saints' Day. * * @return array list of test dates for All Saints' Day - * @throws \Exception + * @throws Exception */ public function AllSaintsDayDataProvider(): array { diff --git a/tests/Switzerland/Jura/AscensionDayTest.php b/tests/Switzerland/Jura/AscensionDayTest.php index fa9a5e342..b98438d13 100644 --- a/tests/Switzerland/Jura/AscensionDayTest.php +++ b/tests/Switzerland/Jura/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends JuraBaseTestCase implements YasumiTestCaseInterfa /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/AssumptionOfMaryTest.php b/tests/Switzerland/Jura/AssumptionOfMaryTest.php index 9575776e4..b551fa572 100644 --- a/tests/Switzerland/Jura/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Jura/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Jura; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends JuraBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAssumptionOfMary($year, $expected) { @@ -43,7 +45,7 @@ public function testAssumptionOfMary($year, $expected) /** * Tests translated name of the day of the Assumption of Mary. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of the day of the Assumption of Mary. * * @return array list of test dates for the day of the Assumption of Mary - * @throws \Exception + * @throws Exception */ public function AssumptionOfMaryDataProvider(): array { diff --git a/tests/Switzerland/Jura/BerchtoldsTagTest.php b/tests/Switzerland/Jura/BerchtoldsTagTest.php index 8df4b3343..f7019d2c8 100644 --- a/tests/Switzerland/Jura/BerchtoldsTagTest.php +++ b/tests/Switzerland/Jura/BerchtoldsTagTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class BerchtoldsTagTest extends JuraBaseTestCase implements YasumiTestCaseInterf /** * Tests BerchtoldsTag * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testBerchtoldsTag() { @@ -44,7 +46,7 @@ public function testBerchtoldsTag() /** * Tests translated name of BerchtoldsTag. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -58,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/ChristmasDayTest.php b/tests/Switzerland/Jura/ChristmasDayTest.php index be317e71e..8d55ffda0 100644 --- a/tests/Switzerland/Jura/ChristmasDayTest.php +++ b/tests/Switzerland/Jura/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Jura; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends JuraBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/CorpusChristiTest.php b/tests/Switzerland/Jura/CorpusChristiTest.php index 096750be7..a67228ec7 100644 --- a/tests/Switzerland/Jura/CorpusChristiTest.php +++ b/tests/Switzerland/Jura/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Jura; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends JuraBaseTestCase implements YasumiTestCaseInterf /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/EasterMondayTest.php b/tests/Switzerland/Jura/EasterMondayTest.php index b3ceb36c3..85f00f8df 100644 --- a/tests/Switzerland/Jura/EasterMondayTest.php +++ b/tests/Switzerland/Jura/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends JuraBaseTestCase implements YasumiTestCaseInterfa /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/GoodFridayTest.php b/tests/Switzerland/Jura/GoodFridayTest.php index 5b41e66b0..e70dfb947 100644 --- a/tests/Switzerland/Jura/GoodFridayTest.php +++ b/tests/Switzerland/Jura/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends JuraBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/JuraTest.php b/tests/Switzerland/Jura/JuraTest.php index 21ce77f7b..fc4462906 100644 --- a/tests/Switzerland/Jura/JuraTest.php +++ b/tests/Switzerland/Jura/JuraTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Jura; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class JuraTest extends JuraBaseTestCase /** * Tests if all official holidays in Jura (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Jura (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -61,7 +62,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Jura (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -75,7 +76,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Jura (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -84,7 +85,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Jura (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -93,7 +94,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Jura (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Jura/NewYearsDayTest.php b/tests/Switzerland/Jura/NewYearsDayTest.php index 659161275..b89912f74 100644 --- a/tests/Switzerland/Jura/NewYearsDayTest.php +++ b/tests/Switzerland/Jura/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Jura; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends JuraBaseTestCase implements YasumiTestCaseInterfac * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Jura/PentecostMondayTest.php b/tests/Switzerland/Jura/PentecostMondayTest.php index 62fc84892..4d6b3216e 100644 --- a/tests/Switzerland/Jura/PentecostMondayTest.php +++ b/tests/Switzerland/Jura/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends JuraBaseTestCase implements YasumiTestCaseInte /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/PlebisciteJurassienTest.php b/tests/Switzerland/Jura/PlebisciteJurassienTest.php index bbe904701..f1515dbd4 100644 --- a/tests/Switzerland/Jura/PlebisciteJurassienTest.php +++ b/tests/Switzerland/Jura/PlebisciteJurassienTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class PlebisciteJurassienTest extends JuraBaseTestCase implements YasumiTestCase /** * Tests Plébiscite jurassien on or after 1975. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testInstaurationRepubliqueOnAfter1975() { @@ -50,7 +52,7 @@ public function testInstaurationRepubliqueOnAfter1975() /** * Tests Plébiscite jurassien before 1975. - * @throws \ReflectionException + * @throws ReflectionException */ public function testInstaurationRepubliqueBefore1975() { @@ -63,7 +65,7 @@ public function testInstaurationRepubliqueBefore1975() /** * Tests translated name of Plébiscite jurassien. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Jura/WorkersDayTest.php b/tests/Switzerland/Jura/WorkersDayTest.php index 3b498657e..fde705f64 100644 --- a/tests/Switzerland/Jura/WorkersDayTest.php +++ b/tests/Switzerland/Jura/WorkersDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class WorkersDayTest extends JuraBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -48,7 +50,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -65,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -79,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/AllSaintsDayTest.php b/tests/Switzerland/Lucerne/AllSaintsDayTest.php index a2cbdfd74..06cbd8b68 100644 --- a/tests/Switzerland/Lucerne/AllSaintsDayTest.php +++ b/tests/Switzerland/Lucerne/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Lucerne; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends LucerneBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAllSaintsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testAllSaintsDay($year, $expected) /** * Tests translated name of All Saints' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of All Saints' Day. * * @return array list of test dates for All Saints' Day - * @throws \Exception + * @throws Exception */ public function AllSaintsDayDataProvider(): array { diff --git a/tests/Switzerland/Lucerne/AscensionDayTest.php b/tests/Switzerland/Lucerne/AscensionDayTest.php index b1bce4638..eecde0297 100644 --- a/tests/Switzerland/Lucerne/AscensionDayTest.php +++ b/tests/Switzerland/Lucerne/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends LucerneBaseTestCase implements YasumiTestCaseInte /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php index 504a21139..dae8a8af5 100644 --- a/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Lucerne/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Lucerne; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends LucerneBaseTestCase implements YasumiTestCase * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAssumptionOfMary($year, $expected) { @@ -43,7 +45,7 @@ public function testAssumptionOfMary($year, $expected) /** * Tests translated name of the day of the Assumption of Mary. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of the day of the Assumption of Mary. * * @return array list of test dates for the day of the Assumption of Mary - * @throws \Exception + * @throws Exception */ public function AssumptionOfMaryDataProvider(): array { diff --git a/tests/Switzerland/Lucerne/BerchtoldsTagTest.php b/tests/Switzerland/Lucerne/BerchtoldsTagTest.php index cfeb8b86c..1cbf0116f 100644 --- a/tests/Switzerland/Lucerne/BerchtoldsTagTest.php +++ b/tests/Switzerland/Lucerne/BerchtoldsTagTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class BerchtoldsTagTest extends LucerneBaseTestCase implements YasumiTestCaseInt /** * Tests BerchtoldsTag * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testBerchtoldsTag() { @@ -44,7 +46,7 @@ public function testBerchtoldsTag() /** * Tests translated name of BerchtoldsTag. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -58,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/ChristmasDayTest.php b/tests/Switzerland/Lucerne/ChristmasDayTest.php index b21b71350..32f1fac40 100644 --- a/tests/Switzerland/Lucerne/ChristmasDayTest.php +++ b/tests/Switzerland/Lucerne/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Lucerne; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends LucerneBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/CorpusChristiTest.php b/tests/Switzerland/Lucerne/CorpusChristiTest.php index dea7e1285..8b936f46b 100644 --- a/tests/Switzerland/Lucerne/CorpusChristiTest.php +++ b/tests/Switzerland/Lucerne/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Lucerne; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends LucerneBaseTestCase implements YasumiTestCaseInt /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/EasterMondayTest.php b/tests/Switzerland/Lucerne/EasterMondayTest.php index dde3582a2..a8ff51ab9 100644 --- a/tests/Switzerland/Lucerne/EasterMondayTest.php +++ b/tests/Switzerland/Lucerne/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends LucerneBaseTestCase implements YasumiTestCaseInte /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/GoodFridayTest.php b/tests/Switzerland/Lucerne/GoodFridayTest.php index 4dd256572..094b3f755 100644 --- a/tests/Switzerland/Lucerne/GoodFridayTest.php +++ b/tests/Switzerland/Lucerne/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends LucerneBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php index 882f05615..e49476bc3 100644 --- a/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Lucerne/ImmaculateConceptionTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Lucerne; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ImmaculateConceptionTest extends LucerneBaseTestCase implements YasumiTest * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/LucerneTest.php b/tests/Switzerland/Lucerne/LucerneTest.php index 01a875e61..d159e3513 100644 --- a/tests/Switzerland/Lucerne/LucerneTest.php +++ b/tests/Switzerland/Lucerne/LucerneTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Lucerne; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class LucerneTest extends LucerneBaseTestCase /** * Tests if all official holidays in Lucerne (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Lucerne (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -61,7 +62,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Lucerne (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -75,7 +76,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Lucerne (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -84,7 +85,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Lucerne (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -93,7 +94,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Lucerne (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Lucerne/NewYearsDayTest.php b/tests/Switzerland/Lucerne/NewYearsDayTest.php index 183b000f0..00697d200 100644 --- a/tests/Switzerland/Lucerne/NewYearsDayTest.php +++ b/tests/Switzerland/Lucerne/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Lucerne; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends LucerneBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Lucerne/PentecostMondayTest.php b/tests/Switzerland/Lucerne/PentecostMondayTest.php index 990b5f904..8e45fddd0 100644 --- a/tests/Switzerland/Lucerne/PentecostMondayTest.php +++ b/tests/Switzerland/Lucerne/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends LucerneBaseTestCase implements YasumiTestCaseI /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Lucerne/StStephensDayTest.php b/tests/Switzerland/Lucerne/StStephensDayTest.php index 11cf5000e..7cf2f1ea1 100644 --- a/tests/Switzerland/Lucerne/StStephensDayTest.php +++ b/tests/Switzerland/Lucerne/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Lucerne; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends LucerneBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/AscensionDayTest.php b/tests/Switzerland/Neuchatel/AscensionDayTest.php index d68e10e89..f7e79d031 100644 --- a/tests/Switzerland/Neuchatel/AscensionDayTest.php +++ b/tests/Switzerland/Neuchatel/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends NeuchatelBaseTestCase implements YasumiTestCaseIn /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/BerchtoldsTagTest.php b/tests/Switzerland/Neuchatel/BerchtoldsTagTest.php index 51d1ee60b..af0858284 100644 --- a/tests/Switzerland/Neuchatel/BerchtoldsTagTest.php +++ b/tests/Switzerland/Neuchatel/BerchtoldsTagTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class BerchtoldsTagTest extends NeuchatelBaseTestCase implements YasumiTestCaseI /** * Tests BerchtoldsTag * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testBerchtoldsTag() { @@ -44,7 +46,7 @@ public function testBerchtoldsTag() /** * Tests translated name of BerchtoldsTag. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -58,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/BettagsMontagTest.php b/tests/Switzerland/Neuchatel/BettagsMontagTest.php index aed0f2650..17dc851cf 100644 --- a/tests/Switzerland/Neuchatel/BettagsMontagTest.php +++ b/tests/Switzerland/Neuchatel/BettagsMontagTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,8 +33,8 @@ class BettagsMontagTest extends NeuchatelBaseTestCase implements YasumiTestCaseI /** * Tests Bettags Montag on or after 1832 * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testBettagsMontagOnAfter1832() { @@ -48,7 +50,7 @@ public function testBettagsMontagOnAfter1832() /** * Tests Bettags Montag before 1832 - * @throws \ReflectionException + * @throws ReflectionException */ public function testBettagsMontagBefore1832() { @@ -58,7 +60,7 @@ public function testBettagsMontagBefore1832() /** * Tests translated name of Bettags Montag. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -72,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/ChristmasDayTest.php b/tests/Switzerland/Neuchatel/ChristmasDayTest.php index eae9f527d..7b9027109 100644 --- a/tests/Switzerland/Neuchatel/ChristmasDayTest.php +++ b/tests/Switzerland/Neuchatel/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Neuchatel; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends NeuchatelBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/EasterMondayTest.php b/tests/Switzerland/Neuchatel/EasterMondayTest.php index 9b59bc15e..30f928e5e 100644 --- a/tests/Switzerland/Neuchatel/EasterMondayTest.php +++ b/tests/Switzerland/Neuchatel/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends NeuchatelBaseTestCase implements YasumiTestCaseIn /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/GoodFridayTest.php b/tests/Switzerland/Neuchatel/GoodFridayTest.php index 86cd6135e..ebb5ee279 100644 --- a/tests/Switzerland/Neuchatel/GoodFridayTest.php +++ b/tests/Switzerland/Neuchatel/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends NeuchatelBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php b/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php index 258385937..8087d7a93 100644 --- a/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php +++ b/tests/Switzerland/Neuchatel/InstaurationRepubliqueTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class InstaurationRepubliqueTest extends NeuchatelBaseTestCase implements Yasumi /** * Tests Instauration de la République on or after 1849. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testInstaurationRepubliqueOnAfter1849() { @@ -50,7 +52,7 @@ public function testInstaurationRepubliqueOnAfter1849() /** * Tests Instauration de la République before 1849. - * @throws \ReflectionException + * @throws ReflectionException */ public function testInstaurationRepubliqueBefore1849() { @@ -63,7 +65,7 @@ public function testInstaurationRepubliqueBefore1849() /** * Tests translated name of Instauration de la République. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/NeuchatelTest.php b/tests/Switzerland/Neuchatel/NeuchatelTest.php index 116322e89..bf27f041e 100644 --- a/tests/Switzerland/Neuchatel/NeuchatelTest.php +++ b/tests/Switzerland/Neuchatel/NeuchatelTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Neuchatel; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class NeuchatelTest extends NeuchatelBaseTestCase /** * Tests if all official holidays in Neuchatel (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Neuchatel (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -59,7 +60,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Neuchatel (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -73,7 +74,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Neuchatel (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -82,7 +83,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Neuchatel (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -91,7 +92,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Neuchatel (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Neuchatel/NewYearsDayTest.php b/tests/Switzerland/Neuchatel/NewYearsDayTest.php index c8af9d383..e5a16b637 100644 --- a/tests/Switzerland/Neuchatel/NewYearsDayTest.php +++ b/tests/Switzerland/Neuchatel/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Neuchatel; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends NeuchatelBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Neuchatel/PentecostMondayTest.php b/tests/Switzerland/Neuchatel/PentecostMondayTest.php index 5304750f9..8e0a5a021 100644 --- a/tests/Switzerland/Neuchatel/PentecostMondayTest.php +++ b/tests/Switzerland/Neuchatel/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends NeuchatelBaseTestCase implements YasumiTestCas /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Neuchatel/WorkersDayTest.php b/tests/Switzerland/Neuchatel/WorkersDayTest.php index c393d56ce..ef1c60b2b 100644 --- a/tests/Switzerland/Neuchatel/WorkersDayTest.php +++ b/tests/Switzerland/Neuchatel/WorkersDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class WorkersDayTest extends NeuchatelBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -48,7 +50,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -65,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -79,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php index 0dba265bd..504dbdf8f 100644 --- a/tests/Switzerland/Nidwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Nidwalden/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Nidwalden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAllSaintsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testAllSaintsDay($year, $expected) /** * Tests translated name of All Saints' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of All Saints' Day. * * @return array list of test dates for All Saints' Day - * @throws \Exception + * @throws Exception */ public function AllSaintsDayDataProvider(): array { diff --git a/tests/Switzerland/Nidwalden/AscensionDayTest.php b/tests/Switzerland/Nidwalden/AscensionDayTest.php index 4dcb85569..d46f75088 100644 --- a/tests/Switzerland/Nidwalden/AscensionDayTest.php +++ b/tests/Switzerland/Nidwalden/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseIn /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php index be7b8a42b..e7a19853a 100644 --- a/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Nidwalden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends NidwaldenBaseTestCase implements YasumiTestCa * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAssumptionOfMary($year, $expected) { @@ -43,7 +45,7 @@ public function testAssumptionOfMary($year, $expected) /** * Tests translated name of the day of the Assumption of Mary. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of the day of the Assumption of Mary. * * @return array list of test dates for the day of the Assumption of Mary - * @throws \Exception + * @throws Exception */ public function AssumptionOfMaryDataProvider(): array { diff --git a/tests/Switzerland/Nidwalden/ChristmasDayTest.php b/tests/Switzerland/Nidwalden/ChristmasDayTest.php index 9c8128b78..bb6736d52 100644 --- a/tests/Switzerland/Nidwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Nidwalden/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Nidwalden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/CorpusChristiTest.php b/tests/Switzerland/Nidwalden/CorpusChristiTest.php index a97cda2e6..ae37669f8 100644 --- a/tests/Switzerland/Nidwalden/CorpusChristiTest.php +++ b/tests/Switzerland/Nidwalden/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Nidwalden; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends NidwaldenBaseTestCase implements YasumiTestCaseI /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/EasterMondayTest.php b/tests/Switzerland/Nidwalden/EasterMondayTest.php index ab15cc62c..07b2a4a5e 100644 --- a/tests/Switzerland/Nidwalden/EasterMondayTest.php +++ b/tests/Switzerland/Nidwalden/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends NidwaldenBaseTestCase implements YasumiTestCaseIn /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/GoodFridayTest.php b/tests/Switzerland/Nidwalden/GoodFridayTest.php index 8fbbf2880..c37b8347a 100644 --- a/tests/Switzerland/Nidwalden/GoodFridayTest.php +++ b/tests/Switzerland/Nidwalden/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php index e987e7ce6..f0a1efb1d 100644 --- a/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Nidwalden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ImmaculateConceptionTest extends NidwaldenBaseTestCase implements YasumiTe * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/NewYearsDayTest.php b/tests/Switzerland/Nidwalden/NewYearsDayTest.php index 4973739f4..0ab92cd99 100644 --- a/tests/Switzerland/Nidwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Nidwalden/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Nidwalden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Nidwalden/NidwaldenTest.php b/tests/Switzerland/Nidwalden/NidwaldenTest.php index d89afd12d..552d9fc22 100644 --- a/tests/Switzerland/Nidwalden/NidwaldenTest.php +++ b/tests/Switzerland/Nidwalden/NidwaldenTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Nidwalden; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class NidwaldenTest extends NidwaldenBaseTestCase /** * Tests if all official holidays in Nidwalden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Nidwalden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -61,7 +62,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Nidwalden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -75,7 +76,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Nidwalden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -84,7 +85,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Nidwalden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -93,7 +94,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Nidwalden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Nidwalden/PentecostMondayTest.php b/tests/Switzerland/Nidwalden/PentecostMondayTest.php index bd2510749..294a70de6 100644 --- a/tests/Switzerland/Nidwalden/PentecostMondayTest.php +++ b/tests/Switzerland/Nidwalden/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends NidwaldenBaseTestCase implements YasumiTestCas /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/StJosephDayTest.php b/tests/Switzerland/Nidwalden/StJosephDayTest.php index 192a6018a..b6be7f7a8 100644 --- a/tests/Switzerland/Nidwalden/StJosephDayTest.php +++ b/tests/Switzerland/Nidwalden/StJosephDayTest.php @@ -12,6 +12,9 @@ namespace Yasumi\tests\Switzerland\Nidwalden; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,9 +37,9 @@ class StJosephDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseInt * @dataProvider StJosephDayDataProvider * * @param int $year the year for which St. Joseph's Day needs to be tested - * @param \DateTime $expected the expected date + * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testStJosephDay($year, $expected) { @@ -47,7 +50,7 @@ public function testStJosephDay($year, $expected) * Returns a list of random test dates used for assertion of St. Joseph's Day. * * @return array list of test dates for St. Joseph's Day - * @throws \Exception + * @throws Exception */ public function StJosephDayDataProvider(): array { @@ -56,7 +59,7 @@ public function StJosephDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -70,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Nidwalden/StStephensDayTest.php b/tests/Switzerland/Nidwalden/StStephensDayTest.php index 3a7df9a24..f874d03c5 100644 --- a/tests/Switzerland/Nidwalden/StStephensDayTest.php +++ b/tests/Switzerland/Nidwalden/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Nidwalden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends NidwaldenBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/AllSaintsDayTest.php b/tests/Switzerland/Obwalden/AllSaintsDayTest.php index 0ad35f822..f9a36439b 100644 --- a/tests/Switzerland/Obwalden/AllSaintsDayTest.php +++ b/tests/Switzerland/Obwalden/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Obwalden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAllSaintsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testAllSaintsDay($year, $expected) /** * Tests translated name of All Saints' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of All Saints' Day. * * @return array list of test dates for All Saints' Day - * @throws \Exception + * @throws Exception */ public function AllSaintsDayDataProvider(): array { diff --git a/tests/Switzerland/Obwalden/AscensionDayTest.php b/tests/Switzerland/Obwalden/AscensionDayTest.php index ac021274a..5f99d8365 100644 --- a/tests/Switzerland/Obwalden/AscensionDayTest.php +++ b/tests/Switzerland/Obwalden/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInt /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php index f1f4a6260..ddcf9354e 100644 --- a/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Obwalden/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Obwalden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends ObwaldenBaseTestCase implements YasumiTestCas * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAssumptionOfMary($year, $expected) { @@ -43,7 +45,7 @@ public function testAssumptionOfMary($year, $expected) /** * Tests translated name of the day of the Assumption of Mary. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of the day of the Assumption of Mary. * * @return array list of test dates for the day of the Assumption of Mary - * @throws \Exception + * @throws Exception */ public function AssumptionOfMaryDataProvider(): array { diff --git a/tests/Switzerland/Obwalden/BerchtoldsTagTest.php b/tests/Switzerland/Obwalden/BerchtoldsTagTest.php index 1239edc29..3eb4f3599 100644 --- a/tests/Switzerland/Obwalden/BerchtoldsTagTest.php +++ b/tests/Switzerland/Obwalden/BerchtoldsTagTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class BerchtoldsTagTest extends ObwaldenBaseTestCase implements YasumiTestCaseIn /** * Tests BerchtoldsTag * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testBerchtoldsTag() { @@ -44,7 +46,7 @@ public function testBerchtoldsTag() /** * Tests translated name of BerchtoldsTag. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -58,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php index 351f63b6c..87f75d0f8 100644 --- a/tests/Switzerland/Obwalden/BruderKlausenFestTest.php +++ b/tests/Switzerland/Obwalden/BruderKlausenFestTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class BruderKlausenFestTest extends ObwaldenBaseTestCase implements YasumiTestCa /** * Tests Bruder-Klausen-Fest on or after 1947 * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testBruderKlausenFestOnAfter1947() { @@ -45,8 +47,8 @@ public function testBruderKlausenFestOnAfter1947() /** * Tests Bruder-Klausen-Fest between 1649 and 1946 * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testBruderKlausenFestBetween1649And1946() { @@ -59,7 +61,7 @@ public function testBruderKlausenFestBetween1649And1946() /** * Tests Bruder-Klausen-Fest before 1648 - * @throws \ReflectionException + * @throws ReflectionException */ public function testBruderKlausenFestBefore1648() { @@ -69,7 +71,7 @@ public function testBruderKlausenFestBefore1648() /** * Tests translated name of Bruder-Klausen-Fest. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -83,7 +85,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/ChristmasDayTest.php b/tests/Switzerland/Obwalden/ChristmasDayTest.php index eb2183586..ae05c50b2 100644 --- a/tests/Switzerland/Obwalden/ChristmasDayTest.php +++ b/tests/Switzerland/Obwalden/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Obwalden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/CorpusChristiTest.php b/tests/Switzerland/Obwalden/CorpusChristiTest.php index 6c5372fd0..c835889f4 100644 --- a/tests/Switzerland/Obwalden/CorpusChristiTest.php +++ b/tests/Switzerland/Obwalden/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Obwalden; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -31,8 +33,8 @@ class CorpusChristiTest extends ObwaldenBaseTestCase implements YasumiTestCaseIn /** * Tests Corpus Christi. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -47,7 +49,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -61,7 +63,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/EasterMondayTest.php b/tests/Switzerland/Obwalden/EasterMondayTest.php index aa6f5b5f1..841952e3b 100644 --- a/tests/Switzerland/Obwalden/EasterMondayTest.php +++ b/tests/Switzerland/Obwalden/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInt /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/GoodFridayTest.php b/tests/Switzerland/Obwalden/GoodFridayTest.php index 2c7c89a28..f2044d1a2 100644 --- a/tests/Switzerland/Obwalden/GoodFridayTest.php +++ b/tests/Switzerland/Obwalden/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInter /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php index 43e99fa2e..6298873f1 100644 --- a/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Obwalden/ImmaculateConceptionTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Obwalden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ImmaculateConceptionTest extends ObwaldenBaseTestCase implements YasumiTes * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/NewYearsDayTest.php b/tests/Switzerland/Obwalden/NewYearsDayTest.php index cceebab50..992eea671 100644 --- a/tests/Switzerland/Obwalden/NewYearsDayTest.php +++ b/tests/Switzerland/Obwalden/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Obwalden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Obwalden/ObwaldenTest.php b/tests/Switzerland/Obwalden/ObwaldenTest.php index 70ac0bac8..19d3ac505 100644 --- a/tests/Switzerland/Obwalden/ObwaldenTest.php +++ b/tests/Switzerland/Obwalden/ObwaldenTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Obwalden; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class ObwaldenTest extends ObwaldenBaseTestCase /** * Tests if all official holidays in Obwalden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Obwalden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -62,7 +63,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Obwalden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -76,7 +77,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Obwalden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -85,7 +86,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Obwalden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -94,7 +95,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Obwalden (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Obwalden/PentecostMondayTest.php b/tests/Switzerland/Obwalden/PentecostMondayTest.php index 3ad5c99b1..2739f7309 100644 --- a/tests/Switzerland/Obwalden/PentecostMondayTest.php +++ b/tests/Switzerland/Obwalden/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends ObwaldenBaseTestCase implements YasumiTestCase /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Obwalden/StStephensDayTest.php b/tests/Switzerland/Obwalden/StStephensDayTest.php index 12bcf300d..6ae3eca42 100644 --- a/tests/Switzerland/Obwalden/StStephensDayTest.php +++ b/tests/Switzerland/Obwalden/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Obwalden; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends ObwaldenBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/AscensionDayTest.php b/tests/Switzerland/Schaffhausen/AscensionDayTest.php index 71e446d88..c351a4f30 100644 --- a/tests/Switzerland/Schaffhausen/AscensionDayTest.php +++ b/tests/Switzerland/Schaffhausen/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends SchaffhausenBaseTestCase implements YasumiTestCas /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php b/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php index a4f6046b4..8f4c33ff1 100644 --- a/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php +++ b/tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class BerchtoldsTagTest extends SchaffhausenBaseTestCase implements YasumiTestCa /** * Tests BerchtoldsTag * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testBerchtoldsTag() { @@ -44,7 +46,7 @@ public function testBerchtoldsTag() /** * Tests translated name of BerchtoldsTag. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -58,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php index 2a3da075e..220c94b08 100644 --- a/tests/Switzerland/Schaffhausen/ChristmasDayTest.php +++ b/tests/Switzerland/Schaffhausen/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Schaffhausen; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends SchaffhausenBaseTestCase implements YasumiTestCas * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/EasterMondayTest.php b/tests/Switzerland/Schaffhausen/EasterMondayTest.php index dbae3e39f..f0eb16453 100644 --- a/tests/Switzerland/Schaffhausen/EasterMondayTest.php +++ b/tests/Switzerland/Schaffhausen/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends SchaffhausenBaseTestCase implements YasumiTestCas /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/GoodFridayTest.php b/tests/Switzerland/Schaffhausen/GoodFridayTest.php index 105bf57dc..08f41dc69 100644 --- a/tests/Switzerland/Schaffhausen/GoodFridayTest.php +++ b/tests/Switzerland/Schaffhausen/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends SchaffhausenBaseTestCase implements YasumiTestCaseI /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php index 01ce89980..78f77b620 100644 --- a/tests/Switzerland/Schaffhausen/NewYearsDayTest.php +++ b/tests/Switzerland/Schaffhausen/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Schaffhausen; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends SchaffhausenBaseTestCase implements YasumiTestCase * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Schaffhausen/PentecostMondayTest.php b/tests/Switzerland/Schaffhausen/PentecostMondayTest.php index afb8d2a81..4e859448b 100644 --- a/tests/Switzerland/Schaffhausen/PentecostMondayTest.php +++ b/tests/Switzerland/Schaffhausen/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends SchaffhausenBaseTestCase implements YasumiTest /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php index 2617669e7..ac25390ee 100644 --- a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php +++ b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Schaffhausen; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class SchaffhausenTest extends SchaffhausenBaseTestCase /** * Tests if all official holidays in Schaffhausen (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Schaffhausen (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -58,7 +59,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Schaffhausen (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -72,7 +73,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Schaffhausen (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -81,7 +82,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Schaffhausen (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -90,7 +91,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Schaffhausen (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Schaffhausen/StStephensDayTest.php b/tests/Switzerland/Schaffhausen/StStephensDayTest.php index 65f16dd57..cb3591130 100644 --- a/tests/Switzerland/Schaffhausen/StStephensDayTest.php +++ b/tests/Switzerland/Schaffhausen/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Schaffhausen; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends SchaffhausenBaseTestCase implements YasumiTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schaffhausen/WorkersDayTest.php b/tests/Switzerland/Schaffhausen/WorkersDayTest.php index ace4f852a..a3a53687f 100644 --- a/tests/Switzerland/Schaffhausen/WorkersDayTest.php +++ b/tests/Switzerland/Schaffhausen/WorkersDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class WorkersDayTest extends SchaffhausenBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -48,7 +50,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -65,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -79,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/AllSaintsDayTest.php b/tests/Switzerland/Schwyz/AllSaintsDayTest.php index 37a6d1931..8299f4d0a 100644 --- a/tests/Switzerland/Schwyz/AllSaintsDayTest.php +++ b/tests/Switzerland/Schwyz/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Schwyz; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAllSaintsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testAllSaintsDay($year, $expected) /** * Tests translated name of All Saints' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of All Saints' Day. * * @return array list of test dates for All Saints' Day - * @throws \Exception + * @throws Exception */ public function AllSaintsDayDataProvider(): array { diff --git a/tests/Switzerland/Schwyz/AscensionDayTest.php b/tests/Switzerland/Schwyz/AscensionDayTest.php index e8d7e0ddd..6a84d18ce 100644 --- a/tests/Switzerland/Schwyz/AscensionDayTest.php +++ b/tests/Switzerland/Schwyz/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInter /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php index cd0d11848..26851ef79 100644 --- a/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Schwyz/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Schwyz; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends SchwyzBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAssumptionOfMary($year, $expected) { @@ -43,7 +45,7 @@ public function testAssumptionOfMary($year, $expected) /** * Tests translated name of the day of the Assumption of Mary. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of the day of the Assumption of Mary. * * @return array list of test dates for the day of the Assumption of Mary - * @throws \Exception + * @throws Exception */ public function AssumptionOfMaryDataProvider(): array { diff --git a/tests/Switzerland/Schwyz/ChristmasDayTest.php b/tests/Switzerland/Schwyz/ChristmasDayTest.php index dcfd0efd4..ef44dda4c 100644 --- a/tests/Switzerland/Schwyz/ChristmasDayTest.php +++ b/tests/Switzerland/Schwyz/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Schwyz; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/CorpusChristiTest.php b/tests/Switzerland/Schwyz/CorpusChristiTest.php index fe2c4a605..aea714bdd 100644 --- a/tests/Switzerland/Schwyz/CorpusChristiTest.php +++ b/tests/Switzerland/Schwyz/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Schwyz; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends SchwyzBaseTestCase implements YasumiTestCaseInte /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/EasterMondayTest.php b/tests/Switzerland/Schwyz/EasterMondayTest.php index 822d78ed9..00b8b33d0 100644 --- a/tests/Switzerland/Schwyz/EasterMondayTest.php +++ b/tests/Switzerland/Schwyz/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends SchwyzBaseTestCase implements YasumiTestCaseInter /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/EpiphanyTest.php b/tests/Switzerland/Schwyz/EpiphanyTest.php index 4cf85a8dd..23b878d05 100644 --- a/tests/Switzerland/Schwyz/EpiphanyTest.php +++ b/tests/Switzerland/Schwyz/EpiphanyTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Schwyz; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,7 +37,7 @@ class EpiphanyTest extends SchwyzBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -46,7 +48,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -55,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -69,7 +71,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/GoodFridayTest.php b/tests/Switzerland/Schwyz/GoodFridayTest.php index 811136021..2eae95d77 100644 --- a/tests/Switzerland/Schwyz/GoodFridayTest.php +++ b/tests/Switzerland/Schwyz/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterfa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php index b0b9ddf1e..65864bbd8 100644 --- a/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Schwyz/ImmaculateConceptionTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Schwyz; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ImmaculateConceptionTest extends SchwyzBaseTestCase implements YasumiTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/NewYearsDayTest.php b/tests/Switzerland/Schwyz/NewYearsDayTest.php index eca9293b5..1f2adfccd 100644 --- a/tests/Switzerland/Schwyz/NewYearsDayTest.php +++ b/tests/Switzerland/Schwyz/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Schwyz; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Schwyz/PentecostMondayTest.php b/tests/Switzerland/Schwyz/PentecostMondayTest.php index 74fed62cd..5ee8dfe30 100644 --- a/tests/Switzerland/Schwyz/PentecostMondayTest.php +++ b/tests/Switzerland/Schwyz/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends SchwyzBaseTestCase implements YasumiTestCaseIn /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/SchwyzTest.php b/tests/Switzerland/Schwyz/SchwyzTest.php index e561e2545..d0e6ba9d5 100644 --- a/tests/Switzerland/Schwyz/SchwyzTest.php +++ b/tests/Switzerland/Schwyz/SchwyzTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Schwyz; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class SchwyzTest extends SchwyzBaseTestCase /** * Tests if all official holidays in Schwyz (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Schwyz (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -62,7 +63,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Schwyz (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -76,7 +77,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Schwyz (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -85,7 +86,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Schwyz (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -94,7 +95,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Schwyz (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Schwyz/StJosephDayTest.php b/tests/Switzerland/Schwyz/StJosephDayTest.php index 57d35de3f..47197648a 100644 --- a/tests/Switzerland/Schwyz/StJosephDayTest.php +++ b/tests/Switzerland/Schwyz/StJosephDayTest.php @@ -12,6 +12,9 @@ namespace Yasumi\tests\Switzerland\Schwyz; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,9 +37,9 @@ class StJosephDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInterf * @dataProvider StJosephDayDataProvider * * @param int $year the year for which St. Joseph's Day needs to be tested - * @param \DateTime $expected the expected date + * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testStJosephDay($year, $expected) { @@ -47,7 +50,7 @@ public function testStJosephDay($year, $expected) * Returns a list of random test dates used for assertion of St. Joseph's Day. * * @return array list of test dates for St. Joseph's Day - * @throws \Exception + * @throws Exception */ public function StJosephDayDataProvider(): array { @@ -56,7 +59,7 @@ public function StJosephDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -70,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Schwyz/StStephensDayTest.php b/tests/Switzerland/Schwyz/StStephensDayTest.php index f312c7943..45bfed81f 100644 --- a/tests/Switzerland/Schwyz/StStephensDayTest.php +++ b/tests/Switzerland/Schwyz/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Schwyz; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends SchwyzBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Solothurn/AscensionDayTest.php b/tests/Switzerland/Solothurn/AscensionDayTest.php index c033ee5d2..559cd8f1f 100644 --- a/tests/Switzerland/Solothurn/AscensionDayTest.php +++ b/tests/Switzerland/Solothurn/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends SolothurnBaseTestCase implements YasumiTestCaseIn /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Solothurn/BerchtoldsTagTest.php b/tests/Switzerland/Solothurn/BerchtoldsTagTest.php index 044b53232..5967b8095 100644 --- a/tests/Switzerland/Solothurn/BerchtoldsTagTest.php +++ b/tests/Switzerland/Solothurn/BerchtoldsTagTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class BerchtoldsTagTest extends SolothurnBaseTestCase implements YasumiTestCaseI /** * Tests BerchtoldsTag * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testBerchtoldsTag() { @@ -44,7 +46,7 @@ public function testBerchtoldsTag() /** * Tests translated name of BerchtoldsTag. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -58,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Solothurn/ChristmasDayTest.php b/tests/Switzerland/Solothurn/ChristmasDayTest.php index 82a5662af..73932d6e5 100644 --- a/tests/Switzerland/Solothurn/ChristmasDayTest.php +++ b/tests/Switzerland/Solothurn/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Solothurn; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends SolothurnBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Solothurn/GoodFridayTest.php b/tests/Switzerland/Solothurn/GoodFridayTest.php index 7c9888014..1ff7224e5 100644 --- a/tests/Switzerland/Solothurn/GoodFridayTest.php +++ b/tests/Switzerland/Solothurn/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends SolothurnBaseTestCase implements YasumiTestCaseInte /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Solothurn/NewYearsDayTest.php b/tests/Switzerland/Solothurn/NewYearsDayTest.php index 69e4f45ef..b8ab8a4dc 100644 --- a/tests/Switzerland/Solothurn/NewYearsDayTest.php +++ b/tests/Switzerland/Solothurn/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Solothurn; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends SolothurnBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Solothurn/SolothurnTest.php b/tests/Switzerland/Solothurn/SolothurnTest.php index 58229e95c..f469d6778 100644 --- a/tests/Switzerland/Solothurn/SolothurnTest.php +++ b/tests/Switzerland/Solothurn/SolothurnTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Solothurn; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class SolothurnTest extends SolothurnBaseTestCase /** * Tests if all official holidays in Solothurn (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -40,7 +41,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Solothurn (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -55,7 +56,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Solothurn (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -69,7 +70,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Solothurn (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -78,7 +79,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Solothurn (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -87,7 +88,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Solothurn (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/StGallen/AllSaintsDayTest.php b/tests/Switzerland/StGallen/AllSaintsDayTest.php index dd66b9ffb..c39edfe2c 100644 --- a/tests/Switzerland/StGallen/AllSaintsDayTest.php +++ b/tests/Switzerland/StGallen/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\StGallen; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends StGallenBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAllSaintsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testAllSaintsDay($year, $expected) /** * Tests translated name of All Saints' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of All Saints' Day. * * @return array list of test dates for All Saints' Day - * @throws \Exception + * @throws Exception */ public function AllSaintsDayDataProvider(): array { diff --git a/tests/Switzerland/StGallen/AscensionDayTest.php b/tests/Switzerland/StGallen/AscensionDayTest.php index f90458006..5bc5e32a0 100644 --- a/tests/Switzerland/StGallen/AscensionDayTest.php +++ b/tests/Switzerland/StGallen/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends StGallenBaseTestCase implements YasumiTestCaseInt /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/ChristmasDayTest.php b/tests/Switzerland/StGallen/ChristmasDayTest.php index 8e895f031..afe18282a 100644 --- a/tests/Switzerland/StGallen/ChristmasDayTest.php +++ b/tests/Switzerland/StGallen/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\StGallen; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends StGallenBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/EasterMondayTest.php b/tests/Switzerland/StGallen/EasterMondayTest.php index 2ca19955f..442ff01c9 100644 --- a/tests/Switzerland/StGallen/EasterMondayTest.php +++ b/tests/Switzerland/StGallen/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends StGallenBaseTestCase implements YasumiTestCaseInt /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/GoodFridayTest.php b/tests/Switzerland/StGallen/GoodFridayTest.php index 67c621105..fa6246941 100644 --- a/tests/Switzerland/StGallen/GoodFridayTest.php +++ b/tests/Switzerland/StGallen/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends StGallenBaseTestCase implements YasumiTestCaseInter /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/NewYearsDayTest.php b/tests/Switzerland/StGallen/NewYearsDayTest.php index e21ca07ea..78844e966 100644 --- a/tests/Switzerland/StGallen/NewYearsDayTest.php +++ b/tests/Switzerland/StGallen/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\StGallen; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends StGallenBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/StGallen/PentecostMondayTest.php b/tests/Switzerland/StGallen/PentecostMondayTest.php index 54c694c06..62f84562e 100644 --- a/tests/Switzerland/StGallen/PentecostMondayTest.php +++ b/tests/Switzerland/StGallen/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends StGallenBaseTestCase implements YasumiTestCase /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/StGallen/StGallenTest.php b/tests/Switzerland/StGallen/StGallenTest.php index 5857b0f8a..78f998c9a 100644 --- a/tests/Switzerland/StGallen/StGallenTest.php +++ b/tests/Switzerland/StGallen/StGallenTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\StGallen; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class StGallenTest extends StGallenBaseTestCase /** * Tests if all official holidays in St. Gallen (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in St. Gallen (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -57,7 +58,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in St. Gallen (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -71,7 +72,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in St. Gallen (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -80,7 +81,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in St. Gallen (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,7 +90,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in St. Gallen (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/StGallen/StStephensDayTest.php b/tests/Switzerland/StGallen/StStephensDayTest.php index 00c23a711..b0cdfc91c 100644 --- a/tests/Switzerland/StGallen/StStephensDayTest.php +++ b/tests/Switzerland/StGallen/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\StGallen; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends StGallenBaseTestCase implements YasumiTestCaseIn * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/SwissNationalDayTest.php b/tests/Switzerland/SwissNationalDayTest.php index bb7882fdf..01a2ffd84 100644 --- a/tests/Switzerland/SwissNationalDayTest.php +++ b/tests/Switzerland/SwissNationalDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -44,8 +46,8 @@ class SwissNationalDayTest extends SwitzerlandBaseTestCase implements YasumiTest /** * Tests National Day on or after 1994. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testNationalDayOnAfter1994() { @@ -60,9 +62,9 @@ public function testNationalDayOnAfter1994() /** * Tests National Day on or after 1899 and before 1994. - * @throws \ReflectionException - * @throws \Exception - * @throws \ReflectionException + * @throws ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testNationalDayOnAfter1899() { @@ -78,9 +80,9 @@ public function testNationalDayOnAfter1899() /** * Tests National Day on 1891 - * @throws \ReflectionException - * @throws \Exception - * @throws \ReflectionException + * @throws ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testNationalDayOn1891() { @@ -96,7 +98,7 @@ public function testNationalDayOn1891() /** * Tests National Day before 1891. - * @throws \ReflectionException + * @throws ReflectionException */ public function testNationalDayBefore1891() { @@ -109,7 +111,7 @@ public function testNationalDayBefore1891() /** * Tests National Day between 1891 and 1899. - * @throws \ReflectionException + * @throws ReflectionException */ public function testNationalDayBetween1891And1899() { @@ -119,7 +121,7 @@ public function testNationalDayBetween1891And1899() /** * Tests translated name of National Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -133,7 +135,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/SwitzerlandTest.php b/tests/Switzerland/SwitzerlandTest.php index a1a180172..1146ecefc 100644 --- a/tests/Switzerland/SwitzerlandTest.php +++ b/tests/Switzerland/SwitzerlandTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class SwitzerlandTest extends SwitzerlandBaseTestCase /** * Tests if all official holidays in Switzerland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Switzerland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -53,7 +54,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Switzerland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -62,7 +63,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Switzerland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -71,7 +72,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Switzerland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Thurgau/AscensionDayTest.php b/tests/Switzerland/Thurgau/AscensionDayTest.php index 94e86652e..ff2957659 100644 --- a/tests/Switzerland/Thurgau/AscensionDayTest.php +++ b/tests/Switzerland/Thurgau/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInte /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/BerchtoldsTagTest.php b/tests/Switzerland/Thurgau/BerchtoldsTagTest.php index 581961e22..00d9a254c 100644 --- a/tests/Switzerland/Thurgau/BerchtoldsTagTest.php +++ b/tests/Switzerland/Thurgau/BerchtoldsTagTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class BerchtoldsTagTest extends ThurgauBaseTestCase implements YasumiTestCaseInt /** * Tests BerchtoldsTag * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testBerchtoldsTag() { @@ -44,7 +46,7 @@ public function testBerchtoldsTag() /** * Tests translated name of BerchtoldsTag. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -58,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/ChristmasDayTest.php b/tests/Switzerland/Thurgau/ChristmasDayTest.php index 639b9a21e..5425da471 100644 --- a/tests/Switzerland/Thurgau/ChristmasDayTest.php +++ b/tests/Switzerland/Thurgau/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Thurgau; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/EasterMondayTest.php b/tests/Switzerland/Thurgau/EasterMondayTest.php index c058d40f2..9d00d8082 100644 --- a/tests/Switzerland/Thurgau/EasterMondayTest.php +++ b/tests/Switzerland/Thurgau/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends ThurgauBaseTestCase implements YasumiTestCaseInte /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/GoodFridayTest.php b/tests/Switzerland/Thurgau/GoodFridayTest.php index 2df96c8e3..cb0d4bb60 100644 --- a/tests/Switzerland/Thurgau/GoodFridayTest.php +++ b/tests/Switzerland/Thurgau/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends ThurgauBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/NewYearsDayTest.php b/tests/Switzerland/Thurgau/NewYearsDayTest.php index 35dabd6b4..cb03f9ef9 100644 --- a/tests/Switzerland/Thurgau/NewYearsDayTest.php +++ b/tests/Switzerland/Thurgau/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Thurgau; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Thurgau/PentecostMondayTest.php b/tests/Switzerland/Thurgau/PentecostMondayTest.php index fb3344250..3c2cea2da 100644 --- a/tests/Switzerland/Thurgau/PentecostMondayTest.php +++ b/tests/Switzerland/Thurgau/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends ThurgauBaseTestCase implements YasumiTestCaseI /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/StStephensDayTest.php b/tests/Switzerland/Thurgau/StStephensDayTest.php index 036d74525..180783b5e 100644 --- a/tests/Switzerland/Thurgau/StStephensDayTest.php +++ b/tests/Switzerland/Thurgau/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Thurgau; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Thurgau/ThurgauTest.php b/tests/Switzerland/Thurgau/ThurgauTest.php index 8e092ca96..3fb2f4cbc 100644 --- a/tests/Switzerland/Thurgau/ThurgauTest.php +++ b/tests/Switzerland/Thurgau/ThurgauTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Thurgau; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class ThurgauTest extends ThurgauBaseTestCase /** * Tests if all official holidays in Thurgau (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Thurgau (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -58,7 +59,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Thurgau (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -72,7 +73,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Thurgau (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -81,7 +82,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Thurgau (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -90,7 +91,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Thurgau (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Thurgau/WorkersDayTest.php b/tests/Switzerland/Thurgau/WorkersDayTest.php index 74344547e..ce1559e99 100644 --- a/tests/Switzerland/Thurgau/WorkersDayTest.php +++ b/tests/Switzerland/Thurgau/WorkersDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class WorkersDayTest extends ThurgauBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -48,7 +50,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -65,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -79,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/AllSaintsDayTest.php b/tests/Switzerland/Ticino/AllSaintsDayTest.php index 6ed2f48f9..74f72f075 100644 --- a/tests/Switzerland/Ticino/AllSaintsDayTest.php +++ b/tests/Switzerland/Ticino/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Ticino; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends TicinoBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAllSaintsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testAllSaintsDay($year, $expected) /** * Tests translated name of All Saints' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of All Saints' Day. * * @return array list of test dates for All Saints' Day - * @throws \Exception + * @throws Exception */ public function AllSaintsDayDataProvider(): array { diff --git a/tests/Switzerland/Ticino/AscensionDayTest.php b/tests/Switzerland/Ticino/AscensionDayTest.php index c0e17b22a..442c5275d 100644 --- a/tests/Switzerland/Ticino/AscensionDayTest.php +++ b/tests/Switzerland/Ticino/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends TicinoBaseTestCase implements YasumiTestCaseInter /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php index 93dadacd1..b758f11c7 100644 --- a/tests/Switzerland/Ticino/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Ticino/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Ticino; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends TicinoBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAssumptionOfMary($year, $expected) { @@ -43,7 +45,7 @@ public function testAssumptionOfMary($year, $expected) /** * Tests translated name of the day of the Assumption of Mary. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of the day of the Assumption of Mary. * * @return array list of test dates for the day of the Assumption of Mary - * @throws \Exception + * @throws Exception */ public function AssumptionOfMaryDataProvider(): array { diff --git a/tests/Switzerland/Ticino/ChristmasDayTest.php b/tests/Switzerland/Ticino/ChristmasDayTest.php index f717c2b66..c9c7cef2f 100644 --- a/tests/Switzerland/Ticino/ChristmasDayTest.php +++ b/tests/Switzerland/Ticino/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Ticino; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends TicinoBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/CorpusChristiTest.php b/tests/Switzerland/Ticino/CorpusChristiTest.php index afc35e3c9..ee49d908f 100644 --- a/tests/Switzerland/Ticino/CorpusChristiTest.php +++ b/tests/Switzerland/Ticino/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Ticino; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends TicinoBaseTestCase implements YasumiTestCaseInte /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/EasterMondayTest.php b/tests/Switzerland/Ticino/EasterMondayTest.php index fa65844a7..635026d03 100644 --- a/tests/Switzerland/Ticino/EasterMondayTest.php +++ b/tests/Switzerland/Ticino/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends TicinoBaseTestCase implements YasumiTestCaseInter /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/EpiphanyTest.php b/tests/Switzerland/Ticino/EpiphanyTest.php index 8e05ca73b..05f769c60 100644 --- a/tests/Switzerland/Ticino/EpiphanyTest.php +++ b/tests/Switzerland/Ticino/EpiphanyTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Ticino; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,7 +37,7 @@ class EpiphanyTest extends TicinoBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -46,7 +48,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -55,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -69,7 +71,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php index ba686645c..31f7ff97d 100644 --- a/tests/Switzerland/Ticino/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Ticino/ImmaculateConceptionTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Ticino; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ImmaculateConceptionTest extends TicinoBaseTestCase implements YasumiTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/NewYearsDayTest.php b/tests/Switzerland/Ticino/NewYearsDayTest.php index 3e9d8afb8..52b3f2f44 100644 --- a/tests/Switzerland/Ticino/NewYearsDayTest.php +++ b/tests/Switzerland/Ticino/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Ticino; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends TicinoBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Ticino/PentecostMondayTest.php b/tests/Switzerland/Ticino/PentecostMondayTest.php index cce3d2f9b..76ee864a7 100644 --- a/tests/Switzerland/Ticino/PentecostMondayTest.php +++ b/tests/Switzerland/Ticino/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends TicinoBaseTestCase implements YasumiTestCaseIn /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/StJosephDayTest.php b/tests/Switzerland/Ticino/StJosephDayTest.php index 3e112d5f4..08aa15b6b 100644 --- a/tests/Switzerland/Ticino/StJosephDayTest.php +++ b/tests/Switzerland/Ticino/StJosephDayTest.php @@ -12,6 +12,9 @@ namespace Yasumi\tests\Switzerland\Ticino; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,9 +37,9 @@ class StJosephDayTest extends TicinoBaseTestCase implements YasumiTestCaseInterf * @dataProvider StJosephDayDataProvider * * @param int $year the year for which St. Joseph's Day needs to be tested - * @param \DateTime $expected the expected date + * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testStJosephDay($year, $expected) { @@ -47,7 +50,7 @@ public function testStJosephDay($year, $expected) * Returns a list of random test dates used for assertion of St. Joseph's Day. * * @return array list of test dates for St. Joseph's Day - * @throws \Exception + * @throws Exception */ public function StJosephDayDataProvider(): array { @@ -56,7 +59,7 @@ public function StJosephDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -70,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/StPeterPaulTest.php b/tests/Switzerland/Ticino/StPeterPaulTest.php index 18de20e92..b66d6a540 100644 --- a/tests/Switzerland/Ticino/StPeterPaulTest.php +++ b/tests/Switzerland/Ticino/StPeterPaulTest.php @@ -12,6 +12,9 @@ namespace Yasumi\tests\Switzerland\Ticino; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,9 +35,9 @@ class StPeterPaulTest extends TicinoBaseTestCase implements YasumiTestCaseInterf * @dataProvider StPeterPaulDataProvider * * @param int $year the year for which Feast of Saints Peter and Paul needs to be tested - * @param \DateTime $expected the expected date + * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testStPeterPaul($year, $expected) { @@ -45,7 +48,7 @@ public function testStPeterPaul($year, $expected) * Returns a list of random test dates used for assertion of Feast of Saints Peter and Paul. * * @return array list of test dates for Feast of Saints Peter and Paul - * @throws \Exception + * @throws Exception */ public function StPeterPaulDataProvider(): array { @@ -54,7 +57,7 @@ public function StPeterPaulDataProvider(): array /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +71,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/StStephensDayTest.php b/tests/Switzerland/Ticino/StStephensDayTest.php index bdf073dbc..9c25170c1 100644 --- a/tests/Switzerland/Ticino/StStephensDayTest.php +++ b/tests/Switzerland/Ticino/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Ticino; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends TicinoBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Ticino/TicinoTest.php b/tests/Switzerland/Ticino/TicinoTest.php index 337bace26..771eec372 100644 --- a/tests/Switzerland/Ticino/TicinoTest.php +++ b/tests/Switzerland/Ticino/TicinoTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Ticino; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class TicinoTest extends TicinoBaseTestCase /** * Tests if all official holidays in Ticino (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Ticino (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -63,7 +64,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Ticino (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -77,7 +78,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Ticino (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -86,7 +87,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Ticino (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -95,7 +96,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Ticino (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Ticino/WorkersDayTest.php b/tests/Switzerland/Ticino/WorkersDayTest.php index b12d47322..9d95d6237 100644 --- a/tests/Switzerland/Ticino/WorkersDayTest.php +++ b/tests/Switzerland/Ticino/WorkersDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class WorkersDayTest extends TicinoBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -48,7 +50,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -65,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -79,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/AllSaintsDayTest.php b/tests/Switzerland/Uri/AllSaintsDayTest.php index eaf34c447..8fdbdf5e8 100644 --- a/tests/Switzerland/Uri/AllSaintsDayTest.php +++ b/tests/Switzerland/Uri/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Uri; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends UriBaseTestCase implements YasumiTestCaseInterfac * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAllSaintsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testAllSaintsDay($year, $expected) /** * Tests translated name of All Saints' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of All Saints' Day. * * @return array list of test dates for All Saints' Day - * @throws \Exception + * @throws Exception */ public function AllSaintsDayDataProvider(): array { diff --git a/tests/Switzerland/Uri/AscensionDayTest.php b/tests/Switzerland/Uri/AscensionDayTest.php index 689711edc..1079d093c 100644 --- a/tests/Switzerland/Uri/AscensionDayTest.php +++ b/tests/Switzerland/Uri/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends UriBaseTestCase implements YasumiTestCaseInterfac /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/AssumptionOfMaryTest.php b/tests/Switzerland/Uri/AssumptionOfMaryTest.php index 8e548de37..7bf53f8c3 100644 --- a/tests/Switzerland/Uri/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Uri/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Uri; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends UriBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAssumptionOfMary($year, $expected) { @@ -43,7 +45,7 @@ public function testAssumptionOfMary($year, $expected) /** * Tests translated name of the day of the Assumption of Mary. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of the day of the Assumption of Mary. * * @return array list of test dates for the day of the Assumption of Mary - * @throws \Exception + * @throws Exception */ public function AssumptionOfMaryDataProvider(): array { diff --git a/tests/Switzerland/Uri/ChristmasDayTest.php b/tests/Switzerland/Uri/ChristmasDayTest.php index 06025e5ad..75d090968 100644 --- a/tests/Switzerland/Uri/ChristmasDayTest.php +++ b/tests/Switzerland/Uri/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Uri; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends UriBaseTestCase implements YasumiTestCaseInterfac * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/CorpusChristiTest.php b/tests/Switzerland/Uri/CorpusChristiTest.php index 30a7f2e13..9c29c868d 100644 --- a/tests/Switzerland/Uri/CorpusChristiTest.php +++ b/tests/Switzerland/Uri/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Uri; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends UriBaseTestCase implements YasumiTestCaseInterfa /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/EasterMondayTest.php b/tests/Switzerland/Uri/EasterMondayTest.php index d73d5595d..7e58d4a3d 100644 --- a/tests/Switzerland/Uri/EasterMondayTest.php +++ b/tests/Switzerland/Uri/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends UriBaseTestCase implements YasumiTestCaseInterfac /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/EpiphanyTest.php b/tests/Switzerland/Uri/EpiphanyTest.php index 1cd11e41b..94ed30cef 100644 --- a/tests/Switzerland/Uri/EpiphanyTest.php +++ b/tests/Switzerland/Uri/EpiphanyTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Uri; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,7 +37,7 @@ class EpiphanyTest extends UriBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -46,7 +48,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -55,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -69,7 +71,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/GoodFridayTest.php b/tests/Switzerland/Uri/GoodFridayTest.php index 482eefa0a..5ebf9571f 100644 --- a/tests/Switzerland/Uri/GoodFridayTest.php +++ b/tests/Switzerland/Uri/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends UriBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/ImmaculateConceptionTest.php b/tests/Switzerland/Uri/ImmaculateConceptionTest.php index d7354d808..20e2445ce 100644 --- a/tests/Switzerland/Uri/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Uri/ImmaculateConceptionTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Uri; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ImmaculateConceptionTest extends UriBaseTestCase implements YasumiTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/NewYearsDayTest.php b/tests/Switzerland/Uri/NewYearsDayTest.php index 1b4f16b1e..af976f052 100644 --- a/tests/Switzerland/Uri/NewYearsDayTest.php +++ b/tests/Switzerland/Uri/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Uri; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends UriBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Uri/PentecostMondayTest.php b/tests/Switzerland/Uri/PentecostMondayTest.php index 2c6cb4526..3f785d141 100644 --- a/tests/Switzerland/Uri/PentecostMondayTest.php +++ b/tests/Switzerland/Uri/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends UriBaseTestCase implements YasumiTestCaseInter /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/StJosephDayTest.php b/tests/Switzerland/Uri/StJosephDayTest.php index 815fbea58..39ab92355 100644 --- a/tests/Switzerland/Uri/StJosephDayTest.php +++ b/tests/Switzerland/Uri/StJosephDayTest.php @@ -12,6 +12,9 @@ namespace Yasumi\tests\Switzerland\Uri; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,9 +37,9 @@ class StJosephDayTest extends UriBaseTestCase implements YasumiTestCaseInterface * @dataProvider StJosephDayDataProvider * * @param int $year the year for which St. Joseph's Day needs to be tested - * @param \DateTime $expected the expected date + * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testStJosephDay($year, $expected) { @@ -47,7 +50,7 @@ public function testStJosephDay($year, $expected) * Returns a list of random test dates used for assertion of St. Joseph's Day. * * @return array list of test dates for St. Joseph's Day - * @throws \Exception + * @throws Exception */ public function StJosephDayDataProvider(): array { @@ -56,7 +59,7 @@ public function StJosephDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -70,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/StStephensDayTest.php b/tests/Switzerland/Uri/StStephensDayTest.php index 14ff58b25..2914d7005 100644 --- a/tests/Switzerland/Uri/StStephensDayTest.php +++ b/tests/Switzerland/Uri/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Uri; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends UriBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Uri/UriTest.php b/tests/Switzerland/Uri/UriTest.php index 330988644..7d0a43bb1 100644 --- a/tests/Switzerland/Uri/UriTest.php +++ b/tests/Switzerland/Uri/UriTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Uri; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class UriTest extends UriBaseTestCase /** * Tests if all official holidays in Uri (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Uri (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -62,7 +63,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Uri (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -76,7 +77,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Uri (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -85,7 +86,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Uri (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -94,7 +95,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Uri (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Valais/AllSaintsDayTest.php b/tests/Switzerland/Valais/AllSaintsDayTest.php index 7baac5504..1eaac43ff 100644 --- a/tests/Switzerland/Valais/AllSaintsDayTest.php +++ b/tests/Switzerland/Valais/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Valais; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends ValaisBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAllSaintsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testAllSaintsDay($year, $expected) /** * Tests translated name of All Saints' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of All Saints' Day. * * @return array list of test dates for All Saints' Day - * @throws \Exception + * @throws Exception */ public function AllSaintsDayDataProvider(): array { diff --git a/tests/Switzerland/Valais/AscensionDayTest.php b/tests/Switzerland/Valais/AscensionDayTest.php index 68f8fdf65..aae8ec7b4 100644 --- a/tests/Switzerland/Valais/AscensionDayTest.php +++ b/tests/Switzerland/Valais/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends ValaisBaseTestCase implements YasumiTestCaseInter /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/AssumptionOfMaryTest.php b/tests/Switzerland/Valais/AssumptionOfMaryTest.php index 9fb73937d..d5f73dfcb 100644 --- a/tests/Switzerland/Valais/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Valais/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Valais; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends ValaisBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAssumptionOfMary($year, $expected) { @@ -43,7 +45,7 @@ public function testAssumptionOfMary($year, $expected) /** * Tests translated name of the day of the Assumption of Mary. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of the day of the Assumption of Mary. * * @return array list of test dates for the day of the Assumption of Mary - * @throws \Exception + * @throws Exception */ public function AssumptionOfMaryDataProvider(): array { diff --git a/tests/Switzerland/Valais/ChristmasDayTest.php b/tests/Switzerland/Valais/ChristmasDayTest.php index a126da580..bda6c3ae4 100644 --- a/tests/Switzerland/Valais/ChristmasDayTest.php +++ b/tests/Switzerland/Valais/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Valais; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends ValaisBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/CorpusChristiTest.php b/tests/Switzerland/Valais/CorpusChristiTest.php index 7398c5c2c..d6f8aa4ea 100644 --- a/tests/Switzerland/Valais/CorpusChristiTest.php +++ b/tests/Switzerland/Valais/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Valais; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends ValaisBaseTestCase implements YasumiTestCaseInte /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/ImmaculateConceptionTest.php b/tests/Switzerland/Valais/ImmaculateConceptionTest.php index 7c8434c0a..154007557 100644 --- a/tests/Switzerland/Valais/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Valais/ImmaculateConceptionTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Valais; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ImmaculateConceptionTest extends ValaisBaseTestCase implements YasumiTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/NewYearsDayTest.php b/tests/Switzerland/Valais/NewYearsDayTest.php index 67b30a505..8eae34982 100644 --- a/tests/Switzerland/Valais/NewYearsDayTest.php +++ b/tests/Switzerland/Valais/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Valais; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends ValaisBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Valais/StJosephDayTest.php b/tests/Switzerland/Valais/StJosephDayTest.php index e1b1293d0..30c5de5d3 100644 --- a/tests/Switzerland/Valais/StJosephDayTest.php +++ b/tests/Switzerland/Valais/StJosephDayTest.php @@ -12,6 +12,9 @@ namespace Yasumi\tests\Switzerland\Valais; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,9 +37,9 @@ class StJosephDayTest extends ValaisBaseTestCase implements YasumiTestCaseInterf * @dataProvider StJosephDayDataProvider * * @param int $year the year for which St. Joseph's Day needs to be tested - * @param \DateTime $expected the expected date + * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testStJosephDay($year, $expected) { @@ -47,7 +50,7 @@ public function testStJosephDay($year, $expected) * Returns a list of random test dates used for assertion of St. Joseph's Day. * * @return array list of test dates for St. Joseph's Day - * @throws \Exception + * @throws Exception */ public function StJosephDayDataProvider(): array { @@ -56,7 +59,7 @@ public function StJosephDayDataProvider(): array /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -70,7 +73,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Valais/ValaisTest.php b/tests/Switzerland/Valais/ValaisTest.php index 6f384617e..481d741d9 100644 --- a/tests/Switzerland/Valais/ValaisTest.php +++ b/tests/Switzerland/Valais/ValaisTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Valais; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class ValaisTest extends ValaisBaseTestCase /** * Tests if all official holidays in Valais (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Valais (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -57,7 +58,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Valais (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -71,7 +72,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Valais (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -80,7 +81,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Valais (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,7 +90,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Valais (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Vaud/AscensionDayTest.php b/tests/Switzerland/Vaud/AscensionDayTest.php index fac6c7579..8b94c5928 100644 --- a/tests/Switzerland/Vaud/AscensionDayTest.php +++ b/tests/Switzerland/Vaud/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends VaudBaseTestCase implements YasumiTestCaseInterfa /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/BerchtoldsTagTest.php b/tests/Switzerland/Vaud/BerchtoldsTagTest.php index 2829e06fb..78400fbcd 100644 --- a/tests/Switzerland/Vaud/BerchtoldsTagTest.php +++ b/tests/Switzerland/Vaud/BerchtoldsTagTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class BerchtoldsTagTest extends VaudBaseTestCase implements YasumiTestCaseInterf /** * Tests BerchtoldsTag * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testBerchtoldsTag() { @@ -44,7 +46,7 @@ public function testBerchtoldsTag() /** * Tests translated name of BerchtoldsTag. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -58,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/BettagsMontagTest.php b/tests/Switzerland/Vaud/BettagsMontagTest.php index 8f2fe56c9..f780dbd9d 100644 --- a/tests/Switzerland/Vaud/BettagsMontagTest.php +++ b/tests/Switzerland/Vaud/BettagsMontagTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,9 +32,9 @@ class BettagsMontagTest extends VaudBaseTestCase implements YasumiTestCaseInterf /** * Tests Bettags Montag on or after 1832 - * @throws \ReflectionException + * @throws ReflectionException * - * @throws \Exception + * @throws Exception */ public function testBettagsMontagOnAfter1832() { @@ -48,7 +50,7 @@ public function testBettagsMontagOnAfter1832() /** * Tests Bettags Montag before 1832 - * @throws \ReflectionException + * @throws ReflectionException */ public function testBettagsMontagBefore1832() { @@ -58,7 +60,7 @@ public function testBettagsMontagBefore1832() /** * Tests translated name of Bettags Montag. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -72,7 +74,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/ChristmasDayTest.php b/tests/Switzerland/Vaud/ChristmasDayTest.php index 598c8e399..4df530289 100644 --- a/tests/Switzerland/Vaud/ChristmasDayTest.php +++ b/tests/Switzerland/Vaud/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Vaud; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends VaudBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/EasterMondayTest.php b/tests/Switzerland/Vaud/EasterMondayTest.php index bd1f28727..c1414c80a 100644 --- a/tests/Switzerland/Vaud/EasterMondayTest.php +++ b/tests/Switzerland/Vaud/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends VaudBaseTestCase implements YasumiTestCaseInterfa /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/GoodFridayTest.php b/tests/Switzerland/Vaud/GoodFridayTest.php index 32ee4122f..9838fa823 100644 --- a/tests/Switzerland/Vaud/GoodFridayTest.php +++ b/tests/Switzerland/Vaud/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends VaudBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/NewYearsDayTest.php b/tests/Switzerland/Vaud/NewYearsDayTest.php index 801e15859..5129832db 100644 --- a/tests/Switzerland/Vaud/NewYearsDayTest.php +++ b/tests/Switzerland/Vaud/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Vaud; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends VaudBaseTestCase implements YasumiTestCaseInterfac * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Vaud/PentecostMondayTest.php b/tests/Switzerland/Vaud/PentecostMondayTest.php index 75a62cd47..9f2aecb55 100644 --- a/tests/Switzerland/Vaud/PentecostMondayTest.php +++ b/tests/Switzerland/Vaud/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends VaudBaseTestCase implements YasumiTestCaseInte /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Vaud/VaudTest.php b/tests/Switzerland/Vaud/VaudTest.php index e274caa07..c4b210828 100644 --- a/tests/Switzerland/Vaud/VaudTest.php +++ b/tests/Switzerland/Vaud/VaudTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Vaud; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class VaudTest extends VaudBaseTestCase /** * Tests if all official holidays in Vaud (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Vaud (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -57,7 +58,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Vaud (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -71,7 +72,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Vaud (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -80,7 +81,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Vaud (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -89,7 +90,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Vaud (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Zug/AllSaintsDayTest.php b/tests/Switzerland/Zug/AllSaintsDayTest.php index e6145d636..9247730c3 100644 --- a/tests/Switzerland/Zug/AllSaintsDayTest.php +++ b/tests/Switzerland/Zug/AllSaintsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Zug; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AllSaintsDayTest extends ZugBaseTestCase implements YasumiTestCaseInterfac * @param int $year the year for which All Saints' Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAllSaintsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testAllSaintsDay($year, $expected) /** * Tests translated name of All Saints' Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of All Saints' Day. * * @return array list of test dates for All Saints' Day - * @throws \Exception + * @throws Exception */ public function AllSaintsDayDataProvider(): array { diff --git a/tests/Switzerland/Zug/AscensionDayTest.php b/tests/Switzerland/Zug/AscensionDayTest.php index e96c318a2..9afdb4b91 100644 --- a/tests/Switzerland/Zug/AscensionDayTest.php +++ b/tests/Switzerland/Zug/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends ZugBaseTestCase implements YasumiTestCaseInterfac /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/AssumptionOfMaryTest.php b/tests/Switzerland/Zug/AssumptionOfMaryTest.php index 757a2c862..72459fc71 100644 --- a/tests/Switzerland/Zug/AssumptionOfMaryTest.php +++ b/tests/Switzerland/Zug/AssumptionOfMaryTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Zug; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class AssumptionOfMaryTest extends ZugBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the day of the Assumption of Mary needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testAssumptionOfMary($year, $expected) { @@ -43,7 +45,7 @@ public function testAssumptionOfMary($year, $expected) /** * Tests translated name of the day of the Assumption of Mary. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of the day of the Assumption of Mary. * * @return array list of test dates for the day of the Assumption of Mary - * @throws \Exception + * @throws Exception */ public function AssumptionOfMaryDataProvider(): array { diff --git a/tests/Switzerland/Zug/BerchtoldsTagTest.php b/tests/Switzerland/Zug/BerchtoldsTagTest.php index ca915f1a9..98f87d07d 100644 --- a/tests/Switzerland/Zug/BerchtoldsTagTest.php +++ b/tests/Switzerland/Zug/BerchtoldsTagTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class BerchtoldsTagTest extends ZugBaseTestCase implements YasumiTestCaseInterfa /** * Tests BerchtoldsTag * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testBerchtoldsTag() { @@ -44,7 +46,7 @@ public function testBerchtoldsTag() /** * Tests translated name of BerchtoldsTag. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -58,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/ChristmasDayTest.php b/tests/Switzerland/Zug/ChristmasDayTest.php index 556269d28..3116a2288 100644 --- a/tests/Switzerland/Zug/ChristmasDayTest.php +++ b/tests/Switzerland/Zug/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Zug; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends ZugBaseTestCase implements YasumiTestCaseInterfac * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/CorpusChristiTest.php b/tests/Switzerland/Zug/CorpusChristiTest.php index 17c9b3225..fefd19661 100644 --- a/tests/Switzerland/Zug/CorpusChristiTest.php +++ b/tests/Switzerland/Zug/CorpusChristiTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Zug; use DateInterval; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,8 +34,8 @@ class CorpusChristiTest extends ZugBaseTestCase implements YasumiTestCaseInterfa /** * Tests Corpus Christi. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testCorpusChristi() { @@ -48,7 +50,7 @@ public function testCorpusChristi() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -62,7 +64,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/EasterMondayTest.php b/tests/Switzerland/Zug/EasterMondayTest.php index 2075ddf28..d60d0eaa3 100644 --- a/tests/Switzerland/Zug/EasterMondayTest.php +++ b/tests/Switzerland/Zug/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends ZugBaseTestCase implements YasumiTestCaseInterfac /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/GoodFridayTest.php b/tests/Switzerland/Zug/GoodFridayTest.php index 435a46a3a..e15dcdcf0 100644 --- a/tests/Switzerland/Zug/GoodFridayTest.php +++ b/tests/Switzerland/Zug/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends ZugBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/ImmaculateConceptionTest.php b/tests/Switzerland/Zug/ImmaculateConceptionTest.php index d9e1a7a00..d6638f6ac 100644 --- a/tests/Switzerland/Zug/ImmaculateConceptionTest.php +++ b/tests/Switzerland/Zug/ImmaculateConceptionTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Zug; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ImmaculateConceptionTest extends ZugBaseTestCase implements YasumiTestCase * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 day of the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/NewYearsDayTest.php b/tests/Switzerland/Zug/NewYearsDayTest.php index 81dc85a09..171b2f415 100644 --- a/tests/Switzerland/Zug/NewYearsDayTest.php +++ b/tests/Switzerland/Zug/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Zug; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends ZugBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Zug/PentecostMondayTest.php b/tests/Switzerland/Zug/PentecostMondayTest.php index a3e5051d8..4accddfda 100644 --- a/tests/Switzerland/Zug/PentecostMondayTest.php +++ b/tests/Switzerland/Zug/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends ZugBaseTestCase implements YasumiTestCaseInter /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/StStephensDayTest.php b/tests/Switzerland/Zug/StStephensDayTest.php index 904aecb43..7254290db 100644 --- a/tests/Switzerland/Zug/StStephensDayTest.php +++ b/tests/Switzerland/Zug/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Zug; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends ZugBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zug/ZugTest.php b/tests/Switzerland/Zug/ZugTest.php index 3456b0451..2510fad75 100644 --- a/tests/Switzerland/Zug/ZugTest.php +++ b/tests/Switzerland/Zug/ZugTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Zug; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class ZugTest extends ZugBaseTestCase /** * Tests if all official holidays in Zug (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Zug (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -61,7 +62,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Zug (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -75,7 +76,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Zug (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -84,7 +85,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Zug (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -93,7 +94,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Zug (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Switzerland/Zurich/AscensionDayTest.php b/tests/Switzerland/Zurich/AscensionDayTest.php index 2f7de222b..9d4b27514 100644 --- a/tests/Switzerland/Zurich/AscensionDayTest.php +++ b/tests/Switzerland/Zurich/AscensionDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class AscensionDayTest extends ZurichBaseTestCase implements YasumiTestCaseInter /** * Tests Ascension Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testAscensionDay() { @@ -45,7 +47,7 @@ public function testAscensionDay() /** * Tests translated name of Ascension Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/BerchtoldsTagTest.php b/tests/Switzerland/Zurich/BerchtoldsTagTest.php index bfa4f0986..19ae4bc09 100644 --- a/tests/Switzerland/Zurich/BerchtoldsTagTest.php +++ b/tests/Switzerland/Zurich/BerchtoldsTagTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class BerchtoldsTagTest extends ZurichBaseTestCase implements YasumiTestCaseInte /** * Tests BerchtoldsTag * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testBerchtoldsTag() { @@ -44,7 +46,7 @@ public function testBerchtoldsTag() /** * Tests translated name of BerchtoldsTag. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -58,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/ChristmasDayTest.php b/tests/Switzerland/Zurich/ChristmasDayTest.php index 026e1ffe1..3e41d9d61 100644 --- a/tests/Switzerland/Zurich/ChristmasDayTest.php +++ b/tests/Switzerland/Zurich/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Zurich; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends ZurichBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($year, $expected) * Returns a list of random test dates used for assertion of Christmas Day. * * @return array list of test dates for Christmas Day - * @throws \Exception + * @throws Exception */ public function ChristmasDayDataProvider(): array { @@ -54,7 +56,7 @@ public function ChristmasDayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/EasterMondayTest.php b/tests/Switzerland/Zurich/EasterMondayTest.php index f4d051047..53dfe927f 100644 --- a/tests/Switzerland/Zurich/EasterMondayTest.php +++ b/tests/Switzerland/Zurich/EasterMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class EasterMondayTest extends ZurichBaseTestCase implements YasumiTestCaseInter /** * Tests Easter Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testEasterMonday() { @@ -45,7 +47,7 @@ public function testEasterMonday() /** * Tests translated name of Easter Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/GoodFridayTest.php b/tests/Switzerland/Zurich/GoodFridayTest.php index 915467187..6525d5030 100644 --- a/tests/Switzerland/Zurich/GoodFridayTest.php +++ b/tests/Switzerland/Zurich/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends ZurichBaseTestCase implements YasumiTestCaseInterfa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/NewYearsDayTest.php b/tests/Switzerland/Zurich/NewYearsDayTest.php index cbbfc0441..0c6e14e7f 100644 --- a/tests/Switzerland/Zurich/NewYearsDayTest.php +++ b/tests/Switzerland/Zurich/NewYearsDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Zurich; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class NewYearsDayTest extends ZurichBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which New Years Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testNewYearsDay($year, $expected) { @@ -43,7 +45,7 @@ public function testNewYearsDay($year, $expected) /** * Tests translated name of New Years Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +59,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +70,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of New Years Day. * * @return array list of test dates for New Years Day - * @throws \Exception + * @throws Exception */ public function NewYearsDayDataProvider(): array { diff --git a/tests/Switzerland/Zurich/PentecostMondayTest.php b/tests/Switzerland/Zurich/PentecostMondayTest.php index 8dfbfaded..4ffae4ca4 100644 --- a/tests/Switzerland/Zurich/PentecostMondayTest.php +++ b/tests/Switzerland/Zurich/PentecostMondayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class PentecostMondayTest extends ZurichBaseTestCase implements YasumiTestCaseIn /** * Tests Pentecost Monday. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testPentecostMonday() { @@ -45,7 +47,7 @@ public function testPentecostMonday() /** * Tests translated name of Pentecost Monday. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/StStephensDayTest.php b/tests/Switzerland/Zurich/StStephensDayTest.php index 6d71a17d1..e5cda784a 100644 --- a/tests/Switzerland/Zurich/StStephensDayTest.php +++ b/tests/Switzerland/Zurich/StStephensDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Switzerland\Zurich; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class StStephensDayTest extends ZurichBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +47,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/WorkersDayTest.php b/tests/Switzerland/Zurich/WorkersDayTest.php index 3dc8e1a9c..5b458d578 100644 --- a/tests/Switzerland/Zurich/WorkersDayTest.php +++ b/tests/Switzerland/Zurich/WorkersDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class WorkersDayTest extends ZurichBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -48,7 +50,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -65,7 +67,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -79,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Switzerland/Zurich/ZurichTest.php b/tests/Switzerland/Zurich/ZurichTest.php index d0aa36997..566df000b 100644 --- a/tests/Switzerland/Zurich/ZurichTest.php +++ b/tests/Switzerland/Zurich/ZurichTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Switzerland\Zurich; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class ZurichTest extends ZurichBaseTestCase /** * Tests if all official holidays in Zurich (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -39,7 +40,7 @@ public function testOfficialHolidays(): void /** * Tests if all regional holidays in Zurich (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testRegionalHolidays(): void { @@ -58,7 +59,7 @@ public function testRegionalHolidays(): void /** * Tests if all observed holidays in Zurich (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -72,7 +73,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Zurich (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -81,7 +82,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Zurich (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -90,7 +91,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Zurich (Switzerland) are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/USA/ChristmasDayTest.php b/tests/USA/ChristmasDayTest.php index b2bb5156e..e05064dc0 100644 --- a/tests/USA/ChristmasDayTest.php +++ b/tests/USA/ChristmasDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class ChristmasDayTest extends USABaseTestCase implements YasumiTestCaseInterfac /** * Tests Christmas Day. Christmas Day is celebrated on December 25th. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testChristmasDay() { @@ -45,8 +47,8 @@ public function testChristmasDay() /** * Tests Christmas Day substituted on Monday (when Christmas Day falls on Sunday). - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testChristmasDaySubstitutedMonday() { @@ -62,8 +64,8 @@ public function testChristmasDaySubstitutedMonday() /** * Tests Christmas Day substituted on Monday (when Christmas Day falls on Saturday). - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testChristmasDaySubstitutedFriday() { @@ -79,7 +81,7 @@ public function testChristmasDaySubstitutedFriday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -93,7 +95,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/USA/ColumbusDayTest.php b/tests/USA/ColumbusDayTest.php index 49c1d5cad..9092e573b 100644 --- a/tests/USA/ColumbusDayTest.php +++ b/tests/USA/ColumbusDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class ColumbusDayTest extends USABaseTestCase implements YasumiTestCaseInterface /** * Tests Columbus Day on or after 1970. Columbus Day was established in 1937 on October 12th, but has been fixed to * the second Monday in October since 1970. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testColumbusDayOnAfter1970() { @@ -52,8 +54,8 @@ public function testColumbusDayOnAfter1970() /** * Tests Columbus Day between 1937 and 1969. Columbus Day was established in 1937 on October 12th, but has been * fixed to the second Monday in October since 1970. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testColumbusBetween1937And1969() { @@ -69,7 +71,7 @@ public function testColumbusBetween1937And1969() /** * Tests Columbus Day before 1937. Columbus Day was established in 1937 on October 12th, but has been fixed to * the second Monday in October since 1970. - * @throws \ReflectionException + * @throws ReflectionException */ public function testColumbusDayBefore1937() { @@ -82,7 +84,7 @@ public function testColumbusDayBefore1937() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -96,7 +98,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/USA/IndependenceDayTest.php b/tests/USA/IndependenceDayTest.php index 49aad2e0e..00394ff96 100644 --- a/tests/USA/IndependenceDayTest.php +++ b/tests/USA/IndependenceDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class IndependenceDayTest extends USABaseTestCase implements YasumiTestCaseInter /** * Tests Independence Day on or after 1776. Independence Day is celebrated since 1776 on July 4th. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testIndependenceDayOnAfter1776() { @@ -50,8 +52,8 @@ public function testIndependenceDayOnAfter1776() /** * Tests Independence Day on or after 1776 when substituted on Monday (when Independence Day falls on Sunday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testIndependenceDayOnAfter1776SubstitutedMonday() { @@ -66,8 +68,8 @@ public function testIndependenceDayOnAfter1776SubstitutedMonday() /** * Tests Independence Day on or after 1776 when substituted on Friday (when Independence Day falls on Saturday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testIndependenceDayOnAfter1776SubstitutedFriday() { @@ -82,7 +84,7 @@ public function testIndependenceDayOnAfter1776SubstitutedFriday() /** * Tests Independence Day before 1776. Independence Day is celebrated since 1776 on July 4th. - * @throws \ReflectionException + * @throws ReflectionException */ public function testIndependenceDayBefore1776() { @@ -95,7 +97,7 @@ public function testIndependenceDayBefore1776() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -109,7 +111,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/USA/LabourDayTest.php b/tests/USA/LabourDayTest.php index 4d01322d9..e3cc7ed59 100644 --- a/tests/USA/LabourDayTest.php +++ b/tests/USA/LabourDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class LabourDayTest extends USABaseTestCase implements YasumiTestCaseInterface /** * Tests Labour Day on or after 1887. Labour Day was established since 1887 on the first Monday of September. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testLabourDayOnAfter1887() { @@ -50,7 +52,7 @@ public function testLabourDayOnAfter1887() /** * Tests Labour Day before 1887. Labour Day was established since 1887 on the first Monday of September. - * @throws \ReflectionException + * @throws ReflectionException */ public function testLabourDayBefore1887() { @@ -63,7 +65,7 @@ public function testLabourDayBefore1887() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/USA/MartinLutherKingDayTest.php b/tests/USA/MartinLutherKingDayTest.php index 6ad829a8c..742bcfc65 100644 --- a/tests/USA/MartinLutherKingDayTest.php +++ b/tests/USA/MartinLutherKingDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class MartinLutherKingDayTest extends USABaseTestCase implements YasumiTestCaseI /** * Tests Dr. Martin Luther King Day on or after 1986. Dr. Martin Luther King Day was established since 1986 on the * third Monday of January. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testMartinLutherKingDayOnAfter1986() { @@ -52,7 +54,7 @@ public function testMartinLutherKingDayOnAfter1986() /** * Tests Dr. Martin Luther King Day before 1986. Dr. Martin Luther King Day was established since 1996 on the third * Monday of January. - * @throws \ReflectionException + * @throws ReflectionException */ public function testMartinLutherKingDayBefore1986() { @@ -65,7 +67,7 @@ public function testMartinLutherKingDayBefore1986() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -79,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/USA/MemorialDayTest.php b/tests/USA/MemorialDayTest.php index 2a6b4cbe4..2246e8d43 100644 --- a/tests/USA/MemorialDayTest.php +++ b/tests/USA/MemorialDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class MemorialDayTest extends USABaseTestCase implements YasumiTestCaseInterface /** * Tests Memorial Day on or after 1968. Memorial Day was established since 1865 on May 30 and was changed in 1968 * to the last Monday in May. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testMemorialDayOnAfter1968() { @@ -52,8 +54,8 @@ public function testMemorialDayOnAfter1968() /** * Tests Memorial Day between 1865 and 1967. Memorial Day was established since 1865 on May 30 and was changed in * 1968 to the last Monday in May. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testMemorialDayBetween1865And1967() { @@ -69,7 +71,7 @@ public function testMemorialDayBetween1865And1967() /** * Tests Memorial Day before 1865. Memorial Day was established since 1865 on May 30 and was changed in 1968 to the * last Monday in May. - * @throws \ReflectionException + * @throws ReflectionException */ public function testMemorialDayBefore1865() { @@ -82,7 +84,7 @@ public function testMemorialDayBefore1865() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -96,7 +98,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/USA/NewYearsDayTest.php b/tests/USA/NewYearsDayTest.php index e97d65e30..0e467cfb0 100644 --- a/tests/USA/NewYearsDayTest.php +++ b/tests/USA/NewYearsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class NewYearsDayTest extends USABaseTestCase implements YasumiTestCaseInterface /** * Tests New Years Day. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testNewYearsDay() { @@ -45,8 +47,8 @@ public function testNewYearsDay() /** * Tests New Years Day when substituted on Monday (when New Years Day falls on Sunday). - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testNewYearsDaySubstitutedMonday() { @@ -61,8 +63,8 @@ public function testNewYearsDaySubstitutedMonday() /** * Tests New Years Day when substituted on Friday (when New Years Day falls on Saturday). - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testNewYearsDaySubstitutedFriday() { @@ -78,7 +80,7 @@ public function testNewYearsDaySubstitutedFriday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -92,7 +94,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/USA/ThanksgivingDayTest.php b/tests/USA/ThanksgivingDayTest.php index 20a0b34fd..cad1f8b01 100644 --- a/tests/USA/ThanksgivingDayTest.php +++ b/tests/USA/ThanksgivingDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class ThanksgivingDayTest extends USABaseTestCase implements YasumiTestCaseInter /** * Tests Thanksgiving Day on or after 1863. Thanksgiving Day is celebrated since 1863 on the fourth Thursday * of November. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testThanksgivingDayOnAfter1863() { @@ -52,7 +54,7 @@ public function testThanksgivingDayOnAfter1863() /** * Tests Thanksgiving Day before 1863. ThanksgivingDay Day is celebrated since 1863 on the fourth Thursday * of November. - * @throws \ReflectionException + * @throws ReflectionException */ public function testThanksgivingDayBefore1863() { @@ -65,7 +67,7 @@ public function testThanksgivingDayBefore1863() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -79,7 +81,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/USA/USATest.php b/tests/USA/USATest.php index 561faa2ff..8c4d8eea7 100644 --- a/tests/USA/USATest.php +++ b/tests/USA/USATest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\USA; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class USATest extends USABaseTestCase /** * Tests if all official holidays in the USA are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -46,7 +47,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the USA are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -55,7 +56,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the USA are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -64,7 +65,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the USA are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -73,7 +74,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the USA are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/USA/VeteransDayTest.php b/tests/USA/VeteransDayTest.php index d593ca06d..ca6ef8f90 100644 --- a/tests/USA/VeteransDayTest.php +++ b/tests/USA/VeteransDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; use Yasumi\Yasumi; @@ -35,8 +37,8 @@ class VeteransDayTest extends USABaseTestCase implements YasumiTestCaseInterface /** * Tests Veterans Day on or after 1919. Veterans Day was established in 1919 on November 11. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testVeteransDayOnAfter1919() { @@ -51,8 +53,8 @@ public function testVeteransDayOnAfter1919() /** * Tests Veterans Day on or after 1919 when substituted on Monday (when Veterans Day falls on Sunday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testVeteransDayOnAfter1919SubstitutedMonday() { @@ -67,8 +69,8 @@ public function testVeteransDayOnAfter1919SubstitutedMonday() /** * Tests Veterans Day on or after 1919 when substituted on Friday (when Veterans Day falls on Saturday) - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testVeteransDayOnAfter1919SubstitutedFriday() { @@ -83,7 +85,7 @@ public function testVeteransDayOnAfter1919SubstitutedFriday() /** * Tests Veterans Day before 1919. Veterans Day was established in 1919 on November 11. - * @throws \ReflectionException + * @throws ReflectionException */ public function testVeteransDayBefore1919() { @@ -96,7 +98,7 @@ public function testVeteransDayBefore1919() /** * Tests name of Veterans Day before 1954. Veterans Day was named 'Armistice Day' before 1954. - * @throws \ReflectionException + * @throws ReflectionException */ public function testVeteransDayNameBefore1954() { @@ -109,7 +111,7 @@ public function testVeteransDayNameBefore1954() /** * Tests name of Veterans Day after 1954. Veterans Day was named 'Armistice Day' before 1954. - * @throws \ReflectionException + * @throws ReflectionException */ public function testVeteransDayNameAfter1954() { @@ -122,7 +124,7 @@ public function testVeteransDayNameAfter1954() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -136,7 +138,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/USA/WashingtonsBirthdayTest.php b/tests/USA/WashingtonsBirthdayTest.php index 5ce977125..11853fc50 100644 --- a/tests/USA/WashingtonsBirthdayTest.php +++ b/tests/USA/WashingtonsBirthdayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class WashingtonsBirthdayTest extends USABaseTestCase implements YasumiTestCaseI /** * Tests Washington's Birthday on or after 1968. Washington's Birthday was established since 1879 on February 22 * and was changed in 1968 to the third Monday in February. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testWashingtonsBirthdayOnAfter1968() { @@ -52,8 +54,8 @@ public function testWashingtonsBirthdayOnAfter1968() /** * Tests Washington's Birthday between 1879 and 1967. Washington's Birthday was established since 1879 on February * 22 and was changed in 1968 to the third Monday in February. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testWashingtonsBirthdayBetween1879And1967() { @@ -69,7 +71,7 @@ public function testWashingtonsBirthdayBetween1879And1967() /** * Tests Washington's Birthday before 1879. Washington's Birthday was established since 1879 on February 22 and was * changed in 1968 to the third Monday in February. - * @throws \ReflectionException + * @throws ReflectionException */ public function testWashingtonsBirthdayBefore1879() { @@ -82,7 +84,7 @@ public function testWashingtonsBirthdayBefore1879() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -96,7 +98,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ukraine/ChristmasDayTest.php b/tests/Ukraine/ChristmasDayTest.php index 063ca7f7d..0582f4cb0 100644 --- a/tests/Ukraine/ChristmasDayTest.php +++ b/tests/Ukraine/ChristmasDayTest.php @@ -13,6 +13,8 @@ namespace Yasumi\tests\Ukraine; use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,7 +36,7 @@ class ChristmasDayTest extends UkraineBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which Christmas Day needs to be tested * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testChristmasDay($year, $expected) { @@ -45,7 +47,7 @@ public function testChristmasDay($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +56,7 @@ public function HolidayDataProvider(): array /** * Tests translated name of Christmas Day. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +70,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ukraine/ConstitutionDayTest.php b/tests/Ukraine/ConstitutionDayTest.php index abb929beb..0dab6197e 100644 --- a/tests/Ukraine/ConstitutionDayTest.php +++ b/tests/Ukraine/ConstitutionDayTest.php @@ -12,6 +12,10 @@ namespace Yasumi\tests\Ukraine; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -27,8 +31,8 @@ class ConstitutionDayTest extends UkraineBaseTestCase implements YasumiTestCaseI public const HOLIDAY = 'constitutionDay'; /** - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday() { @@ -37,13 +41,13 @@ public function testHoliday() self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-06-28", new \DateTimeZone(self::TIMEZONE)) + new DateTime("$year-06-28", new DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -52,7 +56,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ukraine/DefenderOfUkraineDayTest.php b/tests/Ukraine/DefenderOfUkraineDayTest.php index dc646e176..f74d6b285 100644 --- a/tests/Ukraine/DefenderOfUkraineDayTest.php +++ b/tests/Ukraine/DefenderOfUkraineDayTest.php @@ -12,6 +12,10 @@ namespace Yasumi\tests\Ukraine; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -27,8 +31,8 @@ class DefenderOfUkraineDayTest extends UkraineBaseTestCase implements YasumiTest public const HOLIDAY = 'defenderOfUkraineDay'; /** - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday() { @@ -37,13 +41,13 @@ public function testHoliday() self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-10-14", new \DateTimeZone(self::TIMEZONE)) + new DateTime("$year-10-14", new DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ukraine/EasterTest.php b/tests/Ukraine/EasterTest.php index 035011ce7..8d786805e 100644 --- a/tests/Ukraine/EasterTest.php +++ b/tests/Ukraine/EasterTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class EasterTest extends UkraineBaseTestCase implements YasumiTestCaseInterface /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -46,7 +48,7 @@ public function testHoliday() /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -60,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ukraine/IndependenceDayTest.php b/tests/Ukraine/IndependenceDayTest.php index f220e0773..438ed9022 100644 --- a/tests/Ukraine/IndependenceDayTest.php +++ b/tests/Ukraine/IndependenceDayTest.php @@ -12,6 +12,10 @@ namespace Yasumi\tests\Ukraine; +use DateTime; +use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -27,8 +31,8 @@ class IndependenceDayTest extends UkraineBaseTestCase implements YasumiTestCaseI public const HOLIDAY = 'independenceDay'; /** - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday() { @@ -37,13 +41,13 @@ public function testHoliday() self::REGION, self::HOLIDAY, $year, - new \DateTime("$year-08-24", new \DateTimeZone(self::TIMEZONE)) + new DateTime("$year-08-24", new DateTimeZone(self::TIMEZONE)) ); } /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -52,7 +56,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ukraine/InternationalWomensDayTest.php b/tests/Ukraine/InternationalWomensDayTest.php index 28d10bee6..59ef74c43 100644 --- a/tests/Ukraine/InternationalWomensDayTest.php +++ b/tests/Ukraine/InternationalWomensDayTest.php @@ -12,6 +12,9 @@ namespace Yasumi\tests\Ukraine; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,9 +33,9 @@ class InternationalWomensDayTest extends UkraineBaseTestCase implements YasumiTe * @dataProvider HolidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -43,7 +46,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -52,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ukraine/InternationalWorkersDayTest.php b/tests/Ukraine/InternationalWorkersDayTest.php index 3e679d048..5d5387878 100644 --- a/tests/Ukraine/InternationalWorkersDayTest.php +++ b/tests/Ukraine/InternationalWorkersDayTest.php @@ -12,6 +12,9 @@ namespace Yasumi\tests\Ukraine; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,9 +35,9 @@ class InternationalWorkersDayTest extends UkraineBaseTestCase implements YasumiT * @dataProvider InternationalWorkersDayDataProvider * * @param int $year the year for which International Workers' Day needs to be tested - * @param \DateTime $expected the expected date + * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testInternationalWorkersDay($year, $expected) { @@ -43,7 +46,7 @@ public function testInternationalWorkersDay($year, $expected) /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +71,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of International Workers' Day. * * @return array list of test dates for International Workers' Day - * @throws \Exception + * @throws Exception */ public function InternationalWorkersDayDataProvider(): array { diff --git a/tests/Ukraine/NewYearsDayTest.php b/tests/Ukraine/NewYearsDayTest.php index 414368adf..2bb1a359d 100644 --- a/tests/Ukraine/NewYearsDayTest.php +++ b/tests/Ukraine/NewYearsDayTest.php @@ -12,6 +12,9 @@ namespace Yasumi\tests\Ukraine; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,9 +35,9 @@ class NewYearsDayTest extends UkraineBaseTestCase implements YasumiTestCaseInter * @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 + * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -45,7 +48,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -54,7 +57,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -68,7 +71,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ukraine/PentecostTest.php b/tests/Ukraine/PentecostTest.php index 790177b98..20460ed14 100644 --- a/tests/Ukraine/PentecostTest.php +++ b/tests/Ukraine/PentecostTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,8 +32,8 @@ class PentecostTest extends UkraineBaseTestCase implements YasumiTestCaseInterfa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -46,7 +48,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -60,7 +62,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/Ukraine/SecondInternationalWorkersDayTest.php b/tests/Ukraine/SecondInternationalWorkersDayTest.php index 327096ff7..840d5fb0a 100644 --- a/tests/Ukraine/SecondInternationalWorkersDayTest.php +++ b/tests/Ukraine/SecondInternationalWorkersDayTest.php @@ -12,6 +12,9 @@ namespace Yasumi\tests\Ukraine; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,9 +35,9 @@ class SecondInternationalWorkersDayTest extends UkraineBaseTestCase implements Y * @dataProvider SecondInternationalWorkersDayDataProvider * * @param int $year the year for which International Workers' Day needs to be tested - * @param \DateTime $expected the expected date + * @param DateTime $expected the expected date * - * @throws \ReflectionException + * @throws ReflectionException */ public function testSecondInternationalWorkersDay($year, $expected) { @@ -43,7 +46,7 @@ public function testSecondInternationalWorkersDay($year, $expected) /** * Tests translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -57,7 +60,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { @@ -68,7 +71,7 @@ public function testHolidayType(): void * Returns a list of random test dates used for assertion of International Workers' Day. * * @return array list of test dates for International Workers' Day - * @throws \Exception + * @throws Exception */ public function SecondInternationalWorkersDayDataProvider(): array { diff --git a/tests/Ukraine/UkraineTest.php b/tests/Ukraine/UkraineTest.php index b977d9149..f2e7d1588 100644 --- a/tests/Ukraine/UkraineTest.php +++ b/tests/Ukraine/UkraineTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\Ukraine; +use ReflectionException; use Yasumi\Holiday; /** @@ -27,7 +28,7 @@ class UkraineTest extends UkraineBaseTestCase /** * Tests if all official holidays in Ukraine are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -48,7 +49,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Ukraine are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -57,7 +58,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Ukraine are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -66,7 +67,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Ukraine are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -75,7 +76,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Ukraine are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/Ukraine/VictoryDayTest.php b/tests/Ukraine/VictoryDayTest.php index 31995caf4..8e3068b84 100644 --- a/tests/Ukraine/VictoryDayTest.php +++ b/tests/Ukraine/VictoryDayTest.php @@ -12,6 +12,9 @@ namespace Yasumi\tests\Ukraine; +use DateTime; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -30,9 +33,9 @@ class VictoryDayTest extends UkraineBaseTestCase implements YasumiTestCaseInterf * @dataProvider HolidayDataProvider * * @param int $year - * @param \DateTime $expected + * @param DateTime $expected * - * @throws \ReflectionException + * @throws ReflectionException */ public function testHoliday($year, $expected) { @@ -43,7 +46,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -52,7 +55,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -66,7 +69,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/BoxingDayTest.php b/tests/UnitedKingdom/BoxingDayTest.php index 1e7598e50..e650dd981 100644 --- a/tests/UnitedKingdom/BoxingDayTest.php +++ b/tests/UnitedKingdom/BoxingDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class BoxingDayTest extends UnitedKingdomBaseTestCase implements YasumiTestCaseI * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -55,7 +57,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -73,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -87,7 +89,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/ChristmasDayTest.php b/tests/UnitedKingdom/ChristmasDayTest.php index 47da67472..f53646889 100644 --- a/tests/UnitedKingdom/ChristmasDayTest.php +++ b/tests/UnitedKingdom/ChristmasDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class ChristmasDayTest extends UnitedKingdomBaseTestCase implements YasumiTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -55,7 +57,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -73,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -87,7 +89,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/EasterMondayTest.php b/tests/UnitedKingdom/EasterMondayTest.php index e2182b80a..5bd97120c 100644 --- a/tests/UnitedKingdom/EasterMondayTest.php +++ b/tests/UnitedKingdom/EasterMondayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class EasterMondayTest extends UnitedKingdomBaseTestCase implements YasumiTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -72,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -86,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/GoodFridayTest.php b/tests/UnitedKingdom/GoodFridayTest.php index 4f573581a..5ef43b216 100644 --- a/tests/UnitedKingdom/GoodFridayTest.php +++ b/tests/UnitedKingdom/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends UnitedKingdomBaseTestCase implements YasumiTestCase /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/MayDayBankHolidayTest.php b/tests/UnitedKingdom/MayDayBankHolidayTest.php index 942be93e7..582090aa6 100644 --- a/tests/UnitedKingdom/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/MayDayBankHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class MayDayBankHolidayTest extends UnitedKingdomBaseTestCase implements YasumiT /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -50,7 +52,7 @@ public function testHoliday() /** * Tests the holiday exception in 1995 and 2020. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayExceptions() { @@ -71,7 +73,7 @@ public function testHolidayExceptions() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -84,7 +86,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -98,7 +100,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NewYearsDayTest.php b/tests/UnitedKingdom/NewYearsDayTest.php index 2d332c4d4..b43a68545 100644 --- a/tests/UnitedKingdom/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NewYearsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -45,8 +47,8 @@ class NewYearsDayTest extends UnitedKingdomBaseTestCase implements YasumiTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayOnAfterEstablishment($year, $expected) { @@ -60,7 +62,7 @@ public function testHolidayOnAfterEstablishment($year, $expected) /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -73,7 +75,7 @@ public function testHolidayBeforeEstablishment() /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayIsObservedTypeBeforeChange() { @@ -89,7 +91,7 @@ public function testHolidayIsObservedTypeBeforeChange() * 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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -98,7 +100,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -112,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/SpringBankHolidayTest.php b/tests/UnitedKingdom/SpringBankHolidayTest.php index 5c731c75c..f5bde9fb3 100644 --- a/tests/UnitedKingdom/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/SpringBankHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class SpringBankHolidayTest extends UnitedKingdomBaseTestCase implements YasumiT /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -50,7 +52,7 @@ public function testHoliday() /** * Tests the holiday exceptions in 2002 and 2012. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayException() { @@ -71,7 +73,7 @@ public function testHolidayException() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -84,7 +86,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -98,7 +100,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/SummerBankHolidayTest.php b/tests/UnitedKingdom/SummerBankHolidayTest.php index d836fb110..9b906b92c 100644 --- a/tests/UnitedKingdom/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/SummerBankHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class SummerBankHolidayTest extends UnitedKingdomBaseTestCase implements YasumiT /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -50,7 +52,7 @@ public function testHoliday() /** * Tests the holiday exception in 2020. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBefore1965() { @@ -65,7 +67,7 @@ public function testHolidayBefore1965() /** * Tests the holiday during trial period in 1965-1970. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayTrialPeriod() { @@ -109,7 +111,7 @@ public function testHolidayTrialPeriod() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -122,7 +124,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -136,7 +138,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/UnitedKingdomTest.php b/tests/UnitedKingdom/UnitedKingdomTest.php index b5c80c732..d2bec8cd4 100644 --- a/tests/UnitedKingdom/UnitedKingdomTest.php +++ b/tests/UnitedKingdom/UnitedKingdomTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\UnitedKingdom; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class UnitedKingdomTest extends UnitedKingdomBaseTestCase /** * Tests if all official holidays in the United Kingdom are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -38,7 +39,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in the United Kingdom are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -47,7 +48,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in the United Kingdom are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -56,7 +57,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in the United Kingdom are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -71,7 +72,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in the United Kingdom are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 3039114e5..d451f1df1 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -14,8 +14,17 @@ use DateInterval; use DateTime; +use DateTimeInterface; use DateTimeZone; +use function easter_days; +use Exception; use Faker\Factory as Faker; +use InvalidArgumentException; +use PHPUnit\Framework\AssertionFailedError; +use ReflectionException; +use RuntimeException; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Filters\BankHolidaysFilter; use Yasumi\Filters\ObservedHolidaysFilter; use Yasumi\Filters\OfficialHolidaysFilter; @@ -41,10 +50,10 @@ trait YasumiBase * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, * TYPE_OBSERVANCE, TYPE_SEASON, TYPE_BANK or TYPE_OTHER. * - * @throws \InvalidArgumentException - * @throws \RuntimeException - * @throws \Yasumi\Exception\UnknownLocaleException - * @throws \ReflectionException + * @throws InvalidArgumentException + * @throws RuntimeException + * @throws UnknownLocaleException + * @throws ReflectionException */ public function assertDefinedHolidays($expectedHolidays, $provider, $year, $type): void { @@ -84,12 +93,12 @@ public function assertDefinedHolidays($expectedHolidays, $provider, $year, $type * @param int $year holiday calendar year * @param DateTime $expected the date to be checked against * - * @throws \Yasumi\Exception\UnknownLocaleException - * @throws \Yasumi\Exception\InvalidDateException - * @throws \InvalidArgumentException - * @throws \RuntimeException - * @throws \PHPUnit\Framework\AssertionFailedError - * @throws \ReflectionException + * @throws UnknownLocaleException + * @throws InvalidDateException + * @throws InvalidArgumentException + * @throws RuntimeException + * @throws AssertionFailedError + * @throws ReflectionException */ public function assertHoliday($provider, $shortName, $year, $expected): void { @@ -112,12 +121,12 @@ public function assertHoliday($provider, $shortName, $year, $expected): void * @param string $shortName the short name of the holiday to be checked against * @param int $year holiday calendar year * - * @throws \InvalidArgumentException - * @throws \RuntimeException - * @throws \Yasumi\Exception\UnknownLocaleException - * @throws \Yasumi\Exception\InvalidDateException - * @throws \PHPUnit\Framework\AssertionFailedError - * @throws \ReflectionException + * @throws InvalidArgumentException + * @throws RuntimeException + * @throws UnknownLocaleException + * @throws InvalidDateException + * @throws AssertionFailedError + * @throws ReflectionException */ public function assertNotHoliday($provider, $shortName, $year): void { @@ -138,11 +147,11 @@ public function assertNotHoliday($provider, $shortName, $year): void * @param int $year holiday calendar year * @param array $translations the translations to be checked against * - * @throws \InvalidArgumentException - * @throws \RuntimeException - * @throws \Yasumi\Exception\UnknownLocaleException - * @throws \PHPUnit\Framework\AssertionFailedError - * @throws \ReflectionException + * @throws InvalidArgumentException + * @throws RuntimeException + * @throws UnknownLocaleException + * @throws AssertionFailedError + * @throws ReflectionException */ public function assertTranslatedHolidayName($provider, $shortName, $year, $translations): void { @@ -174,11 +183,11 @@ public function assertTranslatedHolidayName($provider, $shortName, $year, $trans * @param int $year holiday calendar year * @param string $type the type to be checked against * - * @throws \InvalidArgumentException - * @throws \RuntimeException - * @throws \PHPUnit\Framework\AssertionFailedError - * @throws \Yasumi\Exception\UnknownLocaleException - * @throws \ReflectionException + * @throws InvalidArgumentException + * @throws RuntimeException + * @throws AssertionFailedError + * @throws UnknownLocaleException + * @throws ReflectionException */ public function assertHolidayType($provider, $shortName, $year, $type): void { @@ -202,11 +211,11 @@ public function assertHolidayType($provider, $shortName, $year, $type): void * @param int $year holiday calendar year * @param string $expectedDayOfWeek the expected week day (i.e. "Saturday", "Sunday", etc.) * - * @throws \PHPUnit\Framework\AssertionFailedError - * @throws \InvalidArgumentException - * @throws \RuntimeException - * @throws \Yasumi\Exception\UnknownLocaleException - * @throws \ReflectionException + * @throws AssertionFailedError + * @throws InvalidArgumentException + * @throws RuntimeException + * @throws UnknownLocaleException + * @throws ReflectionException */ public function assertDayOfWeek($provider, $shortName, $year, $expectedDayOfWeek): void { @@ -232,7 +241,7 @@ public function assertDayOfWeek($provider, $shortName, $year, $expectedDayOfWeek * @param int $range year range from which dates will be generated (default: 1000) * * @return array list of random test dates used for assertion of holidays. - * @throws \Exception + * @throws Exception */ public function generateRandomDates($month, $day, $timezone = 'UTC', $iterations = 10, $range = 1000): array { @@ -253,7 +262,7 @@ public function generateRandomDates($month, $day, $timezone = 'UTC', $iterations * @param int $range year range from which dates will be generated (default: 1000) * * @return array list of random easter test dates used for assertion of holidays. - * @throws \Exception + * @throws Exception */ public function generateRandomEasterDates($timezone = 'UTC', $iterations = 10, $range = 1000): array { @@ -285,7 +294,7 @@ public function generateRandomEasterDates($timezone = 'UTC', $iterations = 10, $ * @param string $timezone the timezone in which Easter is celebrated * * @return \DateTime date of Easter - * @throws \Exception + * @throws Exception * @see easter_days * * @link https://github.com/php/php-src/blob/c8aa6f3a9a3d2c114d0c5e0c9fdd0a465dbb54a5/ext/calendar/easter.c @@ -357,7 +366,7 @@ protected function calculateEaster(int $year, string $timezone): DateTime * * @return array list of random Easter Monday test dates used for assertion of holidays. * - * @throws \Exception + * @throws Exception */ public function generateRandomEasterMondayDates($timezone = 'UTC', $iterations = 10, $range = 1000): array { @@ -375,7 +384,7 @@ public function generateRandomEasterMondayDates($timezone = 'UTC', $iterations = * @param int $range year range from which dates will be generated (default: 1000) * * @return array list of random modified Easter day test dates for assertion of holidays. - * @throws \Exception + * @throws Exception */ public function generateRandomModifiedEasterDates( callable $cb, @@ -406,7 +415,7 @@ public function generateRandomModifiedEasterDates( * * @return array list of random Good Friday test dates used for assertion of holidays. * - * @throws \Exception + * @throws Exception */ public function generateRandomGoodFridayDates($timezone = 'UTC', $iterations = 10, $range = 1000): array { @@ -424,7 +433,7 @@ public function generateRandomGoodFridayDates($timezone = 'UTC', $iterations = 1 * * @return array list of random Pentecost test dates used for assertion of holidays. * - * @throws \Exception + * @throws Exception */ public function generateRandomPentecostDates($timezone = 'UTC', $iterations = 10, $range = 1000): array { @@ -444,7 +453,7 @@ public function generateRandomPentecostDates($timezone = 'UTC', $iterations = 10 * @param int $range year range from which dates will be generated (default: 1000) * * @return array list of random test dates used for assertion of holidays. - * @throws \Exception + * @throws Exception */ public function generateRandomDatesWithHolidayMovedToMonday( $month, @@ -471,7 +480,7 @@ public function generateRandomDatesWithHolidayMovedToMonday( * @param int $range year range from which dates will be generated (default: 1000) * * @return array list of random test dates used for assertion of holidays with applied callback. - * @throws \Exception + * @throws Exception */ public function generateRandomDatesWithModifier( $month, @@ -511,12 +520,12 @@ public function generateRandomYear($lowerLimit = 1000, $upperLimit = 9999): int /** * Checks if given $dateTime is a weekend. * - * @param \DateTimeInterface $dateTime date for which weekend will be checked. + * @param DateTimeInterface $dateTime date for which weekend will be checked. * @param array $weekendDays weekend days. Saturday and Sunday are used by default. * * @return bool true if $dateTime is a weekend, false otherwise */ - public function isWeekend(\DateTimeInterface $dateTime, array $weekendDays = [0, 6]): bool + public function isWeekend(DateTimeInterface $dateTime, array $weekendDays = [0, 6]): bool { return \in_array((int)$dateTime->format('w'), $weekendDays, true); } From 53d449894a879816ef371dcc13e8beb199112e29 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 12:00:25 +0900 Subject: [PATCH 068/133] Ignore PHPUnit's cache files. Signed-off-by: Sacha Telgenhof --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4cea87f52..648a6fa39 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ vendor composer.lock .php_cs.cache bin/_* +!/.phpunit.result.cache From 88c866c0cb0a2b59c63e8f4a295ebfbfb7dea9a2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 12:20:04 +0900 Subject: [PATCH 069/133] Used imports rather than FQN. Signed-off-by: Sacha Telgenhof --- tests/Base/HolidayBetweenFilterTest.php | 4 ++-- tests/Base/HolidayOnFilterTest.php | 6 +++--- tests/Base/HolidayTest.php | 4 ++-- tests/Ireland/ChristmasDayTest.php | 2 +- tests/Ireland/NewYearsDayTest.php | 2 +- tests/Ireland/StPatricksDayTest.php | 2 +- tests/Ireland/StStephensDayTest.php | 2 +- tests/NewZealand/AnzacDayTest.php | 2 +- tests/NewZealand/WaitangiDayTest.php | 2 +- tests/YasumiBase.php | 8 ++++---- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tests/Base/HolidayBetweenFilterTest.php b/tests/Base/HolidayBetweenFilterTest.php index 1df676a2e..a6437723b 100644 --- a/tests/Base/HolidayBetweenFilterTest.php +++ b/tests/Base/HolidayBetweenFilterTest.php @@ -98,8 +98,8 @@ public function testHolidaysBetweenDateRangeWithDateTimeImmutable(): void $holidays = Yasumi::create('Netherlands', 2016); $between = $holidays->between( - new DateTimeImmutable('03/25/2016', new \DateTimeZone($timezone)), - new DateTimeImmutable('07/25/2016', new \DateTimeZone($timezone)) + new DateTimeImmutable('03/25/2016', new DateTimeZone($timezone)), + new DateTimeImmutable('07/25/2016', new DateTimeZone($timezone)) ); $betweenHolidays = \iterator_to_array($between); diff --git a/tests/Base/HolidayOnFilterTest.php b/tests/Base/HolidayOnFilterTest.php index 5a8408027..267eead2b 100644 --- a/tests/Base/HolidayOnFilterTest.php +++ b/tests/Base/HolidayOnFilterTest.php @@ -89,15 +89,15 @@ public function testCorrectNumberOfHolidaysOnDate(): void $holidays = Yasumi::create('Netherlands', 2016); // No holidays - $holidaysOnDate = $holidays->on(new \DateTime('11/19/2016', new DateTimeZone($timezone))); + $holidaysOnDate = $holidays->on(new DateTime('11/19/2016', new DateTimeZone($timezone))); $this->assertEquals(0, $holidaysOnDate->count()); // One holiday - $holidaysOnDate = $holidays->on(new \DateTime('12/25/2016', new DateTimeZone($timezone))); + $holidaysOnDate = $holidays->on(new DateTime('12/25/2016', new DateTimeZone($timezone))); $this->assertEquals(1, $holidaysOnDate->count()); // Multiple holidays - $holidaysOnDate = $holidays->on(new \DateTime('03/27/2016', new DateTimeZone($timezone))); + $holidaysOnDate = $holidays->on(new DateTime('03/27/2016', new DateTimeZone($timezone))); $this->assertGreaterThan(1, $holidaysOnDate->count()); } } diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index 086f3034a..a4d541e23 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -40,7 +40,7 @@ public function testHolidayBlankNameInvalidArgumentException(): void { $this->expectException(InvalidArgumentException::class); - new Holiday('', [], new \DateTime()); + new Holiday('', [], new DateTime()); } /** @@ -78,7 +78,7 @@ public function testHolidayIsJsonSerializable(): void public function testHolidayWithDateTimeInterface(): void { // Assert with DateTime instance - $holiday = new Holiday('testHoliday', [], new \DateTime(), 'en_US'); + $holiday = new Holiday('testHoliday', [], new DateTime(), 'en_US'); $this->assertNotNull($holiday); $this->assertInstanceOf(Holiday::class, $holiday); diff --git a/tests/Ireland/ChristmasDayTest.php b/tests/Ireland/ChristmasDayTest.php index c398b6f87..74b5d1e5d 100644 --- a/tests/Ireland/ChristmasDayTest.php +++ b/tests/Ireland/ChristmasDayTest.php @@ -35,7 +35,7 @@ class ChristmasDayTest extends IrelandBaseTestCase implements YasumiTestCaseInte * @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 + * @param DateTime $expected the expected date * * @throws ReflectionException * @throws Exception diff --git a/tests/Ireland/NewYearsDayTest.php b/tests/Ireland/NewYearsDayTest.php index d82efa5ad..6aa2c8041 100644 --- a/tests/Ireland/NewYearsDayTest.php +++ b/tests/Ireland/NewYearsDayTest.php @@ -40,7 +40,7 @@ class NewYearsDayTest extends IrelandBaseTestCase implements YasumiTestCaseInter * @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 + * @param DateTime $expected the expected date * * @throws ReflectionException * @throws Exception diff --git a/tests/Ireland/StPatricksDayTest.php b/tests/Ireland/StPatricksDayTest.php index 4a51bd1bb..992572902 100644 --- a/tests/Ireland/StPatricksDayTest.php +++ b/tests/Ireland/StPatricksDayTest.php @@ -40,7 +40,7 @@ class StPatricksDayTest extends IrelandBaseTestCase implements YasumiTestCaseInt * @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 + * @param DateTime $expected the expected date * * @throws ReflectionException * @throws Exception diff --git a/tests/Ireland/StStephensDayTest.php b/tests/Ireland/StStephensDayTest.php index 77c30a650..66ec7d1b1 100644 --- a/tests/Ireland/StStephensDayTest.php +++ b/tests/Ireland/StStephensDayTest.php @@ -35,7 +35,7 @@ class StStephensDayTest extends IrelandBaseTestCase implements YasumiTestCaseInt * @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 + * @param DateTime $expected the expected date * * @throws ReflectionException * @throws Exception diff --git a/tests/NewZealand/AnzacDayTest.php b/tests/NewZealand/AnzacDayTest.php index fe68a34d6..1d209ab14 100644 --- a/tests/NewZealand/AnzacDayTest.php +++ b/tests/NewZealand/AnzacDayTest.php @@ -72,7 +72,7 @@ public function testNotHoliday() */ public function HolidayDataProvider(): array { - return $this->generateRandomDatesWithModifier(4, 25, function ($year, \DateTime $date) { + return $this->generateRandomDatesWithModifier(4, 25, function ($year, DateTime $date) { // in 2015 some policy was introduced to make sure this holiday was celebrated during the working week. if ($year >= 2015 && $this->isWeekend($date)) { $date->modify('next monday'); diff --git a/tests/NewZealand/WaitangiDayTest.php b/tests/NewZealand/WaitangiDayTest.php index 981f72a83..e3ffff6b6 100644 --- a/tests/NewZealand/WaitangiDayTest.php +++ b/tests/NewZealand/WaitangiDayTest.php @@ -100,7 +100,7 @@ public function testHolidayType(): void */ public function HolidayDataProvider(): array { - return $this->generateRandomDatesWithModifier(2, 06, function ($year, \DateTime $date) { + return $this->generateRandomDatesWithModifier(2, 06, function ($year, DateTime $date) { // in 2015 some policy was introduced to make sure this holiday was celebrated during the working week. if ($year >= 2015 && $this->isWeekend($date)) { $date->modify('next monday'); diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index d451f1df1..02a3c91bf 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -293,7 +293,7 @@ public function generateRandomEasterDates($timezone = 'UTC', $iterations = 10, $ * @param int $year the year for which Easter needs to be calculated * @param string $timezone the timezone in which Easter is celebrated * - * @return \DateTime date of Easter + * @return DateTime date of Easter * @throws Exception * @see easter_days * @@ -305,7 +305,7 @@ public function generateRandomEasterDates($timezone = 'UTC', $iterations = 10, $ protected function calculateEaster(int $year, string $timezone): DateTime { if (\extension_loaded('calendar')) { - $easter_days = \easter_days($year); + $easter_days = easter_days($year); } else { $golden = (($year % 19) + 1); // The Golden Number @@ -462,7 +462,7 @@ public function generateRandomDatesWithHolidayMovedToMonday( $iterations = 10, $range = 1000 ): array { - return $this->generateRandomDatesWithModifier($month, $day, function ($year, \DateTime $date) { + return $this->generateRandomDatesWithModifier($month, $day, function ($year, DateTime $date) { if ($this->isWeekend($date)) { $date->modify('next monday'); } @@ -494,7 +494,7 @@ public function generateRandomDatesWithModifier( for ($i = 1; $i <= $iterations; ++$i) { $year = $this->generateRandomYear($range); - $date = new \DateTime("{$year}-{$month}-{$day}", new \DateTimeZone($timezone)); + $date = new DateTime("{$year}-{$month}-{$day}", new DateTimeZone($timezone)); $callback($year, $date); From 3576b521936e56dde3cb70ff695a5139898eb142 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 12:35:07 +0900 Subject: [PATCH 070/133] Correct order of elements. Signed-off-by: Sacha Telgenhof --- tests/Japan/AutumnalEquinoxDayTest.php | 6 +++--- tests/Japan/VernalEquinoxDayTest.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Japan/AutumnalEquinoxDayTest.php b/tests/Japan/AutumnalEquinoxDayTest.php index 584628dfd..be34ef019 100644 --- a/tests/Japan/AutumnalEquinoxDayTest.php +++ b/tests/Japan/AutumnalEquinoxDayTest.php @@ -56,9 +56,9 @@ public function testAutumnalEquinoxDayOnAfter2150() * * @dataProvider autumnalEquinoxHolidaysProvider * - * @param $year int year of example data to be tested - * @param $month int month (number) of example data to be tested - * @param $day int day of the month (number) of example data to be tested + * @param int $year year of example data to be tested + * @param int $month month (number) of example data to be tested + * @param int $day day of the month (number) of example data to be tested * * @throws ReflectionException * @throws Exception diff --git a/tests/Japan/VernalEquinoxDayTest.php b/tests/Japan/VernalEquinoxDayTest.php index b57a2ae08..834366c84 100644 --- a/tests/Japan/VernalEquinoxDayTest.php +++ b/tests/Japan/VernalEquinoxDayTest.php @@ -56,9 +56,9 @@ public function testVernalEquinoxDayOnAfter2150() * * @dataProvider vernalEquinoxHolidaysProvider * - * @param $year int year of example data to be tested - * @param $month int month (number) of example data to be tested - * @param $day int day of the month (number) of example data to be tested + * @param int $year year of example data to be tested + * @param int $month month (number) of example data to be tested + * @param int $day day of the month (number) of example data to be tested * * @throws ReflectionException * @throws Exception From 92f057885f585dd4cd4ed05ccfb2d93eb6a2347a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 12:35:43 +0900 Subject: [PATCH 071/133] Fixed entry. Signed-off-by: Sacha Telgenhof --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 648a6fa39..84c417656 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,4 @@ vendor composer.lock .php_cs.cache bin/_* -!/.phpunit.result.cache +.phpunit.result.cache From 97f9bb5efe53038280ceecafbf0e76cd0fcc1b73 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 12:37:06 +0900 Subject: [PATCH 072/133] Added documentation. Signed-off-by: Sacha Telgenhof --- tests/Base/YasumiWorkdayTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/Base/YasumiWorkdayTest.php b/tests/Base/YasumiWorkdayTest.php index d3422317d..a31abf030 100644 --- a/tests/Base/YasumiWorkdayTest.php +++ b/tests/Base/YasumiWorkdayTest.php @@ -20,6 +20,11 @@ use ReflectionException; use Yasumi\Yasumi; +/** + * Class YasumiWorkdayTest. + * + * Class for testing the workday functions. + */ class YasumiWorkdayTest extends TestCase { public const FORMAT_DATE = 'Y-m-d'; From 4a149bf810f5682b81315f67df309e40eb75fc0e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 12:39:11 +0900 Subject: [PATCH 073/133] Minor optimization declaring a closure static. Signed-off-by: Sacha Telgenhof --- tests/YasumiBase.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 02a3c91bf..ca1775ab0 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -370,7 +370,7 @@ protected function calculateEaster(int $year, string $timezone): DateTime */ public function generateRandomEasterMondayDates($timezone = 'UTC', $iterations = 10, $range = 1000): array { - return $this->generateRandomModifiedEasterDates(function (DateTime $date) { + return $this->generateRandomModifiedEasterDates(static function (DateTime $date) { $date->add(new DateInterval('P1D')); }, $timezone, $iterations, $range); } @@ -419,7 +419,7 @@ public function generateRandomModifiedEasterDates( */ public function generateRandomGoodFridayDates($timezone = 'UTC', $iterations = 10, $range = 1000): array { - return $this->generateRandomModifiedEasterDates(function (DateTime $date) { + return $this->generateRandomModifiedEasterDates(static function (DateTime $date) { $date->sub(new DateInterval('P2D')); }, $timezone, $iterations, $range); } @@ -437,7 +437,7 @@ public function generateRandomGoodFridayDates($timezone = 'UTC', $iterations = 1 */ public function generateRandomPentecostDates($timezone = 'UTC', $iterations = 10, $range = 1000): array { - return $this->generateRandomModifiedEasterDates(function (DateTime $date) { + return $this->generateRandomModifiedEasterDates(static function (DateTime $date) { $date->add(new DateInterval('P49D')); }, $timezone, $iterations, $range); } From e569d0a524b36aae8423d953c63a85932fd656a2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 12:42:46 +0900 Subject: [PATCH 074/133] Removed unused constants. Signed-off-by: Sacha Telgenhof --- tests/Portugal/PortugueseRepublicDayTest.php | 5 ----- tests/Spain/Melilla/MelillaBaseTestCase.php | 5 ----- tests/Spain/Navarre/NavarreBaseTestCase.php | 4 ---- 3 files changed, 14 deletions(-) diff --git a/tests/Portugal/PortugueseRepublicDayTest.php b/tests/Portugal/PortugueseRepublicDayTest.php index 988c21a68..e211f67ef 100644 --- a/tests/Portugal/PortugueseRepublicDayTest.php +++ b/tests/Portugal/PortugueseRepublicDayTest.php @@ -29,11 +29,6 @@ class PortugueseRepublicDayTest extends PortugalBaseTestCase implements YasumiTe */ public const ESTABLISHMENT_YEAR = 1910; - /** - * Holiday was abolished by the portuguese government in 2013. - */ - public const HOLIDAY_YEAR_ABOLISHED = 2013; - /** * Holiday was restored by the portuguese government in 2016. */ diff --git a/tests/Spain/Melilla/MelillaBaseTestCase.php b/tests/Spain/Melilla/MelillaBaseTestCase.php index 715c416c6..623260a93 100644 --- a/tests/Spain/Melilla/MelillaBaseTestCase.php +++ b/tests/Spain/Melilla/MelillaBaseTestCase.php @@ -26,9 +26,4 @@ abstract class MelillaBaseTestCase extends SpainBaseTestCase * Name of the region (e.g. country / state) to be tested */ public const REGION = 'Spain/Melilla'; - - /** - * Timezone in which this provider has holidays defined - */ - public const TIMEZONE = 'Europe/Madrid'; } diff --git a/tests/Spain/Navarre/NavarreBaseTestCase.php b/tests/Spain/Navarre/NavarreBaseTestCase.php index 07b335a72..f8ef957bb 100644 --- a/tests/Spain/Navarre/NavarreBaseTestCase.php +++ b/tests/Spain/Navarre/NavarreBaseTestCase.php @@ -27,8 +27,4 @@ abstract class NavarreBaseTestCase extends SpainBaseTestCase */ public const REGION = 'Spain/Navarre'; - /** - * Timezone in which this provider has holidays defined - */ - public const TIMEZONE = 'Europe/Madrid'; } From c1a6c4aebaa53efc5288390c900fad09632b28d5 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 13:10:45 +0900 Subject: [PATCH 075/133] Applying the use of strict types. Strict typing allows for improved readability, maintainability, and less bugs and security vulnerabilities. Signed-off-by: Sacha Telgenhof --- tests/Australia/ACT/ACTBaseTestCase.php | 2 +- tests/Australia/ACT/ACTTest.php | 2 +- tests/Australia/ACT/AnzacDayTest.php | 2 +- tests/Australia/ACT/AustraliaDayTest.php | 2 +- tests/Australia/ACT/BoxingDayTest.php | 2 +- tests/Australia/ACT/CanberraDayTest.php | 2 +- tests/Australia/ACT/ChristmasDayTest.php | 2 +- tests/Australia/ACT/EasterMondayTest.php | 2 +- tests/Australia/ACT/EasterSaturdayTest.php | 2 +- tests/Australia/ACT/EasterSundayTest.php | 2 +- tests/Australia/ACT/GoodFridayTest.php | 2 +- tests/Australia/ACT/LabourDayTest.php | 2 +- tests/Australia/ACT/NewYearsDayTest.php | 2 +- tests/Australia/ACT/QueensBirthdayTest.php | 2 +- tests/Australia/ACT/ReconciliationDayTest.php | 2 +- tests/Australia/AnzacDayTest.php | 2 +- tests/Australia/AustraliaBaseTestCase.php | 2 +- tests/Australia/AustraliaDayTest.php | 2 +- tests/Australia/AustraliaTest.php | 2 +- tests/Australia/BoxingDayTest.php | 2 +- tests/Australia/ChristmasDayTest.php | 2 +- tests/Australia/EasterMondayTest.php | 2 +- tests/Australia/GoodFridayTest.php | 2 +- tests/Australia/NSW/AnzacDayTest.php | 2 +- tests/Australia/NSW/AustraliaDayTest.php | 2 +- tests/Australia/NSW/BankHolidayTest.php | 2 +- tests/Australia/NSW/BoxingDayTest.php | 2 +- tests/Australia/NSW/ChristmasDayTest.php | 2 +- tests/Australia/NSW/EasterMondayTest.php | 2 +- tests/Australia/NSW/EasterSaturdayTest.php | 2 +- tests/Australia/NSW/EasterSundayTest.php | 2 +- tests/Australia/NSW/GoodFridayTest.php | 2 +- tests/Australia/NSW/LabourDayTest.php | 2 +- tests/Australia/NSW/NSWBaseTestCase.php | 2 +- tests/Australia/NSW/NSWTest.php | 2 +- tests/Australia/NSW/NewYearsDayTest.php | 2 +- tests/Australia/NSW/QueensBirthdayTest.php | 2 +- tests/Australia/NT/AnzacDayTest.php | 2 +- tests/Australia/NT/AustraliaDayTest.php | 2 +- tests/Australia/NT/BoxingDayTest.php | 2 +- tests/Australia/NT/ChristmasDayTest.php | 2 +- tests/Australia/NT/EasterMondayTest.php | 2 +- tests/Australia/NT/EasterSaturdayTest.php | 2 +- tests/Australia/NT/GoodFridayTest.php | 2 +- tests/Australia/NT/MayDayTest.php | 2 +- tests/Australia/NT/NTBaseTestCase.php | 2 +- tests/Australia/NT/NTTest.php | 2 +- tests/Australia/NT/NewYearsDayTest.php | 2 +- tests/Australia/NT/PicnicDayTest.php | 2 +- tests/Australia/NT/QueensBirthdayTest.php | 2 +- tests/Australia/NewYearsDayTest.php | 2 +- tests/Australia/Queensland/AnzacDayTest.php | 2 +- tests/Australia/Queensland/AustraliaDayTest.php | 2 +- tests/Australia/Queensland/BoxingDayTest.php | 2 +- tests/Australia/Queensland/Brisbane/AnzacDayTest.php | 2 +- tests/Australia/Queensland/Brisbane/AustraliaDayTest.php | 2 +- tests/Australia/Queensland/Brisbane/BoxingDayTest.php | 2 +- .../Queensland/Brisbane/BrisbaneBaseTestCase.php | 2 +- tests/Australia/Queensland/Brisbane/BrisbaneTest.php | 2 +- tests/Australia/Queensland/Brisbane/ChristmasDayTest.php | 2 +- tests/Australia/Queensland/Brisbane/EasterMondayTest.php | 2 +- tests/Australia/Queensland/Brisbane/GoodFridayTest.php | 2 +- tests/Australia/Queensland/Brisbane/LabourDayTest.php | 2 +- tests/Australia/Queensland/Brisbane/NewYearsDayTest.php | 2 +- tests/Australia/Queensland/Brisbane/PeoplesDayTest.php | 2 +- .../Australia/Queensland/Brisbane/QueensBirthdayTest.php | 2 +- tests/Australia/Queensland/ChristmasDayTest.php | 2 +- tests/Australia/Queensland/EasterMondayTest.php | 2 +- tests/Australia/Queensland/GoodFridayTest.php | 2 +- tests/Australia/Queensland/LabourDayTest.php | 2 +- tests/Australia/Queensland/NewYearsDayTest.php | 2 +- tests/Australia/Queensland/QueensBirthdayTest.php | 2 +- tests/Australia/Queensland/QueenslandBaseTestCase.php | 2 +- tests/Australia/Queensland/QueenslandTest.php | 2 +- tests/Australia/SA/AdelaideCupDayTest.php | 2 +- tests/Australia/SA/AnzacDayTest.php | 2 +- tests/Australia/SA/AustraliaDayTest.php | 2 +- tests/Australia/SA/ChristmasDayTest.php | 2 +- tests/Australia/SA/EasterMondayTest.php | 2 +- tests/Australia/SA/EasterSaturdayTest.php | 2 +- tests/Australia/SA/GoodFridayTest.php | 2 +- tests/Australia/SA/LabourDayTest.php | 2 +- tests/Australia/SA/NewYearsDayTest.php | 2 +- tests/Australia/SA/ProclamationDayTest.php | 2 +- tests/Australia/SA/QueensBirthdayTest.php | 2 +- tests/Australia/SA/SABaseTestCase.php | 2 +- tests/Australia/SA/SATest.php | 2 +- tests/Australia/Tasmania/AnzacDayTest.php | 2 +- tests/Australia/Tasmania/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/BoxingDayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/AnzacDayTest.php | 2 +- .../Australia/Tasmania/CentralNorth/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/BoxingDayTest.php | 2 +- .../Tasmania/CentralNorth/CentralNorthBaseTestCase.php | 2 +- .../Australia/Tasmania/CentralNorth/CentralNorthTest.php | 2 +- .../Australia/Tasmania/CentralNorth/ChristmasDayTest.php | 2 +- .../Tasmania/CentralNorth/DevonportShowTest.php | 2 +- .../Australia/Tasmania/CentralNorth/EasterMondayTest.php | 2 +- .../Australia/Tasmania/CentralNorth/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/GoodFridayTest.php | 2 +- .../Australia/Tasmania/CentralNorth/NewYearsDayTest.php | 2 +- .../Tasmania/CentralNorth/QueensBirthdayTest.php | 2 +- .../Tasmania/CentralNorth/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/ChristmasDayTest.php | 2 +- tests/Australia/Tasmania/EasterMondayTest.php | 2 +- tests/Australia/Tasmania/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/FlindersIsland/AnzacDayTest.php | 2 +- .../Tasmania/FlindersIsland/AustraliaDayTest.php | 2 +- .../Australia/Tasmania/FlindersIsland/BoxingDayTest.php | 2 +- .../Tasmania/FlindersIsland/ChristmasDayTest.php | 2 +- .../Tasmania/FlindersIsland/EasterMondayTest.php | 2 +- .../Tasmania/FlindersIsland/EightHourDayTest.php | 2 +- .../FlindersIsland/FlindersIslandBaseTestCase.php | 2 +- .../Tasmania/FlindersIsland/FlindersIslandShowTest.php | 2 +- .../Tasmania/FlindersIsland/FlindersIslandTest.php | 2 +- .../Australia/Tasmania/FlindersIsland/GoodFridayTest.php | 2 +- .../Tasmania/FlindersIsland/NewYearsDayTest.php | 2 +- .../Tasmania/FlindersIsland/QueensBirthdayTest.php | 2 +- .../Tasmania/FlindersIsland/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/GoodFridayTest.php | 2 +- tests/Australia/Tasmania/KingIsland/AnzacDayTest.php | 2 +- tests/Australia/Tasmania/KingIsland/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/KingIsland/BoxingDayTest.php | 2 +- tests/Australia/Tasmania/KingIsland/ChristmasDayTest.php | 2 +- tests/Australia/Tasmania/KingIsland/EasterMondayTest.php | 2 +- tests/Australia/Tasmania/KingIsland/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/KingIsland/GoodFridayTest.php | 2 +- .../Tasmania/KingIsland/KingIslandBaseTestCase.php | 2 +- .../Australia/Tasmania/KingIsland/KingIslandShowTest.php | 2 +- tests/Australia/Tasmania/KingIsland/KingIslandTest.php | 2 +- tests/Australia/Tasmania/KingIsland/NewYearsDayTest.php | 2 +- .../Australia/Tasmania/KingIsland/QueensBirthdayTest.php | 2 +- .../Australia/Tasmania/KingIsland/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/Northeast/AnzacDayTest.php | 2 +- tests/Australia/Tasmania/Northeast/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/Northeast/BoxingDayTest.php | 2 +- tests/Australia/Tasmania/Northeast/ChristmasDayTest.php | 2 +- tests/Australia/Tasmania/Northeast/EasterMondayTest.php | 2 +- tests/Australia/Tasmania/Northeast/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/Northeast/GoodFridayTest.php | 2 +- .../Australia/Tasmania/Northeast/LauncestonShowTest.php | 2 +- tests/Australia/Tasmania/Northeast/NewYearsDayTest.php | 2 +- .../Tasmania/Northeast/NortheastBaseTestCase.php | 2 +- tests/Australia/Tasmania/Northeast/NortheastTest.php | 2 +- .../Australia/Tasmania/Northeast/QueensBirthdayTest.php | 2 +- tests/Australia/Tasmania/Northeast/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/Northwest/AnzacDayTest.php | 2 +- tests/Australia/Tasmania/Northwest/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/Northwest/BoxingDayTest.php | 2 +- tests/Australia/Tasmania/Northwest/BurnieShowTest.php | 2 +- tests/Australia/Tasmania/Northwest/ChristmasDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/AGFESTTest.php | 2 +- .../Tasmania/Northwest/CircularHead/AnzacDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/AustraliaDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/BoxingDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/BurnieShowTest.php | 2 +- .../Tasmania/Northwest/CircularHead/ChristmasDayTest.php | 2 +- .../Northwest/CircularHead/CircularHeadBaseTestCase.php | 2 +- .../Tasmania/Northwest/CircularHead/CircularHeadTest.php | 2 +- .../Tasmania/Northwest/CircularHead/EasterMondayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/EightHourDayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/GoodFridayTest.php | 2 +- .../Tasmania/Northwest/CircularHead/NewYearsDayTest.php | 2 +- .../Northwest/CircularHead/QueensBirthdayTest.php | 2 +- .../Northwest/CircularHead/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/Northwest/EasterMondayTest.php | 2 +- tests/Australia/Tasmania/Northwest/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/Northwest/GoodFridayTest.php | 2 +- tests/Australia/Tasmania/Northwest/NewYearsDayTest.php | 2 +- .../Tasmania/Northwest/NorthwestBaseTestCase.php | 2 +- tests/Australia/Tasmania/Northwest/NorthwestTest.php | 2 +- .../Australia/Tasmania/Northwest/QueensBirthdayTest.php | 2 +- tests/Australia/Tasmania/Northwest/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/QueensBirthdayTest.php | 2 +- tests/Australia/Tasmania/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/South/AnzacDayTest.php | 2 +- tests/Australia/Tasmania/South/AustraliaDayTest.php | 2 +- tests/Australia/Tasmania/South/BoxingDayTest.php | 2 +- tests/Australia/Tasmania/South/ChristmasDayTest.php | 2 +- tests/Australia/Tasmania/South/EasterMondayTest.php | 2 +- tests/Australia/Tasmania/South/EightHourDayTest.php | 2 +- tests/Australia/Tasmania/South/GoodFridayTest.php | 2 +- tests/Australia/Tasmania/South/HobartShowTest.php | 2 +- tests/Australia/Tasmania/South/NewYearsDayTest.php | 2 +- tests/Australia/Tasmania/South/QueensBirthdayTest.php | 2 +- tests/Australia/Tasmania/South/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/South/SouthBaseTestCase.php | 2 +- tests/Australia/Tasmania/South/SouthTest.php | 2 +- .../Australia/Tasmania/South/Southeast/AnzacDayTest.php | 2 +- .../Tasmania/South/Southeast/AustraliaDayTest.php | 2 +- .../Australia/Tasmania/South/Southeast/BoxingDayTest.php | 2 +- .../Tasmania/South/Southeast/ChristmasDayTest.php | 2 +- .../Tasmania/South/Southeast/EasterMondayTest.php | 2 +- .../Tasmania/South/Southeast/EightHourDayTest.php | 2 +- .../Tasmania/South/Southeast/GoodFridayTest.php | 2 +- .../Tasmania/South/Southeast/HobartRegattaTest.php | 2 +- .../Tasmania/South/Southeast/HobartShowTest.php | 2 +- .../Tasmania/South/Southeast/NewYearsDayTest.php | 2 +- .../Tasmania/South/Southeast/QueensBirthdayTest.php | 2 +- .../Tasmania/South/Southeast/SoutheastBaseTestCase.php | 2 +- .../Australia/Tasmania/South/Southeast/SoutheastTest.php | 2 +- tests/Australia/Tasmania/TasmaniaBaseTestCase.php | 2 +- tests/Australia/Tasmania/TasmaniaTest.php | 2 +- tests/Australia/Victoria/AFLGrandFinalFridayTest.php | 2 +- tests/Australia/Victoria/AnzacDayTest.php | 2 +- tests/Australia/Victoria/AustraliaDayTest.php | 2 +- tests/Australia/Victoria/BoxingDayTest.php | 2 +- tests/Australia/Victoria/ChristmasDayTest.php | 2 +- tests/Australia/Victoria/EasterMondayTest.php | 2 +- tests/Australia/Victoria/EasterSaturdayTest.php | 2 +- tests/Australia/Victoria/EasterSundayTest.php | 2 +- tests/Australia/Victoria/GoodFridayTest.php | 2 +- tests/Australia/Victoria/LabourDayTest.php | 2 +- tests/Australia/Victoria/MelbourneCupDayTest.php | 2 +- tests/Australia/Victoria/NewYearsDayTest.php | 2 +- tests/Australia/Victoria/QueensBirthdayTest.php | 2 +- tests/Australia/Victoria/VictoriaBaseTestCase.php | 2 +- tests/Australia/Victoria/VictoriaTest.php | 2 +- tests/Australia/WA/AnzacDayTest.php | 2 +- tests/Australia/WA/AustraliaDayTest.php | 2 +- tests/Australia/WA/BoxingDayTest.php | 2 +- tests/Australia/WA/ChristmasDayTest.php | 2 +- tests/Australia/WA/EasterMondayTest.php | 2 +- tests/Australia/WA/GoodFridayTest.php | 2 +- tests/Australia/WA/LabourDayTest.php | 2 +- tests/Australia/WA/NewYearsDayTest.php | 2 +- tests/Australia/WA/QueensBirthdayTest.php | 2 +- tests/Australia/WA/WABaseTestCase.php | 2 +- tests/Australia/WA/WATest.php | 2 +- tests/Australia/WA/WesternAustraliaDayTest.php | 2 +- tests/Austria/AllSaintsDayTest.php | 2 +- tests/Austria/AscensionDayTest.php | 2 +- tests/Austria/AssumptionOfMaryTest.php | 2 +- tests/Austria/AustriaBaseTestCase.php | 2 +- tests/Austria/AustriaTest.php | 2 +- tests/Austria/ChristmasTest.php | 2 +- tests/Austria/CorpusChristiTest.php | 2 +- tests/Austria/EasterMondayTest.php | 2 +- tests/Austria/EasterTest.php | 2 +- tests/Austria/EpiphanyTest.php | 2 +- tests/Austria/ImmaculateConceptionTest.php | 2 +- tests/Austria/InternationalWorkersDayTest.php | 2 +- tests/Austria/NationalDayTest.php | 2 +- tests/Austria/NewYearsDayTest.php | 2 +- tests/Austria/PentecostMondayTest.php | 2 +- tests/Austria/PentecostTest.php | 2 +- tests/Austria/SecondChristmasDayTest.php | 2 +- tests/Base/HolidayBetweenFilterTest.php | 2 +- tests/Base/HolidayFiltersTest.php | 2 +- tests/Base/HolidayOnFilterTest.php | 2 +- tests/Base/HolidayTest.php | 2 +- tests/Base/TranslationsTest.php | 2 +- tests/Base/YasumiExternalProvider.php | 2 +- tests/Base/YasumiTest.php | 2 +- tests/Base/YasumiWorkdayTest.php | 2 +- tests/Belgium/AllSaintsDayTest.php | 2 +- tests/Belgium/ArmisticeDayTest.php | 2 +- tests/Belgium/AscensionDayTest.php | 2 +- tests/Belgium/AssumptionOfMaryTest.php | 2 +- tests/Belgium/BelgiumBaseTestCase.php | 2 +- tests/Belgium/BelgiumTest.php | 2 +- tests/Belgium/ChristmasTest.php | 2 +- tests/Belgium/EasterMondayTest.php | 2 +- tests/Belgium/EasterTest.php | 2 +- tests/Belgium/InternationalWorkersDayTest.php | 2 +- tests/Belgium/NationalDayTest.php | 2 +- tests/Belgium/NewYearsDayTest.php | 2 +- tests/Belgium/PentecostTest.php | 2 +- tests/Belgium/pentecostMondayTest.php | 2 +- tests/Bosnia/BosniaBaseTestCase.php | 2 +- tests/Bosnia/BosniaTest.php | 2 +- tests/Bosnia/ChristmasDayTest.php | 2 +- tests/Bosnia/DayAfterNewYearsDay.php | 2 +- tests/Bosnia/EasterTest.php | 2 +- tests/Bosnia/IndependenceDayTest.php | 2 +- tests/Bosnia/InternationalWorkersDayTest.php | 2 +- tests/Bosnia/NewYearsDayTest.php | 2 +- tests/Bosnia/OrthodoxChristmasDay.php | 2 +- tests/Bosnia/SecondLabourDay.php | 2 +- tests/Bosnia/StatehoodDayTest.php | 2 +- tests/Brazil/AllSoulsDayTest.php | 2 +- tests/Brazil/AshWednesdayTest.php | 2 +- tests/Brazil/BrazilBaseTestCase.php | 2 +- tests/Brazil/BrazilTest.php | 2 +- tests/Brazil/CarnavalMondayTest.php | 2 +- tests/Brazil/CarnavalTuesdayTest.php | 2 +- tests/Brazil/ChristmasDayTest.php | 2 +- tests/Brazil/CorpusChristiTest.php | 2 +- tests/Brazil/EasterTest.php | 2 +- tests/Brazil/GoodFridayTest.php | 2 +- tests/Brazil/IndependenceDayTest.php | 2 +- tests/Brazil/InternationalWorkersDayTest.php | 2 +- tests/Brazil/NewYearsDayTest.php | 2 +- tests/Brazil/OurLadyOfAparecidaDayTest.php | 2 +- tests/Brazil/ProclamationOfRepublicDayTest.php | 2 +- tests/Brazil/TiradentesDayTest.php | 2 +- tests/Croatia/AllSaintsDayTest.php | 2 +- tests/Croatia/AntifascistStruggleDayTest.php | 2 +- tests/Croatia/AssumptionOfMaryTest.php | 2 +- tests/Croatia/ChristmasDayTest.php | 2 +- tests/Croatia/CorpusChristiTest.php | 2 +- tests/Croatia/CroatiaBaseTestCase.php | 2 +- tests/Croatia/EasterMondayTest.php | 2 +- tests/Croatia/EasterTest.php | 2 +- tests/Croatia/EpiphanyTest.php | 2 +- tests/Croatia/HomelandThanksgivingDayTest.php | 2 +- tests/Croatia/IndependenceDayTest.php | 2 +- tests/Croatia/InternationalWorkersDayTest.php | 2 +- tests/Croatia/NewYearsDayTest.php | 2 +- tests/Croatia/StStephensDayTest.php | 2 +- tests/Croatia/StatehoodDayTest.php | 2 +- tests/CzechRepublic/ChristmasDayTest.php | 2 +- tests/CzechRepublic/ChristmasEveTest.php | 2 +- tests/CzechRepublic/CzechRepublicBaseTestCase.php | 2 +- tests/CzechRepublic/CzechRepublicTest.php | 2 +- tests/CzechRepublic/CzechStateHoodDayTest.php | 2 +- tests/CzechRepublic/EasterMondayTest.php | 2 +- tests/CzechRepublic/GoodFridayTest.php | 2 +- .../IndependentCzechoslovakStateDayTest.php | 2 +- tests/CzechRepublic/InternationalWorkersDayTest.php | 2 +- tests/CzechRepublic/JanHusDayTest.php | 2 +- tests/CzechRepublic/NewYearsDayTest.php | 2 +- .../RenewalOfIndependentCzechStateDayTest.php | 2 +- tests/CzechRepublic/SaintsCyrilAndMethodiusDayTest.php | 2 +- tests/CzechRepublic/SecondChristmasDayTest.php | 2 +- .../StruggleForFreedomAndDemocracyDayTest.php | 2 +- tests/CzechRepublic/VictoryInEuropeDayTest.php | 2 +- tests/Denmark/AscensionDayTest.php | 2 +- tests/Denmark/ChristmasDayTest.php | 2 +- tests/Denmark/ChristmasEveTest.php | 2 +- tests/Denmark/ConstitutionDayTest.php | 2 +- tests/Denmark/DenmarkBaseTestCase.php | 2 +- tests/Denmark/DenmarkTest.php | 2 +- tests/Denmark/EasterMondayTest.php | 2 +- tests/Denmark/EasterTest.php | 2 +- tests/Denmark/GoodFridayTest.php | 2 +- tests/Denmark/GreatPrayerDayTest.php | 2 +- tests/Denmark/InternationalWorkersDayTest.php | 2 +- tests/Denmark/MaundyThursdayTest.php | 2 +- tests/Denmark/NewYearsDayTest.php | 2 +- tests/Denmark/NewYearsEveTest.php | 2 +- tests/Denmark/PentecostMondayTest.php | 2 +- tests/Denmark/PentecostTest.php | 2 +- tests/Denmark/SecondChristmasDayTest.php | 2 +- tests/Denmark/SummerTimeTest.php | 2 +- tests/Denmark/WinterTimeTest.php | 2 +- tests/Estonia/ChristmasDayTest.php | 2 +- tests/Estonia/ChristmasEveDayTest.php | 2 +- tests/Estonia/EasterDayTest.php | 2 +- tests/Estonia/EstoniaBaseTestCase.php | 2 +- tests/Estonia/EstoniaTest.php | 2 +- tests/Estonia/GoodFridayDayTest.php | 2 +- tests/Estonia/IndependenceDayTest.php | 2 +- tests/Estonia/InternationalWorkersDayTest.php | 2 +- tests/Estonia/NewYearsDayTest.php | 2 +- tests/Estonia/PentecostTest.php | 2 +- tests/Estonia/RestorationOfIndependenceDayTest.php | 2 +- tests/Estonia/SecondChristmasDayTest.php | 2 +- tests/Estonia/StJohnsDayTest.php | 2 +- tests/Estonia/VictoryDayTest.php | 2 +- tests/Finland/AllSaintsDayTest.php | 2 +- tests/Finland/AscensionDayTest.php | 2 +- tests/Finland/ChristmasDayTest.php | 2 +- tests/Finland/EasterMondayTest.php | 2 +- tests/Finland/EasterTest.php | 2 +- tests/Finland/EpiphanyTest.php | 2 +- tests/Finland/FinlandBaseTestCase.php | 2 +- tests/Finland/FinlandTest.php | 2 +- tests/Finland/GoodFridayTest.php | 2 +- tests/Finland/IndependenceDayTest.php | 2 +- tests/Finland/InternationalWorkersDayTest.php | 2 +- tests/Finland/NewYearsDayTest.php | 2 +- tests/Finland/PentecostTest.php | 2 +- tests/Finland/SecondChristmasDayTest.php | 2 +- tests/Finland/stJohnsDayTest.php | 2 +- tests/France/AllSaintsDayTest.php | 2 +- tests/France/ArmisticeDayTest.php | 2 +- tests/France/AscensionDayTest.php | 2 +- tests/France/AssumptionOfMaryTest.php | 2 +- tests/France/BasRhin/BasRhinBaseTestCase.php | 2 +- tests/France/BasRhin/BasRhinTest.php | 2 +- tests/France/BasRhin/GoodFridayTest.php | 2 +- tests/France/BasRhin/stStephensDayTest.php | 2 +- tests/France/BastilleDayTest.php | 2 +- tests/France/ChristmasDayTest.php | 2 +- tests/France/EasterMondayTest.php | 2 +- tests/France/FranceBaseTestCase.php | 2 +- tests/France/FranceTest.php | 2 +- tests/France/HautRhin/GoodFridayTest.php | 2 +- tests/France/HautRhin/HautRhinBaseTestCase.php | 2 +- tests/France/HautRhin/HautRhinTest.php | 2 +- tests/France/HautRhin/stStephensDayTest.php | 2 +- tests/France/InternationalWorkersDayTest.php | 2 +- tests/France/Moselle/GoodFridayTest.php | 2 +- tests/France/Moselle/MoselleBaseTestCase.php | 2 +- tests/France/Moselle/MoselleTest.php | 2 +- tests/France/Moselle/stStephensDayTest.php | 2 +- tests/France/NewYearsDayTest.php | 2 +- tests/France/PentecostMondayTest.php | 2 +- tests/France/VictoryInEuropeDayTest.php | 2 +- tests/Germany/AscensionDayTest.php | 2 +- tests/Germany/BadenWurttemberg/AllSaintsDayTest.php | 2 +- .../BadenWurttemberg/BadenWurttembergBaseTestCase.php | 2 +- tests/Germany/BadenWurttemberg/BadenWurttembergTest.php | 2 +- tests/Germany/BadenWurttemberg/CorpusChristiTest.php | 2 +- tests/Germany/BadenWurttemberg/EpiphanyTest.php | 2 +- tests/Germany/BadenWurttemberg/GermanUnityDayTest.php | 2 +- .../Germany/BadenWurttemberg/ReformationDay2017Test.php | 2 +- tests/Germany/Bavaria/AllSaintsDayTest.php | 2 +- tests/Germany/Bavaria/BavariaBaseTestCase.php | 2 +- tests/Germany/Bavaria/BavariaTest.php | 2 +- tests/Germany/Bavaria/CorpusChristiTest.php | 2 +- tests/Germany/Bavaria/EpiphanyTest.php | 2 +- tests/Germany/Bavaria/GermanUnityDayTest.php | 2 +- tests/Germany/Bavaria/ReformationDay2017Test.php | 2 +- tests/Germany/Berlin/BerlinBaseTestCase.php | 2 +- tests/Germany/Berlin/BerlinTest.php | 2 +- tests/Germany/Berlin/GermanUnityDayTest.php | 2 +- tests/Germany/Berlin/InternationalWomensDay2019Test.php | 2 +- tests/Germany/Berlin/ReformationDay2017Test.php | 2 +- tests/Germany/Brandenburg/BrandenburgBaseTestCase.php | 2 +- tests/Germany/Brandenburg/BrandenburgTest.php | 2 +- tests/Germany/Brandenburg/GermanUnityDayTest.php | 2 +- tests/Germany/Brandenburg/ReformationDayTest.php | 2 +- tests/Germany/Bremen/BremenBaseTestCase.php | 2 +- tests/Germany/Bremen/BremenTest.php | 2 +- tests/Germany/Bremen/GermanUnityDayTest.php | 2 +- tests/Germany/Bremen/ReformationDay2017Test.php | 2 +- tests/Germany/Bremen/ReformationDayTest.php | 2 +- tests/Germany/ChristmasTest.php | 2 +- tests/Germany/EasterMondayTest.php | 2 +- tests/Germany/GermanUnityDayTest.php | 2 +- tests/Germany/GermanyBaseTestCase.php | 2 +- tests/Germany/GermanyTest.php | 2 +- tests/Germany/GoodFridayTest.php | 2 +- tests/Germany/Hamburg/DayOfReformationTest.php | 2 +- tests/Germany/Hamburg/GermanUnityDay.php | 2 +- tests/Germany/Hamburg/HamburgBaseTestCase.php | 2 +- tests/Germany/Hamburg/HamburgTest.php | 2 +- tests/Germany/Hamburg/ReformationDay2017Test.php | 2 +- tests/Germany/Hesse/CorpusChristiTest.php | 2 +- tests/Germany/Hesse/GermanUnityDayTest.php | 2 +- tests/Germany/Hesse/HesseBaseTestCase.php | 2 +- tests/Germany/Hesse/HesseTest.php | 2 +- tests/Germany/Hesse/ReformationDay2017Test.php | 2 +- tests/Germany/InternationalWorkersDayTest.php | 2 +- tests/Germany/LowerSaxony/GermanUnityDayTest.php | 2 +- tests/Germany/LowerSaxony/LowerSaxonyBaseTestCase.php | 2 +- tests/Germany/LowerSaxony/LowerSaxonyTest.php | 2 +- tests/Germany/LowerSaxony/ReformationDay2017Test.php | 2 +- tests/Germany/LowerSaxony/ReformationDayTest.php | 2 +- .../MecklenburgWesternPomerania/GermanUnityDayTest.php | 2 +- .../MecklenburgWesternPomeraniaBaseTestCase.php | 2 +- .../MecklenburgWesternPomeraniaTest.php | 2 +- .../MecklenburgWesternPomerania/ReformationDayTest.php | 2 +- tests/Germany/NewYearsDayTest.php | 2 +- tests/Germany/NorthRhineWestphalia/AllSaintsDayTest.php | 2 +- tests/Germany/NorthRhineWestphalia/CorpusChristiTest.php | 2 +- .../Germany/NorthRhineWestphalia/GermanUnityDayTest.php | 2 +- .../NorthRhineWestphaliaBaseTestCase.php | 2 +- .../NorthRhineWestphalia/NorthRhineWestphaliaTest.php | 2 +- .../NorthRhineWestphalia/ReformationDay2017Test.php | 2 +- tests/Germany/PentecostMondayTest.php | 2 +- tests/Germany/ReformationDay2017Test.php | 2 +- tests/Germany/RhinelandPalatinate/AllSaintsDayTest.php | 2 +- tests/Germany/RhinelandPalatinate/CorpusChristiTest.php | 2 +- tests/Germany/RhinelandPalatinate/GermanUnityDayTest.php | 2 +- .../RhinelandPalatinate/ReformationDay2017Test.php | 2 +- .../RhinelandPalatinateBaseTestCase.php | 2 +- .../RhinelandPalatinate/RhinelandPalatinateTest.php | 2 +- tests/Germany/Saarland/AllSaintsDayTest.php | 2 +- tests/Germany/Saarland/AssumptionOfMaryTest.php | 2 +- tests/Germany/Saarland/CorpusChristiTest.php | 2 +- tests/Germany/Saarland/GermanUnityDayTest.php | 2 +- tests/Germany/Saarland/ReformationDay2017Test.php | 2 +- tests/Germany/Saarland/SaarlandBaseTestCase.php | 2 +- tests/Germany/Saarland/SaarlandTest.php | 2 +- tests/Germany/Saxony/GermanUnityDayTest.php | 2 +- tests/Germany/Saxony/ReformationDayTest.php | 2 +- tests/Germany/Saxony/RepentanceAndPrayerDayTest.php | 2 +- tests/Germany/Saxony/SaxonyBaseTestCase.php | 2 +- tests/Germany/Saxony/SaxonyTest.php | 2 +- tests/Germany/SaxonyAnhalt/EpiphanyTest.php | 2 +- tests/Germany/SaxonyAnhalt/GermanUnityDayTest.php | 2 +- tests/Germany/SaxonyAnhalt/ReformationDayTest.php | 2 +- tests/Germany/SaxonyAnhalt/SaxonyAnhaltBaseTestCase.php | 2 +- tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php | 2 +- tests/Germany/SchleswigHolstein/GermanUnityDayTest.php | 2 +- .../Germany/SchleswigHolstein/ReformationDay2017Test.php | 2 +- tests/Germany/SchleswigHolstein/ReformationDayTest.php | 2 +- .../SchleswigHolstein/SchleswigHolsteinBaseTestCase.php | 2 +- .../Germany/SchleswigHolstein/SchleswigHolsteinTest.php | 2 +- tests/Germany/SecondChristmasDayTest.php | 2 +- tests/Germany/Thuringia/GermanUnityDayTest.php | 2 +- tests/Germany/Thuringia/ReformationDayTest.php | 2 +- tests/Germany/Thuringia/ThuringiaBaseTestCase.php | 2 +- tests/Germany/Thuringia/ThuringiaTest.php | 2 +- tests/Greece/AnnunciationTest.php | 2 +- tests/Greece/AscensionDayTest.php | 2 +- tests/Greece/AssumptionOfMaryTest.php | 2 +- tests/Greece/ChristmasDayTest.php | 2 +- tests/Greece/CleanMondayTest.php | 2 +- tests/Greece/EasterMondayTest.php | 2 +- tests/Greece/EasterTest.php | 2 +- tests/Greece/EpiphanyTest.php | 2 +- tests/Greece/GreeceBaseTestCase.php | 2 +- tests/Greece/GreeceTest.php | 2 +- tests/Greece/IndepencenceDayTest.php | 2 +- tests/Greece/InternationalWorkersDayTest.php | 2 +- tests/Greece/NewYearsDayTest.php | 2 +- tests/Greece/OhiDayTest.php | 2 +- tests/Greece/PentecostMondayTest.php | 2 +- tests/Greece/PentecostTest.php | 2 +- tests/Greece/PolytechnioTest.php | 2 +- tests/Greece/ThreeHolyHierarchsTest.php | 2 +- tests/Greece/goodFridayTest.php | 2 +- tests/Hungary/AllSaintsDayTest.php | 2 +- tests/Hungary/ChristmasTest.php | 2 +- tests/Hungary/EasterMondayTest.php | 2 +- tests/Hungary/EasterTest.php | 2 +- tests/Hungary/HungaryBaseTestCase.php | 2 +- tests/Hungary/HungaryTest.php | 2 +- tests/Hungary/InternationalWorkersDayTest.php | 2 +- tests/Hungary/MemorialDay1848Test.php | 2 +- tests/Hungary/MemorialDay1956Test.php | 2 +- tests/Hungary/NewYearsDayTest.php | 2 +- tests/Hungary/PentecostMondayTest.php | 2 +- tests/Hungary/PentecostTest.php | 2 +- tests/Hungary/SecondChristmasDayTest.php | 2 +- tests/Hungary/StateFoundationDayTest.php | 2 +- tests/Ireland/AugustHolidayTest.php | 2 +- tests/Ireland/ChristmasDayTest.php | 2 +- tests/Ireland/EasterMondayTest.php | 2 +- tests/Ireland/EasterTest.php | 2 +- tests/Ireland/GoodFridayTest.php | 2 +- tests/Ireland/IrelandBaseTestCase.php | 2 +- tests/Ireland/IrelandTest.php | 2 +- tests/Ireland/JuneHolidayTest.php | 2 +- tests/Ireland/MayDayTest.php | 2 +- tests/Ireland/NewYearsDayTest.php | 2 +- tests/Ireland/OctoberHolidayTest.php | 2 +- tests/Ireland/PentecostTest.php | 2 +- tests/Ireland/StPatricksDayTest.php | 2 +- tests/Ireland/StStephensDayTest.php | 2 +- tests/Ireland/pentecostMondayTest.php | 2 +- tests/Italy/AllSaintsDayTest.php | 2 +- tests/Italy/AssumptionOfMaryTest.php | 2 +- tests/Italy/ChristmasTest.php | 2 +- tests/Italy/EasterMondayTest.php | 2 +- tests/Italy/EasterTest.php | 2 +- tests/Italy/EpiphanyTest.php | 2 +- tests/Italy/ImmaculateConceptionTest.php | 2 +- tests/Italy/InternationalWorkersDayTest.php | 2 +- tests/Italy/ItalyBaseTestCase.php | 2 +- tests/Italy/ItalyTest.php | 2 +- tests/Italy/LiberationDayTest.php | 2 +- tests/Italy/NewYearsDayTest.php | 2 +- tests/Italy/RepublicDayTest.php | 2 +- tests/Italy/stStephensDayTest.php | 2 +- tests/Japan/AutumnalEquinoxDayTest.php | 2 +- tests/Japan/ChildrensDayTest.php | 2 +- tests/Japan/ComingOfAgeDayTest.php | 2 +- tests/Japan/ConstitutionMemorialDayTest.php | 2 +- tests/Japan/CoronationDayTest.php | 2 +- tests/Japan/CultureDayTest.php | 2 +- tests/Japan/EmperorsBirthdayTest.php | 2 +- tests/Japan/EnthronementProclamationCeremonyTest.php | 2 +- tests/Japan/GreeneryDayTest.php | 2 +- tests/Japan/JapanBaseTestCase.php | 2 +- tests/Japan/JapanTest.php | 2 +- tests/Japan/LabourThanksgivingDayTest.php | 2 +- tests/Japan/MarineDayTest.php | 2 +- tests/Japan/MountainDayTest.php | 2 +- tests/Japan/NationalFoundationDayTest.php | 2 +- tests/Japan/NewYearsDayTest.php | 2 +- tests/Japan/PublicBridgeDayTest.php | 2 +- tests/Japan/RespectForTheAgedDayTest.php | 2 +- tests/Japan/ShowaDayTest.php | 2 +- tests/Japan/SportsDayTest.php | 2 +- tests/Japan/VernalEquinoxDayTest.php | 2 +- tests/Latvia/ChristmasDayTest.php | 2 +- tests/Latvia/ChristmasEveDayTest.php | 2 +- tests/Latvia/EasterDayTest.php | 2 +- tests/Latvia/EasterMondayDayTest.php | 2 +- tests/Latvia/GoodFridayDayTest.php | 2 +- tests/Latvia/InternationalWorkersDayTest.php | 2 +- tests/Latvia/LatviaBaseTestCase.php | 2 +- tests/Latvia/LatviaTest.php | 2 +- tests/Latvia/MidsummerEveDayTest.php | 2 +- tests/Latvia/NewYearsDayTest.php | 2 +- tests/Latvia/NewYearsEveDayTest.php | 2 +- .../Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php | 2 +- tests/Latvia/RestorationOfIndependenceDayTest.php | 2 +- tests/Latvia/SecondChristmasDayTest.php | 2 +- tests/Latvia/StJohnsDayTest.php | 2 +- tests/Lithuania/AllSaintsDayTest.php | 2 +- tests/Lithuania/AssumptionOfMaryDayTest.php | 2 +- tests/Lithuania/ChristmasDayTest.php | 2 +- tests/Lithuania/ChristmasEveDayTest.php | 2 +- tests/Lithuania/EasterDayTest.php | 2 +- tests/Lithuania/EasterMondayDayTest.php | 2 +- tests/Lithuania/InternationalWorkersDayTest.php | 2 +- tests/Lithuania/LithuaniaBaseTestCase.php | 2 +- tests/Lithuania/LithuaniaTest.php | 2 +- tests/Lithuania/NewYearsDayTest.php | 2 +- .../RestorationOfIndependenceOfLithuaniaDayTest.php | 2 +- .../RestorationOfTheStateOfLithuaniaDayTest.php | 2 +- tests/Lithuania/SecondChristmasDayTest.php | 2 +- tests/Lithuania/StJohnsDayTest.php | 2 +- tests/Lithuania/StatehoodDayTest.php | 2 +- tests/Netherlands/AscensionDayTest.php | 2 +- tests/Netherlands/AshWednesdayTest.php | 2 +- tests/Netherlands/ChristmasDayTest.php | 2 +- tests/Netherlands/CommemorationDayTest.php | 2 +- tests/Netherlands/EasterMondayTest.php | 2 +- tests/Netherlands/EasterTest.php | 2 +- tests/Netherlands/EpiphanyTest.php | 2 +- tests/Netherlands/FathersDayTest.php | 2 +- tests/Netherlands/GoodFridayTest.php | 2 +- tests/Netherlands/HalloweenTest.php | 2 +- tests/Netherlands/InternationalWorkersDayTest.php | 2 +- tests/Netherlands/KingsDayTest.php | 2 +- tests/Netherlands/LiberationDayTest.php | 2 +- tests/Netherlands/MothersDayTest.php | 2 +- tests/Netherlands/NetherlandsBaseTestCase.php | 2 +- tests/Netherlands/NetherlandsTest.php | 2 +- tests/Netherlands/NewYearsDayTest.php | 2 +- tests/Netherlands/PentecostTest.php | 2 +- tests/Netherlands/QueensDayTest.php | 2 +- tests/Netherlands/SummertimeTest.php | 2 +- tests/Netherlands/ValentinesDayTest.php | 2 +- tests/Netherlands/WintertimeTest.php | 2 +- tests/Netherlands/WorldAnimalDayTest.php | 2 +- tests/Netherlands/carnivalDayTest.php | 2 +- tests/Netherlands/pentecostMondayTest.php | 2 +- tests/Netherlands/princesDayTest.php | 2 +- tests/Netherlands/secondCarnivalDay.php | 2 +- tests/Netherlands/secondChristmasdayTest.php | 2 +- tests/Netherlands/stMartinsDayTest.php | 2 +- tests/Netherlands/stNicholasDayTest.php | 2 +- tests/Netherlands/thirdCarnivalDay.php | 2 +- tests/NewZealand/AnzacDayTest.php | 2 +- tests/NewZealand/BoxingDayTest.php | 2 +- tests/NewZealand/ChristmasDayTest.php | 2 +- tests/NewZealand/DayAfterNewYearsDayTest.php | 2 +- tests/NewZealand/EasterMondayTest.php | 2 +- tests/NewZealand/GoodFridayTest.php | 2 +- tests/NewZealand/LabourDayTest.php | 2 +- tests/NewZealand/NewYearsDayTest.php | 2 +- tests/NewZealand/NewZealandBaseTestCase.php | 2 +- tests/NewZealand/NewZealandTest.php | 2 +- tests/NewZealand/QueensBirthdayTest.php | 2 +- tests/NewZealand/WaitangiDayTest.php | 2 +- tests/Norway/AscensionDayTest.php | 2 +- tests/Norway/ChristmasDayTest.php | 2 +- tests/Norway/ConstitutionDayTest.php | 2 +- tests/Norway/EasterMondayTest.php | 2 +- tests/Norway/EasterTest.php | 2 +- tests/Norway/GoodFridayTest.php | 2 +- tests/Norway/InternationalWorkersDayTest.php | 2 +- tests/Norway/MaundyThursdayTest.php | 2 +- tests/Norway/NewYearsDayTest.php | 2 +- tests/Norway/NorwayBaseTestCase.php | 2 +- tests/Norway/NorwayTest.php | 2 +- tests/Norway/PentecostMondayTest.php | 2 +- tests/Norway/PentecostTest.php | 2 +- tests/Norway/SecondChristmasDayTest.php | 2 +- tests/Poland/AllSaintsDayTest.php | 2 +- tests/Poland/AssumptionOfMaryTest.php | 2 +- tests/Poland/ChristmasTest.php | 2 +- tests/Poland/ConstitutionDayTest.php | 2 +- tests/Poland/CorpusChristiTest.php | 2 +- tests/Poland/EasterMondayTest.php | 2 +- tests/Poland/EasterTest.php | 2 +- tests/Poland/EpiphanyTest.php | 2 +- tests/Poland/IndependenceDayTest.php | 2 +- tests/Poland/InternationalWorkersDayTest.php | 2 +- tests/Poland/NewYearsDayTest.php | 2 +- tests/Poland/PentecostTest.php | 2 +- tests/Poland/PolandBaseTestCase.php | 2 +- tests/Poland/PolandTest.php | 2 +- tests/Poland/SecondChristmasDayTest.php | 2 +- tests/Portugal/AllSaintsDayTest.php | 2 +- tests/Portugal/AssumptionOfMaryTest.php | 2 +- tests/Portugal/CarnationRevolutionDayTest.php | 2 +- tests/Portugal/ChristmasTest.php | 2 +- tests/Portugal/CorpusChristiTest.php | 2 +- tests/Portugal/EasterTest.php | 2 +- tests/Portugal/GoodFridayTest.php | 2 +- tests/Portugal/ImmaculateConceptionTest.php | 2 +- tests/Portugal/InternationalWorkersDayTest.php | 2 +- tests/Portugal/NewYearsDayTest.php | 2 +- tests/Portugal/PortugalBaseTestCase.php | 2 +- tests/Portugal/PortugalDayTest.php | 2 +- tests/Portugal/PortugalTest.php | 2 +- tests/Portugal/PortugueseRepublicDayTest.php | 2 +- tests/Portugal/RestorationOfIndependenceTest.php | 2 +- tests/Romania/AssumptionOfMaryTest.php | 2 +- tests/Romania/ChildrensDayTest.php | 2 +- tests/Romania/ChristmasDayTest.php | 2 +- tests/Romania/ConstantinBrancusiDayTest.php | 2 +- tests/Romania/DayAfterNewYearsDayTest.php | 2 +- tests/Romania/EasterMondayTest.php | 2 +- tests/Romania/EasterTest.php | 2 +- tests/Romania/InternationalWorkersDayTest.php | 2 +- tests/Romania/NationalDayTest.php | 2 +- tests/Romania/NewYearsDayTest.php | 2 +- tests/Romania/PentecostMondayTest.php | 2 +- tests/Romania/PentecostTest.php | 2 +- tests/Romania/RomaniaBaseTestCase.php | 2 +- tests/Romania/RomaniaTest.php | 2 +- tests/Romania/SecondChristmasDayTest.php | 2 +- tests/Romania/StAndrewDayTest.php | 2 +- tests/Romania/UnitedPrincipalitiesDayTest.php | 2 +- tests/Russia/DefenceOfTheFatherlandDayTest.php | 2 +- tests/Russia/InternationalWomensDayTest.php | 2 +- tests/Russia/NewYearHolidaysDay2Test.php | 2 +- tests/Russia/NewYearHolidaysDay3Test.php | 2 +- tests/Russia/NewYearHolidaysDay4Test.php | 2 +- tests/Russia/NewYearHolidaysDay5Test.php | 2 +- tests/Russia/NewYearHolidaysDay6Test.php | 2 +- tests/Russia/NewYearHolidaysDay8Test.php | 2 +- tests/Russia/NewYearsDayTest.php | 2 +- tests/Russia/OrthodoxChristmasDayTest.php | 2 +- tests/Russia/RussiaBaseTestCase.php | 2 +- tests/Russia/RussiaDayTest.php | 2 +- tests/Russia/RussiaTest.php | 2 +- tests/Russia/SpringAndLabourDayTest.php | 2 +- tests/Russia/UnityDayTest.php | 2 +- tests/Russia/VictoryDayTest.php | 2 +- tests/Slovakia/AllSaintsDayTest.php | 2 +- tests/Slovakia/ChristmasDayTest.php | 2 +- tests/Slovakia/ChristmasEveTest.php | 2 +- tests/Slovakia/EasterMondayTest.php | 2 +- tests/Slovakia/EpiphanyTest.php | 2 +- tests/Slovakia/GoodFridayTest.php | 2 +- tests/Slovakia/InternationalWorkersDayTest.php | 2 +- tests/Slovakia/OurLadyOfSorrowsDayTest.php | 2 +- tests/Slovakia/SaintsCyrilAndMethodiusDayTest.php | 2 +- tests/Slovakia/SecondChristmasDayTest.php | 2 +- tests/Slovakia/SlovakConstitutionDayTest.php | 2 +- tests/Slovakia/SlovakIndependeceDayTest.php | 2 +- tests/Slovakia/SlovakNationalUprisingDayTest.php | 2 +- tests/Slovakia/SlovakiaBaseTestCase.php | 2 +- tests/Slovakia/SlovakiaTest.php | 2 +- tests/Slovakia/StruggleForFreedomAndDemocracyDayTest.php | 2 +- tests/Slovakia/VictoryInEuropeDayTest.php | 2 +- tests/SouthAfrica/ChristmasDayTest.php | 2 +- tests/SouthAfrica/FamilyDayTest.php | 2 +- tests/SouthAfrica/FreedomDayTest.php | 2 +- tests/SouthAfrica/GoodFridayTest.php | 2 +- tests/SouthAfrica/HeritageDayTest.php | 2 +- tests/SouthAfrica/HumanRightsDayTest.php | 2 +- tests/SouthAfrica/MunicipalElections2016DayTest.php | 2 +- tests/SouthAfrica/NationalWomensDayTest.php | 2 +- tests/SouthAfrica/NewYearsDayTest.php | 2 +- tests/SouthAfrica/ReconciliationDayTest.php | 2 +- tests/SouthAfrica/SecondChristmasDayTest.php | 2 +- tests/SouthAfrica/SouthAfricaBaseTestCase.php | 2 +- tests/SouthAfrica/SouthAfricaTest.php | 2 +- tests/SouthAfrica/SubstituteDayOfGoodwillTest.php | 2 +- tests/SouthAfrica/WorkersDayTest.php | 2 +- tests/SouthAfrica/YouthDayTest.php | 2 +- tests/SouthKorea/ArborDayTest.php | 2 +- tests/SouthKorea/ArmedForcesDayTest.php | 2 +- tests/SouthKorea/BuddhasBirthdayTest.php | 2 +- tests/SouthKorea/ChildrensDayTest.php | 2 +- tests/SouthKorea/ChristmasDayTest.php | 2 +- tests/SouthKorea/ChuseokTest.php | 2 +- tests/SouthKorea/ConstitutionDayTest.php | 2 +- tests/SouthKorea/GaecheonjeolTest.php | 2 +- tests/SouthKorea/HangulDayTest.php | 2 +- tests/SouthKorea/IndependenceMovementDayTest.php | 2 +- tests/SouthKorea/LiberationDayTest.php | 2 +- tests/SouthKorea/MemorialDayTest.php | 2 +- tests/SouthKorea/NewYearsDayTest.php | 2 +- tests/SouthKorea/SeollalTest.php | 2 +- tests/SouthKorea/SouthKoreaBaseTestCase.php | 2 +- tests/SouthKorea/SouthKoreaTest.php | 2 +- tests/Spain/AllSaintsDayTest.php | 2 +- tests/Spain/Andalusia/AndalusiaBaseTestCase.php | 2 +- tests/Spain/Andalusia/AndalusiaDayTest.php | 2 +- tests/Spain/Andalusia/AndalusiaTest.php | 2 +- tests/Spain/Aragon/AragonBaseTestCase.php | 2 +- tests/Spain/Aragon/AragonTest.php | 2 +- tests/Spain/Aragon/StGeorgesDayTest.php | 2 +- tests/Spain/AssumptionOfMaryTest.php | 2 +- tests/Spain/Asturias/AsturiasBaseTestCase.php | 2 +- tests/Spain/Asturias/AsturiasDayTest.php | 2 +- tests/Spain/Asturias/AsturiasTest.php | 2 +- .../BalearicIslands/BalearicIslandsBaseTestCase.php | 2 +- tests/Spain/BalearicIslands/BalearicIslandsDayTest.php | 2 +- tests/Spain/BalearicIslands/BalearicIslandsTest.php | 2 +- tests/Spain/BasqueCountry/BasqueCountryBaseTestCase.php | 2 +- tests/Spain/BasqueCountry/BasqueCountryDayTest.php | 2 +- tests/Spain/BasqueCountry/BasqueCountryTest.php | 2 +- tests/Spain/CanaryIslands/CanaryIslandsBaseTestCase.php | 2 +- tests/Spain/CanaryIslands/CanaryIslandsDayTest.php | 2 +- tests/Spain/CanaryIslands/CanaryIslandsTest.php | 2 +- tests/Spain/Cantabria/CantabriaBaseTestCase.php | 2 +- tests/Spain/Cantabria/CantabriaDayTest.php | 2 +- tests/Spain/Cantabria/CantabriaTest.php | 2 +- .../Spain/CastileAndLeon/CastileAndLeonBaseTestCase.php | 2 +- tests/Spain/CastileAndLeon/CastileAndLeonDayTest.php | 2 +- tests/Spain/CastileAndLeon/CastileAndLeonTest.php | 2 +- .../CastillaLaMancha/CastillaLaManchaBaseTestCase.php | 2 +- tests/Spain/CastillaLaMancha/CastillaLaManchaDayTest.php | 2 +- tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php | 2 +- tests/Spain/Catalonia/CataloniaBaseTestCase.php | 2 +- tests/Spain/Catalonia/CataloniaTest.php | 2 +- tests/Spain/Catalonia/nationalCataloniaDayTest.php | 2 +- tests/Spain/Catalonia/stJohnsDayTest.php | 2 +- tests/Spain/Ceuta/CeutaBaseTestCase.php | 2 +- tests/Spain/Ceuta/CeutaTest.php | 2 +- tests/Spain/Ceuta/ceutaDayTest.php | 2 +- tests/Spain/ChristmasTest.php | 2 +- .../CommunityOfMadrid/CommunityOfMadridBaseTestCase.php | 2 +- tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php | 2 +- .../Spain/CommunityOfMadrid/DosdeMayoUprisingDayTest.php | 2 +- tests/Spain/ConstitutionDayTest.php | 2 +- tests/Spain/EasterMondayTest.php | 2 +- tests/Spain/EpiphanyTest.php | 2 +- tests/Spain/Extremadura/ExtremaduraBaseTestCase.php | 2 +- tests/Spain/Extremadura/ExtremaduraDayTest.php | 2 +- tests/Spain/Extremadura/ExtremaduraTest.php | 2 +- tests/Spain/Galicia/GaliciaBaseTestCase.php | 2 +- tests/Spain/Galicia/GaliciaTest.php | 2 +- tests/Spain/Galicia/GalicianLiteratureDayTest.php | 2 +- tests/Spain/Galicia/stJamesDayTest.php | 2 +- tests/Spain/GoodFridayTest.php | 2 +- tests/Spain/ImmaculateConceptionTest.php | 2 +- tests/Spain/InternationalWorkersDayTest.php | 2 +- tests/Spain/LaRioja/LaRiojaBaseTestCase.php | 2 +- tests/Spain/LaRioja/LaRiojaDayTest.php | 2 +- tests/Spain/LaRioja/LaRiojaTest.php | 2 +- tests/Spain/MaundyThursdayTest.php | 2 +- tests/Spain/Melilla/MelillaBaseTestCase.php | 2 +- tests/Spain/Melilla/MelillaTest.php | 2 +- tests/Spain/NationalDayTest.php | 2 +- tests/Spain/Navarre/NavarreBaseTestCase.php | 2 +- tests/Spain/Navarre/NavarreTest.php | 2 +- tests/Spain/NewYearsDayTest.php | 2 +- .../Spain/RegionOfMurcia/RegionOfMurciaBaseTestCase.php | 2 +- tests/Spain/RegionOfMurcia/RegionOfMurciaDayTest.php | 2 +- tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php | 2 +- tests/Spain/SpainBaseTestCase.php | 2 +- tests/Spain/SpainTest.php | 2 +- .../ValencianCommunityBaseTestCase.php | 2 +- .../ValencianCommunity/ValencianCommunityDayTest.php | 2 +- .../Spain/ValencianCommunity/ValencianCommunityTest.php | 2 +- tests/Spain/ValentinesDayTest.php | 2 +- tests/Spain/stJosephsDayTest.php | 2 +- tests/Sweden/AllSaintsDayTest.php | 2 +- tests/Sweden/AllSaintsEveTest.php | 2 +- tests/Sweden/AscensionDayTest.php | 2 +- tests/Sweden/ChristmasDayTest.php | 2 +- tests/Sweden/ChristmasEveTest.php | 2 +- tests/Sweden/EasterMondayTest.php | 2 +- tests/Sweden/EasterTest.php | 2 +- tests/Sweden/EpiphanyEveTest.php | 2 +- tests/Sweden/EpiphanyTest.php | 2 +- tests/Sweden/GoodFridayTest.php | 2 +- tests/Sweden/InternationalWorkersDayTest.php | 2 +- tests/Sweden/NationalDayTest.php | 2 +- tests/Sweden/NewYearsDayTest.php | 2 +- tests/Sweden/NewYearsEveTest.php | 2 +- tests/Sweden/PentecostTest.php | 2 +- tests/Sweden/SecondChristmasDayTest.php | 2 +- tests/Sweden/StJohnsDayTest.php | 2 +- tests/Sweden/StJohnsEveTest.php | 2 +- tests/Sweden/SwedenBaseTestCase.php | 2 +- tests/Sweden/SwedenTest.php | 2 +- tests/Sweden/WalpurgisEveTest.php | 2 +- tests/Switzerland/Aargau/AargauBaseTestCase.php | 2 +- tests/Switzerland/Aargau/AargauTest.php | 2 +- tests/Switzerland/Aargau/AscensionDayTest.php | 2 +- tests/Switzerland/Aargau/ChristmasDayTest.php | 2 +- tests/Switzerland/Aargau/GoodFridayTest.php | 2 +- tests/Switzerland/Aargau/NewYearsDayTest.php | 2 +- .../AppenzellAusserrhodenBaseTestCase.php | 2 +- .../AppenzellAusserrhoden/AppenzellAusserrhodenTest.php | 2 +- .../AppenzellAusserrhoden/AscensionDayTest.php | 2 +- .../AppenzellAusserrhoden/ChristmasDayTest.php | 2 +- .../AppenzellAusserrhoden/EasterMondayTest.php | 2 +- .../Switzerland/AppenzellAusserrhoden/GoodFridayTest.php | 2 +- .../AppenzellAusserrhoden/NewYearsDayTest.php | 2 +- .../AppenzellAusserrhoden/PentecostMondayTest.php | 2 +- .../AppenzellAusserrhoden/StStephensDayTest.php | 2 +- .../AppenzellInnerrhoden/AllSaintsDayTest.php | 2 +- .../AppenzellInnerrhodenBaseTestCase.php | 2 +- .../AppenzellInnerrhoden/AppenzellInnerrhodenTest.php | 2 +- .../AppenzellInnerrhoden/AscensionDayTest.php | 2 +- .../AppenzellInnerrhoden/AssumptionOfMaryTest.php | 2 +- .../AppenzellInnerrhoden/ChristmasDayTest.php | 2 +- .../AppenzellInnerrhoden/CorpusChristiTest.php | 2 +- .../AppenzellInnerrhoden/EasterMondayTest.php | 2 +- .../Switzerland/AppenzellInnerrhoden/GoodFridayTest.php | 2 +- .../AppenzellInnerrhoden/ImmaculateConceptionTest.php | 2 +- .../Switzerland/AppenzellInnerrhoden/NewYearsDayTest.php | 2 +- .../AppenzellInnerrhoden/PentecostMondayTest.php | 2 +- .../AppenzellInnerrhoden/StStephensDayTest.php | 2 +- tests/Switzerland/BaselLandschaft/AscensionDayTest.php | 2 +- .../BaselLandschaft/BaselLandschaftBaseTestCase.php | 2 +- .../Switzerland/BaselLandschaft/BaselLandschaftTest.php | 2 +- tests/Switzerland/BaselLandschaft/ChristmasDayTest.php | 2 +- tests/Switzerland/BaselLandschaft/EasterMondayTest.php | 2 +- tests/Switzerland/BaselLandschaft/GoodFridayTest.php | 2 +- tests/Switzerland/BaselLandschaft/NewYearsDayTest.php | 2 +- .../Switzerland/BaselLandschaft/PentecostMondayTest.php | 2 +- tests/Switzerland/BaselLandschaft/StStephensDayTest.php | 2 +- tests/Switzerland/BaselLandschaft/WorkersDayTest.php | 2 +- tests/Switzerland/BaselStadt/AscensionDayTest.php | 2 +- tests/Switzerland/BaselStadt/BaselStadtBaseTestCase.php | 2 +- tests/Switzerland/BaselStadt/BaselStadtTest.php | 2 +- tests/Switzerland/BaselStadt/ChristmasDayTest.php | 2 +- tests/Switzerland/BaselStadt/EasterMondayTest.php | 2 +- tests/Switzerland/BaselStadt/GoodFridayTest.php | 2 +- tests/Switzerland/BaselStadt/NewYearsDayTest.php | 2 +- tests/Switzerland/BaselStadt/PentecostMondayTest.php | 2 +- tests/Switzerland/BaselStadt/StStephensDayTest.php | 2 +- tests/Switzerland/BaselStadt/WorkersDayTest.php | 2 +- tests/Switzerland/Bern/AscensionDayTest.php | 2 +- tests/Switzerland/Bern/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Bern/BernBaseTestCase.php | 2 +- tests/Switzerland/Bern/BernTest.php | 2 +- tests/Switzerland/Bern/ChristmasDayTest.php | 2 +- tests/Switzerland/Bern/EasterMondayTest.php | 2 +- tests/Switzerland/Bern/GoodFridayTest.php | 2 +- tests/Switzerland/Bern/NewYearsDayTest.php | 2 +- tests/Switzerland/Bern/PentecostMondayTest.php | 2 +- tests/Switzerland/Bern/StStephensDayTest.php | 2 +- tests/Switzerland/Fribourg/AscensionDayTest.php | 2 +- tests/Switzerland/Fribourg/ChristmasDayTest.php | 2 +- tests/Switzerland/Fribourg/EasterMondayTest.php | 2 +- tests/Switzerland/Fribourg/FribourgBaseTestCase.php | 2 +- tests/Switzerland/Fribourg/FribourgTest.php | 2 +- tests/Switzerland/Fribourg/GoodFridayTest.php | 2 +- tests/Switzerland/Fribourg/NewYearsDayTest.php | 2 +- tests/Switzerland/Fribourg/PentecostMondayTest.php | 2 +- tests/Switzerland/Geneva/AscensionDayTest.php | 2 +- tests/Switzerland/Geneva/ChristmasDayTest.php | 2 +- tests/Switzerland/Geneva/EasterMondayTest.php | 2 +- tests/Switzerland/Geneva/GenevaBaseTestCase.php | 2 +- tests/Switzerland/Geneva/GenevaTest.php | 2 +- tests/Switzerland/Geneva/GoodFridayTest.php | 2 +- tests/Switzerland/Geneva/JeuneGenevoisTest.php | 2 +- tests/Switzerland/Geneva/NewYearsDayTest.php | 2 +- tests/Switzerland/Geneva/PentecostMondayTest.php | 2 +- tests/Switzerland/Geneva/RestaurationGenevoiseTest.php | 2 +- tests/Switzerland/Glarus/AllSaintsDayTest.php | 2 +- tests/Switzerland/Glarus/AscensionDayTest.php | 2 +- tests/Switzerland/Glarus/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Glarus/ChristmasDayTest.php | 2 +- tests/Switzerland/Glarus/EasterMondayTest.php | 2 +- tests/Switzerland/Glarus/GlarusBaseTestCase.php | 2 +- tests/Switzerland/Glarus/GlarusTest.php | 2 +- tests/Switzerland/Glarus/GoodFridayTest.php | 2 +- tests/Switzerland/Glarus/NafelserFahrtTest.php | 2 +- tests/Switzerland/Glarus/NewYearsDayTest.php | 2 +- tests/Switzerland/Glarus/PentecostMondayTest.php | 2 +- tests/Switzerland/Glarus/StStephensDayTest.php | 2 +- tests/Switzerland/Grisons/AscensionDayTest.php | 2 +- tests/Switzerland/Grisons/ChristmasDayTest.php | 2 +- tests/Switzerland/Grisons/EasterMondayTest.php | 2 +- tests/Switzerland/Grisons/GoodFridayTest.php | 2 +- tests/Switzerland/Grisons/GrisonsBaseTestCase.php | 2 +- tests/Switzerland/Grisons/GrisonsTest.php | 2 +- tests/Switzerland/Grisons/NewYearsDayTest.php | 2 +- tests/Switzerland/Grisons/PentecostMondayTest.php | 2 +- tests/Switzerland/Grisons/StStephensDayTest.php | 2 +- tests/Switzerland/Jura/AllSaintsDayTest.php | 2 +- tests/Switzerland/Jura/AscensionDayTest.php | 2 +- tests/Switzerland/Jura/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Jura/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Jura/ChristmasDayTest.php | 2 +- tests/Switzerland/Jura/CorpusChristiTest.php | 2 +- tests/Switzerland/Jura/EasterMondayTest.php | 2 +- tests/Switzerland/Jura/GoodFridayTest.php | 2 +- tests/Switzerland/Jura/JuraBaseTestCase.php | 2 +- tests/Switzerland/Jura/JuraTest.php | 2 +- tests/Switzerland/Jura/NewYearsDayTest.php | 2 +- tests/Switzerland/Jura/PentecostMondayTest.php | 2 +- tests/Switzerland/Jura/PlebisciteJurassienTest.php | 2 +- tests/Switzerland/Jura/WorkersDayTest.php | 2 +- tests/Switzerland/Lucerne/AllSaintsDayTest.php | 2 +- tests/Switzerland/Lucerne/AscensionDayTest.php | 2 +- tests/Switzerland/Lucerne/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Lucerne/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Lucerne/ChristmasDayTest.php | 2 +- tests/Switzerland/Lucerne/CorpusChristiTest.php | 2 +- tests/Switzerland/Lucerne/EasterMondayTest.php | 2 +- tests/Switzerland/Lucerne/GoodFridayTest.php | 2 +- tests/Switzerland/Lucerne/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Lucerne/LucerneBaseTestCase.php | 2 +- tests/Switzerland/Lucerne/LucerneTest.php | 2 +- tests/Switzerland/Lucerne/NewYearsDayTest.php | 2 +- tests/Switzerland/Lucerne/PentecostMondayTest.php | 2 +- tests/Switzerland/Lucerne/StStephensDayTest.php | 2 +- tests/Switzerland/Neuchatel/AscensionDayTest.php | 2 +- tests/Switzerland/Neuchatel/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Neuchatel/BettagsMontagTest.php | 2 +- tests/Switzerland/Neuchatel/ChristmasDayTest.php | 2 +- tests/Switzerland/Neuchatel/EasterMondayTest.php | 2 +- tests/Switzerland/Neuchatel/GoodFridayTest.php | 2 +- .../Switzerland/Neuchatel/InstaurationRepubliqueTest.php | 2 +- tests/Switzerland/Neuchatel/NeuchatelBaseTestCase.php | 2 +- tests/Switzerland/Neuchatel/NeuchatelTest.php | 2 +- tests/Switzerland/Neuchatel/NewYearsDayTest.php | 2 +- tests/Switzerland/Neuchatel/PentecostMondayTest.php | 2 +- tests/Switzerland/Neuchatel/WorkersDayTest.php | 2 +- tests/Switzerland/Nidwalden/AllSaintsDayTest.php | 2 +- tests/Switzerland/Nidwalden/AscensionDayTest.php | 2 +- tests/Switzerland/Nidwalden/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Nidwalden/ChristmasDayTest.php | 2 +- tests/Switzerland/Nidwalden/CorpusChristiTest.php | 2 +- tests/Switzerland/Nidwalden/EasterMondayTest.php | 2 +- tests/Switzerland/Nidwalden/GoodFridayTest.php | 2 +- tests/Switzerland/Nidwalden/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Nidwalden/NewYearsDayTest.php | 2 +- tests/Switzerland/Nidwalden/NidwaldenBaseTestCase.php | 2 +- tests/Switzerland/Nidwalden/NidwaldenTest.php | 2 +- tests/Switzerland/Nidwalden/PentecostMondayTest.php | 2 +- tests/Switzerland/Nidwalden/StJosephDayTest.php | 2 +- tests/Switzerland/Nidwalden/StStephensDayTest.php | 2 +- tests/Switzerland/Obwalden/AllSaintsDayTest.php | 2 +- tests/Switzerland/Obwalden/AscensionDayTest.php | 2 +- tests/Switzerland/Obwalden/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Obwalden/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Obwalden/BruderKlausenFestTest.php | 2 +- tests/Switzerland/Obwalden/ChristmasDayTest.php | 2 +- tests/Switzerland/Obwalden/CorpusChristiTest.php | 2 +- tests/Switzerland/Obwalden/EasterMondayTest.php | 2 +- tests/Switzerland/Obwalden/GoodFridayTest.php | 2 +- tests/Switzerland/Obwalden/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Obwalden/NewYearsDayTest.php | 2 +- tests/Switzerland/Obwalden/ObwaldenBaseTestCase.php | 2 +- tests/Switzerland/Obwalden/ObwaldenTest.php | 2 +- tests/Switzerland/Obwalden/PentecostMondayTest.php | 2 +- tests/Switzerland/Obwalden/StStephensDayTest.php | 2 +- tests/Switzerland/Schaffhausen/AscensionDayTest.php | 2 +- tests/Switzerland/Schaffhausen/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Schaffhausen/ChristmasDayTest.php | 2 +- tests/Switzerland/Schaffhausen/EasterMondayTest.php | 2 +- tests/Switzerland/Schaffhausen/GoodFridayTest.php | 2 +- tests/Switzerland/Schaffhausen/NewYearsDayTest.php | 2 +- tests/Switzerland/Schaffhausen/PentecostMondayTest.php | 2 +- .../Schaffhausen/SchaffhausenBaseTestCase.php | 2 +- tests/Switzerland/Schaffhausen/SchaffhausenTest.php | 2 +- tests/Switzerland/Schaffhausen/StStephensDayTest.php | 2 +- tests/Switzerland/Schaffhausen/WorkersDayTest.php | 2 +- tests/Switzerland/Schwyz/AllSaintsDayTest.php | 2 +- tests/Switzerland/Schwyz/AscensionDayTest.php | 2 +- tests/Switzerland/Schwyz/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Schwyz/ChristmasDayTest.php | 2 +- tests/Switzerland/Schwyz/CorpusChristiTest.php | 2 +- tests/Switzerland/Schwyz/EasterMondayTest.php | 2 +- tests/Switzerland/Schwyz/EpiphanyTest.php | 2 +- tests/Switzerland/Schwyz/GoodFridayTest.php | 2 +- tests/Switzerland/Schwyz/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Schwyz/NewYearsDayTest.php | 2 +- tests/Switzerland/Schwyz/PentecostMondayTest.php | 2 +- tests/Switzerland/Schwyz/SchwyzBaseTestCase.php | 2 +- tests/Switzerland/Schwyz/SchwyzTest.php | 2 +- tests/Switzerland/Schwyz/StJosephDayTest.php | 2 +- tests/Switzerland/Schwyz/StStephensDayTest.php | 2 +- tests/Switzerland/Solothurn/AscensionDayTest.php | 2 +- tests/Switzerland/Solothurn/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Solothurn/ChristmasDayTest.php | 2 +- tests/Switzerland/Solothurn/GoodFridayTest.php | 2 +- tests/Switzerland/Solothurn/NewYearsDayTest.php | 2 +- tests/Switzerland/Solothurn/SolothurnBaseTestCase.php | 2 +- tests/Switzerland/Solothurn/SolothurnTest.php | 2 +- tests/Switzerland/StGallen/AllSaintsDayTest.php | 2 +- tests/Switzerland/StGallen/AscensionDayTest.php | 2 +- tests/Switzerland/StGallen/ChristmasDayTest.php | 2 +- tests/Switzerland/StGallen/EasterMondayTest.php | 2 +- tests/Switzerland/StGallen/GoodFridayTest.php | 2 +- tests/Switzerland/StGallen/NewYearsDayTest.php | 2 +- tests/Switzerland/StGallen/PentecostMondayTest.php | 2 +- tests/Switzerland/StGallen/StGallenBaseTestCase.php | 2 +- tests/Switzerland/StGallen/StGallenTest.php | 2 +- tests/Switzerland/StGallen/StStephensDayTest.php | 2 +- tests/Switzerland/SwissNationalDayTest.php | 2 +- tests/Switzerland/SwitzerlandBaseTestCase.php | 2 +- tests/Switzerland/SwitzerlandTest.php | 2 +- tests/Switzerland/Thurgau/AscensionDayTest.php | 2 +- tests/Switzerland/Thurgau/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Thurgau/ChristmasDayTest.php | 2 +- tests/Switzerland/Thurgau/EasterMondayTest.php | 2 +- tests/Switzerland/Thurgau/GoodFridayTest.php | 2 +- tests/Switzerland/Thurgau/NewYearsDayTest.php | 2 +- tests/Switzerland/Thurgau/PentecostMondayTest.php | 2 +- tests/Switzerland/Thurgau/StStephensDayTest.php | 2 +- tests/Switzerland/Thurgau/ThurgauBaseTestCase.php | 2 +- tests/Switzerland/Thurgau/ThurgauTest.php | 2 +- tests/Switzerland/Thurgau/WorkersDayTest.php | 2 +- tests/Switzerland/Ticino/AllSaintsDayTest.php | 2 +- tests/Switzerland/Ticino/AscensionDayTest.php | 2 +- tests/Switzerland/Ticino/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Ticino/ChristmasDayTest.php | 2 +- tests/Switzerland/Ticino/CorpusChristiTest.php | 2 +- tests/Switzerland/Ticino/EasterMondayTest.php | 2 +- tests/Switzerland/Ticino/EpiphanyTest.php | 2 +- tests/Switzerland/Ticino/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Ticino/NewYearsDayTest.php | 2 +- tests/Switzerland/Ticino/PentecostMondayTest.php | 2 +- tests/Switzerland/Ticino/StJosephDayTest.php | 2 +- tests/Switzerland/Ticino/StPeterPaulTest.php | 2 +- tests/Switzerland/Ticino/StStephensDayTest.php | 2 +- tests/Switzerland/Ticino/TicinoBaseTestCase.php | 2 +- tests/Switzerland/Ticino/TicinoTest.php | 2 +- tests/Switzerland/Ticino/WorkersDayTest.php | 2 +- tests/Switzerland/Uri/AllSaintsDayTest.php | 2 +- tests/Switzerland/Uri/AscensionDayTest.php | 2 +- tests/Switzerland/Uri/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Uri/ChristmasDayTest.php | 2 +- tests/Switzerland/Uri/CorpusChristiTest.php | 2 +- tests/Switzerland/Uri/EasterMondayTest.php | 2 +- tests/Switzerland/Uri/EpiphanyTest.php | 2 +- tests/Switzerland/Uri/GoodFridayTest.php | 2 +- tests/Switzerland/Uri/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Uri/NewYearsDayTest.php | 2 +- tests/Switzerland/Uri/PentecostMondayTest.php | 2 +- tests/Switzerland/Uri/StJosephDayTest.php | 2 +- tests/Switzerland/Uri/StStephensDayTest.php | 2 +- tests/Switzerland/Uri/UriBaseTestCase.php | 2 +- tests/Switzerland/Uri/UriTest.php | 2 +- tests/Switzerland/Valais/AllSaintsDayTest.php | 2 +- tests/Switzerland/Valais/AscensionDayTest.php | 2 +- tests/Switzerland/Valais/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Valais/ChristmasDayTest.php | 2 +- tests/Switzerland/Valais/CorpusChristiTest.php | 2 +- tests/Switzerland/Valais/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Valais/NewYearsDayTest.php | 2 +- tests/Switzerland/Valais/StJosephDayTest.php | 2 +- tests/Switzerland/Valais/ValaisBaseTestCase.php | 2 +- tests/Switzerland/Valais/ValaisTest.php | 2 +- tests/Switzerland/Vaud/AscensionDayTest.php | 2 +- tests/Switzerland/Vaud/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Vaud/BettagsMontagTest.php | 2 +- tests/Switzerland/Vaud/ChristmasDayTest.php | 2 +- tests/Switzerland/Vaud/EasterMondayTest.php | 2 +- tests/Switzerland/Vaud/GoodFridayTest.php | 2 +- tests/Switzerland/Vaud/NewYearsDayTest.php | 2 +- tests/Switzerland/Vaud/PentecostMondayTest.php | 2 +- tests/Switzerland/Vaud/VaudBaseTestCase.php | 2 +- tests/Switzerland/Vaud/VaudTest.php | 2 +- tests/Switzerland/Zug/AllSaintsDayTest.php | 2 +- tests/Switzerland/Zug/AscensionDayTest.php | 2 +- tests/Switzerland/Zug/AssumptionOfMaryTest.php | 2 +- tests/Switzerland/Zug/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Zug/ChristmasDayTest.php | 2 +- tests/Switzerland/Zug/CorpusChristiTest.php | 2 +- tests/Switzerland/Zug/EasterMondayTest.php | 2 +- tests/Switzerland/Zug/GoodFridayTest.php | 2 +- tests/Switzerland/Zug/ImmaculateConceptionTest.php | 2 +- tests/Switzerland/Zug/NewYearsDayTest.php | 2 +- tests/Switzerland/Zug/PentecostMondayTest.php | 2 +- tests/Switzerland/Zug/StStephensDayTest.php | 2 +- tests/Switzerland/Zug/ZugBaseTestCase.php | 2 +- tests/Switzerland/Zug/ZugTest.php | 2 +- tests/Switzerland/Zurich/AscensionDayTest.php | 2 +- tests/Switzerland/Zurich/BerchtoldsTagTest.php | 2 +- tests/Switzerland/Zurich/ChristmasDayTest.php | 2 +- tests/Switzerland/Zurich/EasterMondayTest.php | 2 +- tests/Switzerland/Zurich/GoodFridayTest.php | 2 +- tests/Switzerland/Zurich/NewYearsDayTest.php | 2 +- tests/Switzerland/Zurich/PentecostMondayTest.php | 2 +- tests/Switzerland/Zurich/StStephensDayTest.php | 2 +- tests/Switzerland/Zurich/WorkersDayTest.php | 2 +- tests/Switzerland/Zurich/ZurichBaseTestCase.php | 2 +- tests/Switzerland/Zurich/ZurichTest.php | 2 +- tests/USA/ChristmasDayTest.php | 2 +- tests/USA/ColumbusDayTest.php | 2 +- tests/USA/IndependenceDayTest.php | 2 +- tests/USA/LabourDayTest.php | 2 +- tests/USA/MartinLutherKingDayTest.php | 2 +- tests/USA/MemorialDayTest.php | 2 +- tests/USA/NewYearsDayTest.php | 2 +- tests/USA/ThanksgivingDayTest.php | 2 +- tests/USA/USABaseTestCase.php | 2 +- tests/USA/USATest.php | 2 +- tests/USA/VeteransDayTest.php | 2 +- tests/USA/WashingtonsBirthdayTest.php | 2 +- tests/Ukraine/ChristmasDayTest.php | 2 +- tests/Ukraine/ConstitutionDayTest.php | 2 +- tests/Ukraine/DefenderOfUkraineDayTest.php | 2 +- tests/Ukraine/EasterTest.php | 2 +- tests/Ukraine/IndependenceDayTest.php | 2 +- tests/Ukraine/InternationalWomensDayTest.php | 2 +- tests/Ukraine/InternationalWorkersDayTest.php | 2 +- tests/Ukraine/NewYearsDayTest.php | 2 +- tests/Ukraine/PentecostTest.php | 2 +- tests/Ukraine/SecondInternationalWorkersDayTest.php | 2 +- tests/Ukraine/UkraineBaseTestCase.php | 2 +- tests/Ukraine/UkraineTest.php | 2 +- tests/Ukraine/VictoryDayTest.php | 2 +- tests/UnitedKingdom/BoxingDayTest.php | 2 +- tests/UnitedKingdom/ChristmasDayTest.php | 2 +- tests/UnitedKingdom/EasterMondayTest.php | 2 +- tests/UnitedKingdom/GoodFridayTest.php | 2 +- tests/UnitedKingdom/MayDayBankHolidayTest.php | 4 +++- tests/UnitedKingdom/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/SpringBankHolidayTest.php | 4 +++- tests/UnitedKingdom/SummerBankHolidayTest.php | 9 ++++++++- tests/UnitedKingdom/UnitedKingdomBaseTestCase.php | 2 +- tests/UnitedKingdom/UnitedKingdomTest.php | 2 +- tests/YasumiBase.php | 8 ++++---- tests/YasumiTestCaseInterface.php | 2 +- 1210 files changed, 1224 insertions(+), 1213 deletions(-) diff --git a/tests/Australia/ACT/ACTBaseTestCase.php b/tests/Australia/ACT/ACTBaseTestCase.php index b11f23907..b09b2a4d9 100644 --- a/tests/Australia/ACT/ACTBaseTestCase.php +++ b/tests/Australia/ACT/ACTBaseTestCase.php @@ -1,4 +1,4 @@ -dateTimeBetween("-$range years", "+$range years")->format('Y'); + $year = (int) Faker::create()->dateTimeBetween("-$range years", "+$range years")->format('Y'); $data[] = [$year, new DateTime("$year-$month-$day", new DateTimeZone($timezone))]; } @@ -269,7 +269,7 @@ public function generateRandomEasterDates($timezone = 'UTC', $iterations = 10, $ $data = []; for ($i = 1; $i <= $iterations; ++$i) { - $year = Faker::create()->dateTimeBetween("-$range years", "+$range years")->format('Y'); + $year = (int) Faker::create()->dateTimeBetween("-$range years", "+$range years")->format('Y'); $date = $this->calculateEaster($year, $timezone); $data[] = [$year, $date->format('Y-m-d')]; @@ -395,7 +395,7 @@ public function generateRandomModifiedEasterDates( $data = []; for ($i = 1; $i <= $iterations; ++$i) { - $year = Faker::create()->dateTimeBetween("-$range years", "+$range years")->format('Y'); + $year = (int) Faker::create()->dateTimeBetween("-$range years", "+$range years")->format('Y'); $date = $this->calculateEaster($year, $timezone); $cb($date); diff --git a/tests/YasumiTestCaseInterface.php b/tests/YasumiTestCaseInterface.php index e98bb8835..0c5203db8 100644 --- a/tests/YasumiTestCaseInterface.php +++ b/tests/YasumiTestCaseInterface.php @@ -1,4 +1,4 @@ - Date: Sat, 7 Sep 2019 13:47:15 +0900 Subject: [PATCH 076/133] CS Fixes. Signed-off-by: Sacha Telgenhof --- tests/Spain/Navarre/NavarreBaseTestCase.php | 1 - tests/YasumiBase.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/Spain/Navarre/NavarreBaseTestCase.php b/tests/Spain/Navarre/NavarreBaseTestCase.php index fbbd279fc..0140ccf67 100644 --- a/tests/Spain/Navarre/NavarreBaseTestCase.php +++ b/tests/Spain/Navarre/NavarreBaseTestCase.php @@ -26,5 +26,4 @@ abstract class NavarreBaseTestCase extends SpainBaseTestCase * Name of the region (e.g. country / state) to be tested */ public const REGION = 'Spain/Navarre'; - } diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index b452d4f97..49c63eb8d 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -305,7 +305,7 @@ public function generateRandomEasterDates($timezone = 'UTC', $iterations = 10, $ protected function calculateEaster(int $year, string $timezone): DateTime { if (\extension_loaded('calendar')) { - $easter_days = easter_days($year); + $easter_days = \easter_days($year); } else { $golden = (($year % 19) + 1); // The Golden Number From ac8f7184ddc1f38954e395b3127c493e37b4225a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 14:23:46 +0900 Subject: [PATCH 077/133] Moved default values to method body as parameters should be nullable. Signed-off-by: Sacha Telgenhof --- tests/YasumiBase.php | 68 ++++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 49c63eb8d..4c4f6f18c 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -16,7 +16,6 @@ use DateTime; use DateTimeInterface; use DateTimeZone; -use function easter_days; use Exception; use Faker\Factory as Faker; use InvalidArgumentException; @@ -243,12 +242,13 @@ public function assertDayOfWeek($provider, $shortName, $year, $expectedDayOfWeek * @return array list of random test dates used for assertion of holidays. * @throws Exception */ - public function generateRandomDates($month, $day, $timezone = 'UTC', $iterations = 10, $range = 1000): array + public function generateRandomDates($month, $day, $timezone = null, $iterations = null, $range = null): array { $data = []; - for ($y = 1; $y <= $iterations; $y++) { - $year = (int) Faker::create()->dateTimeBetween("-$range years", "+$range years")->format('Y'); - $data[] = [$year, new DateTime("$year-$month-$day", new DateTimeZone($timezone))]; + $range = $range ?? 1000; + for ($y = 1; $y <= ($iterations ?? 10); $y++) { + $year = (int)Faker::create()->dateTimeBetween("-$range years", "+$range years")->format('Y'); + $data[] = [$year, new DateTime("$year-$month-$day", new DateTimeZone($timezone ?? 'UTC'))]; } return $data; @@ -264,13 +264,14 @@ public function generateRandomDates($month, $day, $timezone = 'UTC', $iterations * @return array list of random easter test dates used for assertion of holidays. * @throws Exception */ - public function generateRandomEasterDates($timezone = 'UTC', $iterations = 10, $range = 1000): array + public function generateRandomEasterDates($timezone = null, $iterations = null, $range = null): array { $data = []; + $range = $range ?? 1000; - for ($i = 1; $i <= $iterations; ++$i) { - $year = (int) Faker::create()->dateTimeBetween("-$range years", "+$range years")->format('Y'); - $date = $this->calculateEaster($year, $timezone); + for ($i = 1; $i <= ($iterations ?? 10); ++$i) { + $year = (int)Faker::create()->dateTimeBetween("-$range years", "+$range years")->format('Y'); + $date = $this->calculateEaster($year, $timezone ?? 'UTC'); $data[] = [$year, $date->format('Y-m-d')]; } @@ -368,11 +369,12 @@ protected function calculateEaster(int $year, string $timezone): DateTime * * @throws Exception */ - public function generateRandomEasterMondayDates($timezone = 'UTC', $iterations = 10, $range = 1000): array + public function generateRandomEasterMondayDates($timezone = null, $iterations = null, $range = null): array { + $range = $range ?? 1000; return $this->generateRandomModifiedEasterDates(static function (DateTime $date) { $date->add(new DateInterval('P1D')); - }, $timezone, $iterations, $range); + }, $timezone ?? 'UTC', $iterations ?? 10, $range); } /** @@ -388,15 +390,15 @@ public function generateRandomEasterMondayDates($timezone = 'UTC', $iterations = */ public function generateRandomModifiedEasterDates( callable $cb, - $timezone = 'UTC', - $iterations = 10, - $range = 1000 + $timezone = null, + $iterations = null, + $range = null ): array { $data = []; - - for ($i = 1; $i <= $iterations; ++$i) { - $year = (int) Faker::create()->dateTimeBetween("-$range years", "+$range years")->format('Y'); - $date = $this->calculateEaster($year, $timezone); + $range = $range ?? 1000; + for ($i = 1; $i <= ($iterations ?? 10); ++$i) { + $year = (int)Faker::create()->dateTimeBetween("-$range years", "+$range years")->format('Y'); + $date = $this->calculateEaster($year, $timezone ?? 'UTC'); $cb($date); @@ -417,11 +419,13 @@ public function generateRandomModifiedEasterDates( * * @throws Exception */ - public function generateRandomGoodFridayDates($timezone = 'UTC', $iterations = 10, $range = 1000): array + public function generateRandomGoodFridayDates($timezone = null, $iterations = null, $range = null): array { + $range = $range ?? 1000; + return $this->generateRandomModifiedEasterDates(static function (DateTime $date) { $date->sub(new DateInterval('P2D')); - }, $timezone, $iterations, $range); + }, $timezone ?? 'UTC', $iterations ?? 10, $range); } /** @@ -435,11 +439,13 @@ public function generateRandomGoodFridayDates($timezone = 'UTC', $iterations = 1 * * @throws Exception */ - public function generateRandomPentecostDates($timezone = 'UTC', $iterations = 10, $range = 1000): array + public function generateRandomPentecostDates($timezone = null, $iterations = null, $range = null): array { + $range = $range ?? 1000; + return $this->generateRandomModifiedEasterDates(static function (DateTime $date) { $date->add(new DateInterval('P49D')); - }, $timezone, $iterations, $range); + }, $timezone ?? 'UTC', $iterations ?? 10, $range); } /** @@ -458,15 +464,15 @@ public function generateRandomPentecostDates($timezone = 'UTC', $iterations = 10 public function generateRandomDatesWithHolidayMovedToMonday( $month, $day, - $timezone = 'UTC', - $iterations = 10, - $range = 1000 + $timezone = null, + $iterations = null, + $range = null ): array { - return $this->generateRandomDatesWithModifier($month, $day, function ($year, DateTime $date) { + return $this->generateRandomDatesWithModifier($month, $day, function ($range, DateTime $date) { if ($this->isWeekend($date)) { $date->modify('next monday'); } - }, $timezone, $iterations, $range); + }, $timezone ?? 'UTC', $iterations ?? 10, $range); } /** @@ -486,7 +492,7 @@ public function generateRandomDatesWithModifier( $month, $day, callable $callback, - $timezone = 'UTC', + $timezone = null, $iterations, $range ): array { @@ -494,7 +500,7 @@ public function generateRandomDatesWithModifier( for ($i = 1; $i <= $iterations; ++$i) { $year = $this->generateRandomYear($range); - $date = new DateTime("{$year}-{$month}-{$day}", new DateTimeZone($timezone)); + $date = new DateTime("{$year}-{$month}-{$day}", new DateTimeZone($timezone ?? 'UTC')); $callback($year, $date); @@ -512,9 +518,9 @@ public function generateRandomDatesWithModifier( * * @return int a year number */ - public function generateRandomYear($lowerLimit = 1000, $upperLimit = 9999): int + public function generateRandomYear($lowerLimit = null, $upperLimit = null): int { - return (int)Faker::create()->numberBetween($lowerLimit, $upperLimit); + return (int)Faker::create()->numberBetween($lowerLimit ?? 1000, $upperLimit ?? 9999); } /** From 49c6e85b4216e8fd9033aa8bf6e56e46850a6587 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 14:33:28 +0900 Subject: [PATCH 078/133] Removed unnecessary last comma. Signed-off-by: Sacha Telgenhof --- tests/Australia/ACT/CanberraDayTest.php | 2 +- tests/Australia/ACT/LabourDayTest.php | 2 +- tests/Australia/ACT/QueensBirthdayTest.php | 2 +- tests/Australia/ACT/ReconciliationDayTest.php | 2 +- tests/Australia/AnzacDayTest.php | 2 +- tests/Australia/AustraliaDayTest.php | 2 +- tests/Australia/AustraliaTest.php | 2 +- tests/Australia/BoxingDayTest.php | 2 +- tests/Australia/ChristmasDayTest.php | 2 +- tests/Australia/EasterMondayTest.php | 2 +- tests/Australia/NSW/BankHolidayTest.php | 2 +- tests/Australia/NSW/LabourDayTest.php | 2 +- tests/Australia/NSW/NSWTest.php | 4 ++-- tests/Australia/NSW/QueensBirthdayTest.php | 2 +- tests/Australia/NT/MayDayTest.php | 2 +- tests/Australia/NT/NTTest.php | 2 +- tests/Australia/NT/PicnicDayTest.php | 2 +- tests/Australia/NT/QueensBirthdayTest.php | 2 +- tests/Australia/NewYearsDayTest.php | 2 +- tests/Australia/Queensland/Brisbane/BrisbaneTest.php | 2 +- tests/Australia/Queensland/Brisbane/PeoplesDayTest.php | 2 +- tests/Australia/Queensland/LabourDayTest.php | 2 +- tests/Australia/Queensland/QueensBirthdayTest.php | 2 +- tests/Australia/Queensland/QueenslandTest.php | 2 +- tests/Australia/SA/AdelaideCupDayTest.php | 2 +- tests/Australia/SA/ChristmasDayTest.php | 2 +- tests/Australia/SA/LabourDayTest.php | 2 +- tests/Australia/SA/ProclamationDayTest.php | 2 +- tests/Australia/SA/QueensBirthdayTest.php | 2 +- tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php | 2 +- tests/Australia/Tasmania/EightHourDayTest.php | 2 +- .../Tasmania/FlindersIsland/FlindersIslandShowTest.php | 2 +- tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php | 2 +- tests/Australia/Tasmania/Northeast/LauncestonShowTest.php | 2 +- tests/Australia/Tasmania/Northwest/BurnieShowTest.php | 2 +- .../Tasmania/Northwest/CircularHead/AGFESTTest.php | 2 +- .../Tasmania/Northwest/CircularHead/CircularHeadTest.php | 2 +- tests/Australia/Tasmania/QueensBirthdayTest.php | 2 +- tests/Australia/Tasmania/RecreationDayTest.php | 2 +- tests/Australia/Tasmania/South/HobartShowTest.php | 2 +- .../Tasmania/South/Southeast/HobartRegattaTest.php | 2 +- tests/Australia/Tasmania/South/Southeast/SoutheastTest.php | 2 +- tests/Australia/Tasmania/TasmaniaTest.php | 2 +- tests/Australia/Victoria/AFLGrandFinalFridayTest.php | 2 +- tests/Australia/Victoria/LabourDayTest.php | 2 +- tests/Australia/Victoria/MelbourneCupDayTest.php | 2 +- tests/Australia/Victoria/QueensBirthdayTest.php | 2 +- tests/Australia/WA/LabourDayTest.php | 2 +- tests/Australia/WA/QueensBirthdayTest.php | 2 +- tests/Australia/WA/WATest.php | 2 +- tests/Australia/WA/WesternAustraliaDayTest.php | 2 +- tests/Base/HolidayTest.php | 6 +++--- tests/Base/TranslationsTest.php | 2 +- tests/Brazil/BrazilTest.php | 2 +- tests/CzechRepublic/CzechRepublicTest.php | 4 ++-- tests/Denmark/DenmarkTest.php | 2 +- tests/Estonia/EstoniaTest.php | 2 +- tests/Greece/GreeceTest.php | 2 +- tests/Hungary/HungaryTest.php | 2 +- tests/Japan/AutumnalEquinoxDayTest.php | 2 +- tests/Japan/JapanTest.php | 4 ++-- tests/Japan/VernalEquinoxDayTest.php | 2 +- tests/Lithuania/LithuaniaTest.php | 2 +- tests/NewZealand/NewZealandTest.php | 2 +- tests/Poland/PolandTest.php | 2 +- tests/Russia/RussiaTest.php | 2 +- tests/Slovakia/EasterMondayTest.php | 2 +- tests/Slovakia/GoodFridayTest.php | 2 +- tests/Slovakia/SlovakiaTest.php | 4 ++-- tests/Spain/Andalusia/AndalusiaTest.php | 4 ++-- tests/Spain/Aragon/AragonTest.php | 4 ++-- tests/Spain/Asturias/AsturiasTest.php | 4 ++-- tests/Spain/BalearicIslands/BalearicIslandsTest.php | 4 ++-- tests/Spain/BasqueCountry/BasqueCountryTest.php | 4 ++-- tests/Spain/CanaryIslands/CanaryIslandsTest.php | 4 ++-- tests/Spain/Cantabria/CantabriaTest.php | 4 ++-- tests/Spain/CastileAndLeon/CastileAndLeonTest.php | 4 ++-- tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php | 4 ++-- tests/Spain/Catalonia/CataloniaTest.php | 4 ++-- tests/Spain/Ceuta/CeutaTest.php | 4 ++-- tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php | 4 ++-- tests/Spain/Extremadura/ExtremaduraTest.php | 4 ++-- tests/Spain/Galicia/GaliciaTest.php | 4 ++-- tests/Spain/LaRioja/LaRiojaTest.php | 4 ++-- tests/Spain/Melilla/MelillaTest.php | 4 ++-- tests/Spain/Navarre/NavarreTest.php | 4 ++-- tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php | 4 ++-- tests/Spain/ValencianCommunity/ValencianCommunityTest.php | 4 ++-- tests/Sweden/SwedenTest.php | 2 +- tests/Switzerland/Geneva/GenevaTest.php | 2 +- tests/Ukraine/UkraineTest.php | 2 +- tests/UnitedKingdom/UnitedKingdomTest.php | 2 +- 92 files changed, 117 insertions(+), 117 deletions(-) diff --git a/tests/Australia/ACT/CanberraDayTest.php b/tests/Australia/ACT/CanberraDayTest.php index a03efe9cc..1fff046e7 100644 --- a/tests/Australia/ACT/CanberraDayTest.php +++ b/tests/Australia/ACT/CanberraDayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-03-13'], [2018, '2018-03-12'], [2019, '2019-03-11'], - [2020, '2020-03-09'], + [2020, '2020-03-09'] ]; return $data; diff --git a/tests/Australia/ACT/LabourDayTest.php b/tests/Australia/ACT/LabourDayTest.php index 859bae64d..44dfa2b89 100644 --- a/tests/Australia/ACT/LabourDayTest.php +++ b/tests/Australia/ACT/LabourDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-10-02'], [2018, '2018-10-01'], [2019, '2019-10-07'], - [2020, '2020-10-05'], + [2020, '2020-10-05'] ]; return $data; diff --git a/tests/Australia/ACT/QueensBirthdayTest.php b/tests/Australia/ACT/QueensBirthdayTest.php index 1fef2369c..8eaad0599 100644 --- a/tests/Australia/ACT/QueensBirthdayTest.php +++ b/tests/Australia/ACT/QueensBirthdayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-06-12'], [2018, '2018-06-11'], [2019, '2019-06-10'], - [2020, '2020-06-08'], + [2020, '2020-06-08'] ]; return $data; diff --git a/tests/Australia/ACT/ReconciliationDayTest.php b/tests/Australia/ACT/ReconciliationDayTest.php index aaba8f4f9..90acae466 100644 --- a/tests/Australia/ACT/ReconciliationDayTest.php +++ b/tests/Australia/ACT/ReconciliationDayTest.php @@ -75,7 +75,7 @@ public function HolidayDataProvider(): array [2027, '2027-05-31'], [2028, '2028-05-29'], [2029, '2029-05-28'], - [2030, '2030-05-27'], + [2030, '2030-05-27'] ]; return $data; diff --git a/tests/Australia/AnzacDayTest.php b/tests/Australia/AnzacDayTest.php index 89eedd963..487dfafa4 100644 --- a/tests/Australia/AnzacDayTest.php +++ b/tests/Australia/AnzacDayTest.php @@ -83,7 +83,7 @@ public function HolidayDataProvider(): array [2018, '2018-04-25'], [2019, '2019-04-25'], [2019, '2019-04-25'], - [2020, '2020-04-25'], + [2020, '2020-04-25'] ]; return $data; diff --git a/tests/Australia/AustraliaDayTest.php b/tests/Australia/AustraliaDayTest.php index 4d1f0f05d..1f4cc352e 100644 --- a/tests/Australia/AustraliaDayTest.php +++ b/tests/Australia/AustraliaDayTest.php @@ -92,7 +92,7 @@ public function HolidayDataProvider(): array [2017, '2017-01-26'], [2018, '2018-01-26'], [2019, '2019-01-28'], - [2020, '2020-01-27'], + [2020, '2020-01-27'] ]; return $data; diff --git a/tests/Australia/AustraliaTest.php b/tests/Australia/AustraliaTest.php index 3dbdc168c..acfa36222 100644 --- a/tests/Australia/AustraliaTest.php +++ b/tests/Australia/AustraliaTest.php @@ -38,7 +38,7 @@ public function testOfficialHolidays(): void 'christmasDay', 'secondChristmasDay', 'australiaDay', - 'anzacDay', + 'anzacDay' ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/BoxingDayTest.php b/tests/Australia/BoxingDayTest.php index b78c29667..0d40d7345 100644 --- a/tests/Australia/BoxingDayTest.php +++ b/tests/Australia/BoxingDayTest.php @@ -84,7 +84,7 @@ public function HolidayDataProvider(): array [2017, '2017-12-26', null], [2018, '2018-12-26', null], [2019, '2019-12-26', null], - [2020, '2020-12-26', '2020-12-28'], + [2020, '2020-12-26', '2020-12-28'] ]; return $data; diff --git a/tests/Australia/ChristmasDayTest.php b/tests/Australia/ChristmasDayTest.php index 0f405add6..1b756eb6f 100644 --- a/tests/Australia/ChristmasDayTest.php +++ b/tests/Australia/ChristmasDayTest.php @@ -84,7 +84,7 @@ public function HolidayDataProvider(): array [2017, '2017-12-25', null], [2018, '2018-12-25', null], [2019, '2019-12-25', null], - [2020, '2020-12-25', null], + [2020, '2020-12-25', null] ]; return $data; diff --git a/tests/Australia/EasterMondayTest.php b/tests/Australia/EasterMondayTest.php index a1f4e9a13..851d34d2b 100644 --- a/tests/Australia/EasterMondayTest.php +++ b/tests/Australia/EasterMondayTest.php @@ -105,7 +105,7 @@ public function HolidayDataProvider2(): array [2011, '2011-04-26'], [2038, '2038-04-27'], [2095, '2095-04-26'], - [2163, '2163-04-26'], + [2163, '2163-04-26'] ]; return $data; diff --git a/tests/Australia/NSW/BankHolidayTest.php b/tests/Australia/NSW/BankHolidayTest.php index 0325527c7..591e305de 100644 --- a/tests/Australia/NSW/BankHolidayTest.php +++ b/tests/Australia/NSW/BankHolidayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-08-07'], [2018, '2018-08-06'], [2019, '2019-08-05'], - [2020, '2020-08-03'], + [2020, '2020-08-03'] ]; return $data; diff --git a/tests/Australia/NSW/LabourDayTest.php b/tests/Australia/NSW/LabourDayTest.php index f0ed1e675..19c1bb483 100644 --- a/tests/Australia/NSW/LabourDayTest.php +++ b/tests/Australia/NSW/LabourDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-10-02'], [2018, '2018-10-01'], [2019, '2019-10-07'], - [2020, '2020-10-05'], + [2020, '2020-10-05'] ]; return $data; diff --git a/tests/Australia/NSW/NSWTest.php b/tests/Australia/NSW/NSWTest.php index d773a970f..b5458f102 100644 --- a/tests/Australia/NSW/NSWTest.php +++ b/tests/Australia/NSW/NSWTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'easter', 'easterSaturday', 'queensBirthday', - 'labourDay', + 'labourDay' ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } @@ -53,7 +53,7 @@ public function testOfficialHolidays(): void public function testBankHolidays(): void { $this->assertDefinedHolidays([ - 'bankHoliday', + 'bankHoliday' ], $this->region, $this->year, Holiday::TYPE_BANK); } diff --git a/tests/Australia/NSW/QueensBirthdayTest.php b/tests/Australia/NSW/QueensBirthdayTest.php index 4d1fd6d4b..3b80349d9 100644 --- a/tests/Australia/NSW/QueensBirthdayTest.php +++ b/tests/Australia/NSW/QueensBirthdayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-06-12'], [2018, '2018-06-11'], [2019, '2019-06-10'], - [2020, '2020-06-08'], + [2020, '2020-06-08'] ]; return $data; diff --git a/tests/Australia/NT/MayDayTest.php b/tests/Australia/NT/MayDayTest.php index ea37aafc7..3c19b9551 100644 --- a/tests/Australia/NT/MayDayTest.php +++ b/tests/Australia/NT/MayDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-05-01'], [2018, '2018-05-07'], [2019, '2019-05-06'], - [2020, '2020-05-04'], + [2020, '2020-05-04'] ]; return $data; diff --git a/tests/Australia/NT/NTTest.php b/tests/Australia/NT/NTTest.php index fda09c5a3..829642517 100644 --- a/tests/Australia/NT/NTTest.php +++ b/tests/Australia/NT/NTTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'easterSaturday', 'queensBirthday', 'mayDay', - 'picnicDay', + 'picnicDay' ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/NT/PicnicDayTest.php b/tests/Australia/NT/PicnicDayTest.php index 490d33c34..bfb88996c 100644 --- a/tests/Australia/NT/PicnicDayTest.php +++ b/tests/Australia/NT/PicnicDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-08-07'], [2018, '2018-08-06'], [2019, '2019-08-05'], - [2020, '2020-08-03'], + [2020, '2020-08-03'] ]; return $data; diff --git a/tests/Australia/NT/QueensBirthdayTest.php b/tests/Australia/NT/QueensBirthdayTest.php index 936823ad4..78de1ebfe 100644 --- a/tests/Australia/NT/QueensBirthdayTest.php +++ b/tests/Australia/NT/QueensBirthdayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-06-12'], [2018, '2018-06-11'], [2019, '2019-06-10'], - [2020, '2020-06-08'], + [2020, '2020-06-08'] ]; return $data; diff --git a/tests/Australia/NewYearsDayTest.php b/tests/Australia/NewYearsDayTest.php index 47c1a8fe0..8436fb3da 100644 --- a/tests/Australia/NewYearsDayTest.php +++ b/tests/Australia/NewYearsDayTest.php @@ -84,7 +84,7 @@ public function HolidayDataProvider(): array [2017, '2017-01-01', '2017-01-02'], [2018, '2018-01-01', null], [2019, '2019-01-01', null], - [2020, '2020-01-01', null], + [2020, '2020-01-01', null] ]; return $data; diff --git a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php index 083ca1b29..fccf140fa 100644 --- a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php +++ b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'anzacDay', 'queensBirthday', 'labourDay', - 'peoplesDay', + 'peoplesDay' ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php index fb93510ad..8918b21a1 100644 --- a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php +++ b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-08-16'], [2018, '2018-08-15'], [2019, '2019-08-14'], - [2020, '2020-08-12'], + [2020, '2020-08-12'] ]; return $data; diff --git a/tests/Australia/Queensland/LabourDayTest.php b/tests/Australia/Queensland/LabourDayTest.php index e938513d7..c433f98e1 100644 --- a/tests/Australia/Queensland/LabourDayTest.php +++ b/tests/Australia/Queensland/LabourDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-05-01'], [2018, '2018-05-07'], [2019, '2019-05-06'], - [2020, '2020-05-04'], + [2020, '2020-05-04'] ]; return $data; diff --git a/tests/Australia/Queensland/QueensBirthdayTest.php b/tests/Australia/Queensland/QueensBirthdayTest.php index bdb214d9e..74484e377 100644 --- a/tests/Australia/Queensland/QueensBirthdayTest.php +++ b/tests/Australia/Queensland/QueensBirthdayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-10-02'], [2018, '2018-10-01'], [2019, '2019-10-07'], - [2020, '2020-10-05'], + [2020, '2020-10-05'] ]; return $data; diff --git a/tests/Australia/Queensland/QueenslandTest.php b/tests/Australia/Queensland/QueenslandTest.php index 4340c3ab0..0b75c6f4c 100644 --- a/tests/Australia/Queensland/QueenslandTest.php +++ b/tests/Australia/Queensland/QueenslandTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'australiaDay', 'anzacDay', 'queensBirthday', - 'labourDay', + 'labourDay' ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/SA/AdelaideCupDayTest.php b/tests/Australia/SA/AdelaideCupDayTest.php index 35c5a1ea7..ebf9ca7a2 100644 --- a/tests/Australia/SA/AdelaideCupDayTest.php +++ b/tests/Australia/SA/AdelaideCupDayTest.php @@ -83,7 +83,7 @@ public function HolidayDataProvider(): array [2017, '2017-03-13'], [2018, '2018-03-12'], [2019, '2019-03-11'], - [2020, '2020-03-09'], + [2020, '2020-03-09'] ]; return $data; diff --git a/tests/Australia/SA/ChristmasDayTest.php b/tests/Australia/SA/ChristmasDayTest.php index c27b564bc..374fc4f64 100644 --- a/tests/Australia/SA/ChristmasDayTest.php +++ b/tests/Australia/SA/ChristmasDayTest.php @@ -84,7 +84,7 @@ public function HolidayDataProvider(): array [2017, '2017-12-25', null], [2018, '2018-12-25', null], [2019, '2019-12-25', null], - [2020, '2020-12-25', null], + [2020, '2020-12-25', null] ]; return $data; diff --git a/tests/Australia/SA/LabourDayTest.php b/tests/Australia/SA/LabourDayTest.php index f045656c0..4d3b921af 100644 --- a/tests/Australia/SA/LabourDayTest.php +++ b/tests/Australia/SA/LabourDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-10-02'], [2018, '2018-10-01'], [2019, '2019-10-07'], - [2020, '2020-10-05'], + [2020, '2020-10-05'] ]; return $data; diff --git a/tests/Australia/SA/ProclamationDayTest.php b/tests/Australia/SA/ProclamationDayTest.php index 90971bfb5..feadcb62e 100644 --- a/tests/Australia/SA/ProclamationDayTest.php +++ b/tests/Australia/SA/ProclamationDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-12-26'], [2018, '2018-12-26'], [2019, '2019-12-26'], - [2020, '2020-12-28'], + [2020, '2020-12-28'] ]; return $data; diff --git a/tests/Australia/SA/QueensBirthdayTest.php b/tests/Australia/SA/QueensBirthdayTest.php index 21df3e7a9..862dd5329 100644 --- a/tests/Australia/SA/QueensBirthdayTest.php +++ b/tests/Australia/SA/QueensBirthdayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-06-12'], [2018, '2018-06-11'], [2019, '2019-06-10'], - [2020, '2020-06-08'], + [2020, '2020-06-08'] ]; return $data; diff --git a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php index ad560b65f..c9522f792 100644 --- a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php +++ b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-12-01'], [2018, '2018-11-30'], [2019, '2019-11-29'], - [2020, '2020-11-27'], + [2020, '2020-11-27'] ]; return $data; diff --git a/tests/Australia/Tasmania/EightHourDayTest.php b/tests/Australia/Tasmania/EightHourDayTest.php index afc49189b..41dd8d7ac 100644 --- a/tests/Australia/Tasmania/EightHourDayTest.php +++ b/tests/Australia/Tasmania/EightHourDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-03-13'], [2018, '2018-03-12'], [2019, '2019-03-11'], - [2020, '2020-03-09'], + [2020, '2020-03-09'] ]; return $data; diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php index b63d43e06..c50006798 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-10-20'], [2018, '2018-10-19'], [2019, '2019-10-18'], - [2020, '2020-10-16'], + [2020, '2020-10-16'] ]; return $data; diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php index 7b9451736..aef199839 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-03-07'], [2018, '2018-03-06'], [2019, '2019-03-05'], - [2020, '2020-03-03'], + [2020, '2020-03-03'] ]; return $data; diff --git a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php index 59514437d..69afb772b 100644 --- a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php +++ b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-10-12'], [2018, '2018-10-11'], [2019, '2019-10-10'], - [2020, '2020-10-08'], + [2020, '2020-10-08'] ]; return $data; diff --git a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php index 2c9d4ac89..38a6a3bbe 100644 --- a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php +++ b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-10-06'], [2018, '2018-10-05'], [2019, '2019-10-04'], - [2020, '2020-10-02'], + [2020, '2020-10-02'] ]; return $data; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php index 4eaa837da..f1f2e7724 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-05-05'], [2018, '2018-05-04'], [2019, '2019-05-03'], - [2020, '2020-05-08'], + [2020, '2020-05-08'] ]; return $data; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php index 3fd9a9507..0d3eb0ebb 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php @@ -44,7 +44,7 @@ public function testOfficialHolidays(): void 'eightHourDay', 'recreationDay', 'burnieShow', - 'agfest', + 'agfest' ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/Tasmania/QueensBirthdayTest.php b/tests/Australia/Tasmania/QueensBirthdayTest.php index 7a8443fbe..9660704bd 100644 --- a/tests/Australia/Tasmania/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/QueensBirthdayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-06-12'], [2018, '2018-06-11'], [2019, '2019-06-10'], - [2020, '2020-06-08'], + [2020, '2020-06-08'] ]; return $data; diff --git a/tests/Australia/Tasmania/RecreationDayTest.php b/tests/Australia/Tasmania/RecreationDayTest.php index 5ef1b6912..e05aa4f1e 100644 --- a/tests/Australia/Tasmania/RecreationDayTest.php +++ b/tests/Australia/Tasmania/RecreationDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-11-06'], [2018, '2018-11-05'], [2019, '2019-11-04'], - [2020, '2020-11-02'], + [2020, '2020-11-02'] ]; return $data; diff --git a/tests/Australia/Tasmania/South/HobartShowTest.php b/tests/Australia/Tasmania/South/HobartShowTest.php index a7b35c5a2..80a0ee992 100644 --- a/tests/Australia/Tasmania/South/HobartShowTest.php +++ b/tests/Australia/Tasmania/South/HobartShowTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-10-26'], [2018, '2018-10-25'], [2019, '2019-10-24'], - [2020, '2020-10-22'], + [2020, '2020-10-22'] ]; return $data; diff --git a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php index 3431403d1..46b688734 100644 --- a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php +++ b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-02-13'], [2018, '2018-02-12'], [2019, '2019-02-11'], - [2020, '2020-02-10'], + [2020, '2020-02-10'] ]; return $data; diff --git a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php index 9ac91057a..0100fa5a7 100644 --- a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php +++ b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'queensBirthday', 'eightHourDay', 'hobartShow', - 'hobartRegatta', + 'hobartRegatta' ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/Tasmania/TasmaniaTest.php b/tests/Australia/Tasmania/TasmaniaTest.php index 38639bc89..5bd9473df 100644 --- a/tests/Australia/Tasmania/TasmaniaTest.php +++ b/tests/Australia/Tasmania/TasmaniaTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'anzacDay', 'queensBirthday', 'eightHourDay', - 'recreationDay', + 'recreationDay' ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php index 303ce70aa..6277b015f 100644 --- a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php +++ b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php @@ -102,7 +102,7 @@ public function HolidayDataProvider(): array [2015, '2015-10-02'], [2016, '2016-09-30'], [2017, '2017-09-29'], - [2018, '2018-09-28'], + [2018, '2018-09-28'] ]; return $data; diff --git a/tests/Australia/Victoria/LabourDayTest.php b/tests/Australia/Victoria/LabourDayTest.php index 0cff91fc7..2b470e98f 100644 --- a/tests/Australia/Victoria/LabourDayTest.php +++ b/tests/Australia/Victoria/LabourDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-03-13'], [2018, '2018-03-12'], [2019, '2019-03-11'], - [2020, '2020-03-09'], + [2020, '2020-03-09'] ]; return $data; diff --git a/tests/Australia/Victoria/MelbourneCupDayTest.php b/tests/Australia/Victoria/MelbourneCupDayTest.php index cfdedd5ee..266fa06aa 100644 --- a/tests/Australia/Victoria/MelbourneCupDayTest.php +++ b/tests/Australia/Victoria/MelbourneCupDayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-11-07'], [2018, '2018-11-06'], [2019, '2019-11-05'], - [2020, '2020-11-03'], + [2020, '2020-11-03'] ]; return $data; diff --git a/tests/Australia/Victoria/QueensBirthdayTest.php b/tests/Australia/Victoria/QueensBirthdayTest.php index edabf8864..d7a21ac38 100644 --- a/tests/Australia/Victoria/QueensBirthdayTest.php +++ b/tests/Australia/Victoria/QueensBirthdayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-06-12'], [2018, '2018-06-11'], [2019, '2019-06-10'], - [2020, '2020-06-08'], + [2020, '2020-06-08'] ]; return $data; diff --git a/tests/Australia/WA/LabourDayTest.php b/tests/Australia/WA/LabourDayTest.php index 6f866e73a..dcbb32736 100644 --- a/tests/Australia/WA/LabourDayTest.php +++ b/tests/Australia/WA/LabourDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-03-06'], [2018, '2018-03-05'], [2019, '2019-03-04'], - [2020, '2020-03-02'], + [2020, '2020-03-02'] ]; return $data; diff --git a/tests/Australia/WA/QueensBirthdayTest.php b/tests/Australia/WA/QueensBirthdayTest.php index 69c4d1c3d..410fd4345 100644 --- a/tests/Australia/WA/QueensBirthdayTest.php +++ b/tests/Australia/WA/QueensBirthdayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-09-25'], [2018, '2018-09-24'], [2019, '2019-09-30'], - [2020, '2020-09-28'], + [2020, '2020-09-28'] ]; return $data; diff --git a/tests/Australia/WA/WATest.php b/tests/Australia/WA/WATest.php index 56b5a941b..285b377e3 100644 --- a/tests/Australia/WA/WATest.php +++ b/tests/Australia/WA/WATest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'anzacDay', 'queensBirthday', 'labourDay', - 'westernAustraliaDay', + 'westernAustraliaDay' ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/WA/WesternAustraliaDayTest.php b/tests/Australia/WA/WesternAustraliaDayTest.php index 406767267..7e71bded5 100644 --- a/tests/Australia/WA/WesternAustraliaDayTest.php +++ b/tests/Australia/WA/WesternAustraliaDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-06-05'], [2018, '2018-06-04'], [2019, '2019-06-03'], - [2020, '2020-06-01'], + [2020, '2020-06-01'] ]; return $data; diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index eae2af50b..b8e30b3de 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -143,7 +143,7 @@ public function testHolidayGetNameWithGlobalTranslations(): void $translations = [ 'en_US' => 'New Year\'s Day', - 'pl_PL' => 'Nowy Rok', + 'pl_PL' => 'Nowy Rok' ]; $translationsStub->expects($this->once())->method('getTranslations')->with($this->equalTo('newYearsDay'))->willReturn($translations); @@ -169,7 +169,7 @@ public function testHolidayGetNameWithGlobalAndCustomTranslations(): void $translations = [ 'en_US' => 'New Year\'s Day', - 'pl_PL' => 'Nowy Rok', + 'pl_PL' => 'Nowy Rok' ]; $translationsStub->expects($this->once())->method('getTranslations')->with($this->equalTo('newYearsDay'))->willReturn($translations); @@ -201,7 +201,7 @@ public function testHolidayGetNameWithOverridenGlobalTranslations(): void $translations = [ 'en_US' => 'New Year\'s Day', - 'pl_PL' => 'Nowy Rok', + 'pl_PL' => 'Nowy Rok' ]; $translationsStub->expects($this->once())->method('getTranslations')->with($this->equalTo('newYearsDay'))->willReturn($translations); diff --git a/tests/Base/TranslationsTest.php b/tests/Base/TranslationsTest.php index cbf002eb2..87aafc935 100644 --- a/tests/Base/TranslationsTest.php +++ b/tests/Base/TranslationsTest.php @@ -28,7 +28,7 @@ class TranslationsTest extends TestCase public const LOCALES = [ 'en_US', 'nl_NL', - 'pl_PL', + 'pl_PL' ]; /** diff --git a/tests/Brazil/BrazilTest.php b/tests/Brazil/BrazilTest.php index c313ef169..87639488d 100644 --- a/tests/Brazil/BrazilTest.php +++ b/tests/Brazil/BrazilTest.php @@ -55,7 +55,7 @@ public function testObservedHolidays(): void 'carnavalTuesday', 'easter', 'corpusChristi', - 'ashWednesday', + 'ashWednesday' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/CzechRepublic/CzechRepublicTest.php b/tests/CzechRepublic/CzechRepublicTest.php index 7ca428e96..d3f448968 100644 --- a/tests/CzechRepublic/CzechRepublicTest.php +++ b/tests/CzechRepublic/CzechRepublicTest.php @@ -48,7 +48,7 @@ public function testOfficialHolidays(): void 'janHusDay', 'czechStateHoodDay', 'independentCzechoslovakStateDay', - 'struggleForFreedomAndDemocracyDay', + 'struggleForFreedomAndDemocracyDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -58,7 +58,7 @@ public function testOfficialHolidays(): void */ public function testObservedHolidays(): void { - $this->assertDefinedHolidays(['christmasEve',], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + $this->assertDefinedHolidays(['christmasEve'], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } /** diff --git a/tests/Denmark/DenmarkTest.php b/tests/Denmark/DenmarkTest.php index d61d81060..2b81f357e 100644 --- a/tests/Denmark/DenmarkTest.php +++ b/tests/Denmark/DenmarkTest.php @@ -56,7 +56,7 @@ public function testObservedHolidays(): void 'internationalWorkersDay', 'constitutionDay', 'christmasEve', - 'newYearsEve', + 'newYearsEve' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Estonia/EstoniaTest.php b/tests/Estonia/EstoniaTest.php index e0512973d..ec8764c60 100644 --- a/tests/Estonia/EstoniaTest.php +++ b/tests/Estonia/EstoniaTest.php @@ -39,7 +39,7 @@ public function testOfficialHolidays(): void 'newYearsDay', 'pentecost', 'secondChristmasDay', - 'stJohnsDay', + 'stJohnsDay' ]; $year = $this->generateRandomYear(); diff --git a/tests/Greece/GreeceTest.php b/tests/Greece/GreeceTest.php index 96414bf85..506a2510b 100644 --- a/tests/Greece/GreeceTest.php +++ b/tests/Greece/GreeceTest.php @@ -46,7 +46,7 @@ public function testOfficialHolidays(): void 'christmasDay', 'cleanMonday', 'independenceDay', - 'ohiDay', + 'ohiDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Hungary/HungaryTest.php b/tests/Hungary/HungaryTest.php index 05decc0fa..d78fcddf1 100644 --- a/tests/Hungary/HungaryTest.php +++ b/tests/Hungary/HungaryTest.php @@ -39,7 +39,7 @@ public function testOfficialHolidays(): void 'internationalWorkersDay', 'pentecostMonday', 'christmasDay', - 'secondChristmasDay', + 'secondChristmasDay' ]; if ($this->year >= 1891) { diff --git a/tests/Japan/AutumnalEquinoxDayTest.php b/tests/Japan/AutumnalEquinoxDayTest.php index 0e962d950..4093c0f32 100644 --- a/tests/Japan/AutumnalEquinoxDayTest.php +++ b/tests/Japan/AutumnalEquinoxDayTest.php @@ -85,7 +85,7 @@ public function autumnalEquinoxHolidaysProvider(): array [1999, 9, 23], [2013, 9, 23], [2016, 9, 22], - [2122, 9, 23], + [2122, 9, 23] ]; } diff --git a/tests/Japan/JapanTest.php b/tests/Japan/JapanTest.php index a311ab825..5539f9c15 100644 --- a/tests/Japan/JapanTest.php +++ b/tests/Japan/JapanTest.php @@ -47,7 +47,7 @@ public function testOfficialHolidays(): void 'sportsDay', 'cultureDay', 'laborThanksgivingDay', - 'emperorsBirthday', + 'emperorsBirthday' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -74,7 +74,7 @@ public function testOfficialHolidaysAt2019(): void 'cultureDay', 'laborThanksgivingDay', 'coronationDay', - 'enthronementProclamationCeremony', + 'enthronementProclamationCeremony' ], self::REGION, 2019, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Japan/VernalEquinoxDayTest.php b/tests/Japan/VernalEquinoxDayTest.php index b5f24bae0..eed2ac7f7 100644 --- a/tests/Japan/VernalEquinoxDayTest.php +++ b/tests/Japan/VernalEquinoxDayTest.php @@ -86,7 +86,7 @@ public function vernalEquinoxHolidaysProvider(): array [2013, 3, 20], [2016, 3, 20], [2025, 3, 20], - [2143, 3, 21], + [2143, 3, 21] ]; } diff --git a/tests/Lithuania/LithuaniaTest.php b/tests/Lithuania/LithuaniaTest.php index f1ce85678..18664fa86 100644 --- a/tests/Lithuania/LithuaniaTest.php +++ b/tests/Lithuania/LithuaniaTest.php @@ -40,7 +40,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'christmasEve', 'christmasDay', - 'secondChristmasDay', + 'secondChristmasDay' ]; $year = $this->generateRandomYear(); diff --git a/tests/NewZealand/NewZealandTest.php b/tests/NewZealand/NewZealandTest.php index 6dcf3e716..56b4d6edb 100644 --- a/tests/NewZealand/NewZealandTest.php +++ b/tests/NewZealand/NewZealandTest.php @@ -40,7 +40,7 @@ public function testOfficialHolidays(): void 'waitangiDay', 'anzacDay', 'queensBirthday', - 'labourDay', + 'labourDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Poland/PolandTest.php b/tests/Poland/PolandTest.php index a9eab30ef..5ccdb8b92 100644 --- a/tests/Poland/PolandTest.php +++ b/tests/Poland/PolandTest.php @@ -44,7 +44,7 @@ public function testOfficialHolidays(): void 'corpusChristi', 'secondChristmasDay', 'constitutionDay', - 'independenceDay', + 'independenceDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Russia/RussiaTest.php b/tests/Russia/RussiaTest.php index 925536d93..957d4b9db 100644 --- a/tests/Russia/RussiaTest.php +++ b/tests/Russia/RussiaTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'orthodoxChristmasDay', 'internationalWomensDay', 'springAndLabourDay', - 'victoryDay', + 'victoryDay' ]; $year = $this->generateRandomYear(); diff --git a/tests/Slovakia/EasterMondayTest.php b/tests/Slovakia/EasterMondayTest.php index 51db336c9..a57f1eacc 100644 --- a/tests/Slovakia/EasterMondayTest.php +++ b/tests/Slovakia/EasterMondayTest.php @@ -70,7 +70,7 @@ public function HolidayDataProvider(): array [2018, new DateTime('2018-4-2', new DateTimeZone($timezone))], [2019, new DateTime('2019-4-22', new DateTimeZone($timezone))], [2020, new DateTime('2020-4-13', new DateTimeZone($timezone))], - [2050, new DateTime('2050-4-11', new DateTimeZone($timezone))], + [2050, new DateTime('2050-4-11', new DateTimeZone($timezone))] ]; } diff --git a/tests/Slovakia/GoodFridayTest.php b/tests/Slovakia/GoodFridayTest.php index d294f9e60..1fe83bec6 100644 --- a/tests/Slovakia/GoodFridayTest.php +++ b/tests/Slovakia/GoodFridayTest.php @@ -70,7 +70,7 @@ public function HolidayDataProvider(): array [2018, new DateTime('2018-3-30', new DateTimeZone($timezone))], [2019, new DateTime('2019-4-19', new DateTimeZone($timezone))], [2020, new DateTime('2020-4-10', new DateTimeZone($timezone))], - [2050, new DateTime('2050-4-8', new DateTimeZone($timezone))], + [2050, new DateTime('2050-4-8', new DateTimeZone($timezone))] ]; } diff --git a/tests/Slovakia/SlovakiaTest.php b/tests/Slovakia/SlovakiaTest.php index dc40b2a75..28aa34c6f 100644 --- a/tests/Slovakia/SlovakiaTest.php +++ b/tests/Slovakia/SlovakiaTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'slovakConstitutionDay', 'slovakNationalUprisingDay', 'saintsCyrilAndMethodiusDay', - 'struggleForFreedomAndDemocracyDay', + 'struggleForFreedomAndDemocracyDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -64,7 +64,7 @@ public function testBankHolidays(): void 'christmasDay', 'secondChristmasDay', 'goodFriday', - 'easterMonday', + 'easterMonday' ], self::REGION, $this->year, Holiday::TYPE_BANK); } diff --git a/tests/Spain/Andalusia/AndalusiaTest.php b/tests/Spain/Andalusia/AndalusiaTest.php index 71be400f8..9ffeddd99 100644 --- a/tests/Spain/Andalusia/AndalusiaTest.php +++ b/tests/Spain/Andalusia/AndalusiaTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void { $this->assertDefinedHolidays([ 'maundyThursday', - 'easter', + 'easter' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Aragon/AragonTest.php b/tests/Spain/Aragon/AragonTest.php index 25fa90d5d..38df67d82 100644 --- a/tests/Spain/Aragon/AragonTest.php +++ b/tests/Spain/Aragon/AragonTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'maundyThursday', 'easter', - 'stGeorgesDay', + 'stGeorgesDay' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Asturias/AsturiasTest.php b/tests/Spain/Asturias/AsturiasTest.php index ab84f2b65..cc5adb36e 100644 --- a/tests/Spain/Asturias/AsturiasTest.php +++ b/tests/Spain/Asturias/AsturiasTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -55,7 +55,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'stJosephsDay', 'maundyThursday', - 'easter', + 'easter' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/BalearicIslands/BalearicIslandsTest.php b/tests/Spain/BalearicIslands/BalearicIslandsTest.php index cc6c97d30..f7ab0e397 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -57,7 +57,7 @@ public function testObservedHolidays(): void 'maundyThursday', 'easter', 'easterMonday', - 'stStephensDay', + 'stStephensDay' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/BasqueCountry/BasqueCountryTest.php b/tests/Spain/BasqueCountry/BasqueCountryTest.php index 928074d9f..f10a7e3f2 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -55,7 +55,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'maundyThursday', 'easter', - 'easterMonday', + 'easterMonday' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/CanaryIslands/CanaryIslandsTest.php b/tests/Spain/CanaryIslands/CanaryIslandsTest.php index 462c6ae2f..09d9c18b9 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void { $this->assertDefinedHolidays([ 'maundyThursday', - 'easter', + 'easter' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Cantabria/CantabriaTest.php b/tests/Spain/Cantabria/CantabriaTest.php index 29081edfe..e1892f9b5 100644 --- a/tests/Spain/Cantabria/CantabriaTest.php +++ b/tests/Spain/Cantabria/CantabriaTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void { $this->assertDefinedHolidays([ 'maundyThursday', - 'easter', + 'easter' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php index 28cb06e5c..b1bbd61ea 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void { $this->assertDefinedHolidays([ 'maundyThursday', - 'easter', + 'easter' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php index 7c708ce4b..0965fb42e 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -55,7 +55,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'stJosephsDay', 'maundyThursday', - 'easter', + 'easter' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Catalonia/CataloniaTest.php b/tests/Spain/Catalonia/CataloniaTest.php index 44ca20e70..84b0cd7c7 100644 --- a/tests/Spain/Catalonia/CataloniaTest.php +++ b/tests/Spain/Catalonia/CataloniaTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -56,7 +56,7 @@ public function testObservedHolidays(): void 'easter', 'easterMonday', 'stJohnsDay', - 'stStephensDay', + 'stStephensDay' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Ceuta/CeutaTest.php b/tests/Spain/Ceuta/CeutaTest.php index fa1258216..d7adbdd2c 100644 --- a/tests/Spain/Ceuta/CeutaTest.php +++ b/tests/Spain/Ceuta/CeutaTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void { $this->assertDefinedHolidays([ 'maundyThursday', - 'easter', + 'easter' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php index 8bb8bcae1..72d673830 100644 --- a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php +++ b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -56,7 +56,7 @@ public function testObservedHolidays(): void 'stJosephsDay', 'maundyThursday', 'easter', - 'corpusChristi', + 'corpusChristi' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Extremadura/ExtremaduraTest.php b/tests/Spain/Extremadura/ExtremaduraTest.php index f80dbeb61..41386d0c3 100644 --- a/tests/Spain/Extremadura/ExtremaduraTest.php +++ b/tests/Spain/Extremadura/ExtremaduraTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void { $this->assertDefinedHolidays([ 'maundyThursday', - 'easter', + 'easter' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Galicia/GaliciaTest.php b/tests/Spain/Galicia/GaliciaTest.php index 22164492d..c539fd8a3 100644 --- a/tests/Spain/Galicia/GaliciaTest.php +++ b/tests/Spain/Galicia/GaliciaTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -56,7 +56,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'stJosephsDay', 'maundyThursday', - 'easter', + 'easter' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/LaRioja/LaRiojaTest.php b/tests/Spain/LaRioja/LaRiojaTest.php index 29ffdc795..47b6cb2f5 100644 --- a/tests/Spain/LaRioja/LaRiojaTest.php +++ b/tests/Spain/LaRioja/LaRiojaTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void { $this->assertDefinedHolidays([ 'maundyThursday', - 'easter', + 'easter' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Melilla/MelillaTest.php b/tests/Spain/Melilla/MelillaTest.php index e6b682221..7a3c781aa 100644 --- a/tests/Spain/Melilla/MelillaTest.php +++ b/tests/Spain/Melilla/MelillaTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'stJosephsDay', 'maundyThursday', - 'easter', + 'easter' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Navarre/NavarreTest.php b/tests/Spain/Navarre/NavarreTest.php index b4be42db1..ef3752571 100644 --- a/tests/Spain/Navarre/NavarreTest.php +++ b/tests/Spain/Navarre/NavarreTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -55,7 +55,7 @@ public function testObservedHolidays(): void 'stJosephsDay', 'maundyThursday', 'easter', - 'easterMonday', + 'easterMonday' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php index d2155a520..4eae6f999 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -55,7 +55,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'stJosephsDay', 'maundyThursday', - 'easter', + 'easter' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php index 83c198ffd..8da5d00f4 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -55,7 +55,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'stJosephsDay', 'easterMonday', - 'easter', + 'easter' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Sweden/SwedenTest.php b/tests/Sweden/SwedenTest.php index b9817c399..57abeb722 100644 --- a/tests/Sweden/SwedenTest.php +++ b/tests/Sweden/SwedenTest.php @@ -60,7 +60,7 @@ public function testObservedHolidays(): void 'stJohnsEve', 'allSaintsEve', 'christmasEve', - 'newYearsEve', + 'newYearsEve' ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Switzerland/Geneva/GenevaTest.php b/tests/Switzerland/Geneva/GenevaTest.php index dd0bdb1e5..6ed4533ce 100644 --- a/tests/Switzerland/Geneva/GenevaTest.php +++ b/tests/Switzerland/Geneva/GenevaTest.php @@ -50,7 +50,7 @@ public function testRegionalHolidays(): void 'christmasDay', 'ascensionDay', 'easterMonday', - 'pentecostMonday', + 'pentecostMonday' ]; if ($this->year > 1813) { diff --git a/tests/Ukraine/UkraineTest.php b/tests/Ukraine/UkraineTest.php index 880a99836..0bfd21e60 100644 --- a/tests/Ukraine/UkraineTest.php +++ b/tests/Ukraine/UkraineTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'victoryDay', 'constitutionDay', 'independenceDay', - 'defenderOfUkraineDay', + 'defenderOfUkraineDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/UnitedKingdom/UnitedKingdomTest.php b/tests/UnitedKingdom/UnitedKingdomTest.php index 7b3c846dd..7f4016a4a 100644 --- a/tests/UnitedKingdom/UnitedKingdomTest.php +++ b/tests/UnitedKingdom/UnitedKingdomTest.php @@ -33,7 +33,7 @@ public function testOfficialHolidays(): void { $this->assertDefinedHolidays([ 'goodFriday', - 'christmasDay', + 'christmasDay' ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } From 8aefa0d51d3544ef80176d97bced680688e9699a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 14:38:47 +0900 Subject: [PATCH 079/133] Due to strict typing these uses generate warnings on code analysis tools. As this is intended, added a note to ignore this case. Signed-off-by: Sacha Telgenhof --- tests/Base/YasumiTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index 51f66d0b2..335accb5c 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -427,6 +427,7 @@ public function testIsHolidayException(): void { $this->expectException(TypeError::class); + /** @noinspection PhpParamsInspection */ Yasumi::create('Spain', Factory::create()->numberBetween( self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND @@ -502,6 +503,7 @@ public function testIsWorkingDayException(): void { $this->expectException(TypeError::class); + /** @noinspection PhpParamsInspection */ Yasumi::create('SouthAfrica', Factory::create()->numberBetween( self::YEAR_LOWER_BOUND, self::YEAR_UPPER_BOUND From 1ab8977568675eedb7320904261899318517ce2e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 14:46:02 +0900 Subject: [PATCH 080/133] Added more stricter type checking comparison. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/UnitedKingdom.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 1892ec8ea..8f1de6ca4 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -119,7 +119,7 @@ private function calculateMayDayBankHoliday(): void } // Moved to 8 May to commemorate the 50th (1995) and 75th (2020) anniversary of VE Day. - if ($this->year == 1995 || $this->year == 2020) { + if ($this->year === 1995 || $this->year === 2020) { $this->addHoliday(new Holiday( 'mayDayBankHoliday', ['en_GB' => 'May Day Bank Holiday'], @@ -165,7 +165,7 @@ private function calculateSpringBankHoliday(): void // Moved to 4 June for the celebration of the Golden (2002) and Diamond (2012) Jubilee // of Elizabeth II. - if ($this->year == 2002 || $this->year == 2012) { + if ($this->year === 2002 || $this->year === 2012) { $this->addHoliday(new Holiday( 'springBankHoliday', ['en_GB' => 'Spring Bank Holiday'], @@ -223,7 +223,7 @@ private function calculateSummerBankHoliday(): void // Statutory bank holiday from 1971, following a trial period from 1965 to 1970. // During the trial period, the definition was different than today, causing exceptions // in 1968 and 1969. - if ($this->year == 1968 || $this->year == 1969) { + if ($this->year === 1968 || $this->year === 1969) { $this->addHoliday(new Holiday( 'summerBankHoliday', ['en_GB' => 'Summer Bank Holiday'], From cdbf97d391026c4ab9665566b9d44dcb155c3898 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 7 Sep 2019 15:04:57 +0900 Subject: [PATCH 081/133] Added requirement for json extension (although likely most environments have this installed by default), as some test use the json functions. Signed-off-by: Sacha Telgenhof --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index f78313e71..6e0470c75 100755 --- a/composer.json +++ b/composer.json @@ -23,6 +23,7 @@ "php": ">=7.1" }, "require-dev": { + "ext-json": "*", "friendsofphp/php-cs-fixer": "^2.14", "fzaninotto/faker": "~1.8", "mikey179/vfsstream": "~1.6", From b14fde56b99644ab7a047f9a2f02f4762a9c245f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Sep 2019 09:40:09 +0900 Subject: [PATCH 082/133] Correct name of Emperors Birthday function and variable. Replaced null checks by appropriate instance / type checks. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Japan.php | 38 +++++++++++++++++------------------ 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index b7d86d51b..ef1a0e8ca 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -95,7 +95,7 @@ public function initialize(): void $this->calculateChildrensDay(); $this->calculateCultureDay(); $this->calculateLaborThanksgivingDay(); - $this->calculateEmporersBirthday(); + $this->calculateEmperorsBirthday(); $this->calculateVernalEquinoxDay(); $this->calculateComingOfAgeDay(); $this->calculateGreeneryDay(); @@ -219,22 +219,22 @@ private function calculateLaborThanksgivingDay(): void * * @throws \Exception */ - private function calculateEmporersBirthday(): void + private function calculateEmperorsBirthday(): void { - $emporersBirthday = false; + $emperorsBirthday = false; if ($this->year >=2020) { - $emporersBirthday = "$this->year-2-23"; + $emperorsBirthday = "$this->year-2-23"; } elseif ($this->year >= 1989 && $this->year <2019) { - $emporersBirthday = "$this->year-12-23"; + $emperorsBirthday = "$this->year-12-23"; } elseif ($this->year >= 1949 && $this->year <1988) { - $emporersBirthday = "$this->year-4-29"; + $emperorsBirthday = "$this->year-4-29"; } - if ($emporersBirthday) { + if ($emperorsBirthday) { $this->addHoliday(new Holiday( 'emperorsBirthday', ['en_US' => 'Emperors Birthday', 'ja_JP' => '天皇誕生日'], - new DateTime($emporersBirthday, new DateTimeZone($this->timezone)), + new DateTime($emperorsBirthday, new DateTimeZone($this->timezone)), $this->locale )); } @@ -303,7 +303,7 @@ private function calculateVernalEquinoxDay(): void $day = \floor(self::VERNAL_EQUINOX_PARAM_2150 + self::EQUINOX_GRADIENT * ($this->year - 1980) - \floor(($this->year - 1980) / 4)); } - if (null !== $day) { + if (\is_numeric($day)) { $this->addHoliday(new Holiday( 'vernalEquinoxDay', ['en_US' => 'Vernal Equinox Day', 'ja_JP' => '春分の日'], @@ -334,7 +334,7 @@ private function calculateComingOfAgeDay(): void $date = new DateTime("$this->year-1-15", new DateTimeZone($this->timezone)); } - if (null !== $date) { + if ($date instanceof DateTime) { $this->addHoliday(new Holiday( 'comingOfAgeDay', ['en_US' => 'Coming of Age Day', 'ja_JP' => '成人の日'], @@ -364,7 +364,7 @@ private function calculateGreeneryDay(): void $date = new DateTime("$this->year-4-29", new DateTimeZone($this->timezone)); } - if (null !== $date) { + if ($date instanceof DateTime) { $this->addHoliday(new Holiday( 'greeneryDay', ['en_US' => 'Greenery Day', 'ja_JP' => 'みどりの日'], @@ -390,7 +390,7 @@ private function calculateGreeneryDay(): void private function calculateMarineDay(): void { $date = null; - if ($this->year === 2020) { + if (2020 === $this->year) { $date = new DateTime("$this->year-7-23", new DateTimeZone($this->timezone)); } elseif ($this->year >= 2003) { $date = new DateTime("third monday of july $this->year", new DateTimeZone($this->timezone)); @@ -398,7 +398,7 @@ private function calculateMarineDay(): void $date = new DateTime("$this->year-7-20", new DateTimeZone($this->timezone)); } - if (null !== $date) { + if ($date instanceof DateTime) { $this->addHoliday(new Holiday( 'marineDay', ['en_US' => 'Marine Day', 'ja_JP' => '海の日'], @@ -421,13 +421,13 @@ private function calculateMarineDay(): void private function calculateMountainDay(): void { $date = null; - if ($this->year === 2020) { + if (2020 === $this->year) { $date = new DateTime("$this->year-8-10", new DateTimeZone($this->timezone)); } elseif ($this->year >= 2016) { $date = new DateTime("$this->year-8-11", new DateTimeZone($this->timezone)); } - if (null !== $date) { + if ($date instanceof DateTime) { $this->addHoliday(new Holiday( 'mountainDay', ['en_US' => 'Mountain Day', 'ja_JP' => '山の日'], @@ -458,7 +458,7 @@ private function calculateRespectForTheAgeDay(): void $date = new DateTime("$this->year-9-15", new DateTimeZone($this->timezone)); } - if (null !== $date) { + if ($date instanceof DateTime) { $this->addHoliday(new Holiday( 'respectfortheAgedDay', ['en_US' => 'Respect for the Aged Day', 'ja_JP' => '敬老の日'], @@ -484,7 +484,7 @@ private function calculateRespectForTheAgeDay(): void private function calculateSportsDay(): void { $date = null; - if ($this->year === 2020) { + if (2020 === $this->year) { $date = new DateTime("$this->year-7-24", new DateTimeZone($this->timezone)); } elseif ($this->year >= 2000) { $date = new DateTime("second monday of october $this->year", new DateTimeZone($this->timezone)); @@ -497,7 +497,7 @@ private function calculateSportsDay(): void $holiday_name =['en_US' => 'Sports Day', 'ja_JP' => 'スポーツの日']; } - if (null !== $date) { + if ($date instanceof DateTime) { $this->addHoliday(new Holiday( 'sportsDay', $holiday_name, @@ -534,7 +534,7 @@ private function calculateAutumnalEquinoxDay(): void $day = \floor(self::AUTUMNAL_EQUINOX_PARAM_2150 + self::EQUINOX_GRADIENT * ($this->year - 1980) - \floor(($this->year - 1980) / 4)); } - if (null !== $day) { + if (\is_numeric($day)) { $this->addHoliday(new Holiday( 'autumnalEquinoxDay', ['en_US' => 'Autumnal Equinox Day', 'ja_JP' => '秋分の日'], From fe0fdd12924bd6d0ec0103d5580de50eb56af060 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Sep 2019 10:02:33 +0900 Subject: [PATCH 083/133] Used imports rather than FQN. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/BetweenFilter.php | 2 +- src/Yasumi/Filters/OnFilter.php | 2 +- src/Yasumi/Holiday.php | 5 +- src/Yasumi/Provider/AbstractProvider.php | 34 ++-- src/Yasumi/Provider/Australia.php | 16 +- src/Yasumi/Provider/Australia/ACT.php | 11 +- src/Yasumi/Provider/Australia/NSW.php | 7 +- src/Yasumi/Provider/Australia/NT.php | 7 +- src/Yasumi/Provider/Australia/Queensland.php | 3 +- .../Australia/Queensland/Brisbane.php | 5 +- src/Yasumi/Provider/Australia/SA.php | 7 +- src/Yasumi/Provider/Australia/Tasmania.php | 3 +- .../Australia/Tasmania/CentralNorth.php | 3 +- .../Australia/Tasmania/FlindersIsland.php | 3 +- .../Australia/Tasmania/KingIsland.php | 3 +- .../Provider/Australia/Tasmania/Northeast.php | 3 +- .../Provider/Australia/Tasmania/Northwest.php | 3 +- .../Tasmania/Northwest/CircularHead.php | 3 +- .../Provider/Australia/Tasmania/South.php | 3 +- .../Australia/Tasmania/South/Southeast.php | 3 +- src/Yasumi/Provider/Australia/Victoria.php | 11 +- src/Yasumi/Provider/Australia/WA.php | 3 +- src/Yasumi/Provider/Austria.php | 10 +- src/Yasumi/Provider/Belgium.php | 6 +- src/Yasumi/Provider/Bosnia.php | 8 +- src/Yasumi/Provider/Brazil.php | 6 +- src/Yasumi/Provider/ChristianHolidays.php | 152 +++++++++--------- src/Yasumi/Provider/CommonHolidays.php | 78 ++++----- src/Yasumi/Provider/Croatia.php | 6 +- src/Yasumi/Provider/CzechRepublic.php | 30 ++-- src/Yasumi/Provider/Denmark.php | 14 +- src/Yasumi/Provider/Finland.php | 18 ++- src/Yasumi/Provider/France.php | 10 +- src/Yasumi/Provider/France/BasRhin.php | 6 +- src/Yasumi/Provider/France/HautRhin.php | 6 +- src/Yasumi/Provider/France/Moselle.php | 6 +- src/Yasumi/Provider/Germany.php | 10 +- .../Provider/Germany/BadenWurttemberg.php | 6 +- src/Yasumi/Provider/Germany/Bavaria.php | 6 +- src/Yasumi/Provider/Germany/Berlin.php | 6 +- src/Yasumi/Provider/Germany/Brandenburg.php | 10 +- src/Yasumi/Provider/Germany/Bremen.php | 10 +- src/Yasumi/Provider/Germany/Hamburg.php | 10 +- src/Yasumi/Provider/Germany/Hesse.php | 6 +- src/Yasumi/Provider/Germany/LowerSaxony.php | 10 +- .../Germany/MecklenburgWesternPomerania.php | 10 +- .../Provider/Germany/NorthRhineWestphalia.php | 6 +- .../Provider/Germany/RhinelandPalatinate.php | 6 +- src/Yasumi/Provider/Germany/Saarland.php | 6 +- src/Yasumi/Provider/Germany/Saxony.php | 14 +- src/Yasumi/Provider/Germany/SaxonyAnhalt.php | 10 +- .../Provider/Germany/SchleswigHolstein.php | 12 +- src/Yasumi/Provider/Germany/Thuringia.php | 10 +- src/Yasumi/Provider/Greece.php | 28 ++-- src/Yasumi/Provider/Hungary.php | 6 +- src/Yasumi/Provider/Ireland.php | 38 ++--- src/Yasumi/Provider/Italy.php | 14 +- src/Yasumi/Provider/Japan.php | 44 ++--- src/Yasumi/Provider/Netherlands.php | 6 +- src/Yasumi/Provider/NewZealand.php | 30 ++-- src/Yasumi/Provider/Norway.php | 10 +- src/Yasumi/Provider/Poland.php | 14 +- src/Yasumi/Provider/Portugal.php | 30 ++-- src/Yasumi/Provider/Romania.php | 32 ++-- src/Yasumi/Provider/Slovakia.php | 32 ++-- src/Yasumi/Provider/SouthAfrica.php | 46 +++--- src/Yasumi/Provider/SouthKorea.php | 6 +- src/Yasumi/Provider/Spain.php | 14 +- src/Yasumi/Provider/Spain/Andalusia.php | 10 +- src/Yasumi/Provider/Spain/Aragon.php | 6 +- src/Yasumi/Provider/Spain/Asturias.php | 10 +- src/Yasumi/Provider/Spain/BalearicIslands.php | 10 +- src/Yasumi/Provider/Spain/BasqueCountry.php | 10 +- src/Yasumi/Provider/Spain/CanaryIslands.php | 10 +- src/Yasumi/Provider/Spain/Cantabria.php | 10 +- src/Yasumi/Provider/Spain/CastileAndLeon.php | 10 +- .../Provider/Spain/CastillaLaMancha.php | 10 +- src/Yasumi/Provider/Spain/Catalonia.php | 10 +- src/Yasumi/Provider/Spain/Ceuta.php | 10 +- .../Provider/Spain/CommunityOfMadrid.php | 10 +- src/Yasumi/Provider/Spain/Extremadura.php | 10 +- src/Yasumi/Provider/Spain/Galicia.php | 14 +- src/Yasumi/Provider/Spain/LaRioja.php | 10 +- src/Yasumi/Provider/Spain/Melilla.php | 6 +- src/Yasumi/Provider/Spain/Navarre.php | 6 +- src/Yasumi/Provider/Spain/RegionOfMurcia.php | 10 +- .../Provider/Spain/ValencianCommunity.php | 10 +- src/Yasumi/Provider/Sweden.php | 26 +-- src/Yasumi/Provider/Switzerland.php | 18 ++- src/Yasumi/Provider/Switzerland/Aargau.php | 6 +- .../Switzerland/AppenzellAusserrhoden.php | 6 +- .../Switzerland/AppenzellInnerrhoden.php | 6 +- .../Provider/Switzerland/BaselLandschaft.php | 6 +- .../Provider/Switzerland/BaselStadt.php | 6 +- src/Yasumi/Provider/Switzerland/Bern.php | 6 +- src/Yasumi/Provider/Switzerland/Fribourg.php | 6 +- src/Yasumi/Provider/Switzerland/Geneva.php | 14 +- src/Yasumi/Provider/Switzerland/Glarus.php | 10 +- src/Yasumi/Provider/Switzerland/Grisons.php | 6 +- src/Yasumi/Provider/Switzerland/Jura.php | 10 +- src/Yasumi/Provider/Switzerland/Lucerne.php | 6 +- src/Yasumi/Provider/Switzerland/Neuchatel.php | 10 +- src/Yasumi/Provider/Switzerland/Nidwalden.php | 6 +- src/Yasumi/Provider/Switzerland/Obwalden.php | 10 +- .../Provider/Switzerland/Schaffhausen.php | 6 +- src/Yasumi/Provider/Switzerland/Schwyz.php | 6 +- src/Yasumi/Provider/Switzerland/Solothurn.php | 6 +- src/Yasumi/Provider/Switzerland/StGallen.php | 6 +- src/Yasumi/Provider/Switzerland/Thurgau.php | 6 +- src/Yasumi/Provider/Switzerland/Ticino.php | 10 +- src/Yasumi/Provider/Switzerland/Uri.php | 6 +- src/Yasumi/Provider/Switzerland/Valais.php | 6 +- src/Yasumi/Provider/Switzerland/Vaud.php | 6 +- src/Yasumi/Provider/Switzerland/Zug.php | 6 +- src/Yasumi/Provider/Switzerland/Zurich.php | 6 +- src/Yasumi/Provider/USA.php | 10 +- src/Yasumi/Provider/Ukraine.php | 30 ++-- src/Yasumi/Provider/UnitedKingdom.php | 26 +-- src/Yasumi/Translations.php | 6 +- src/Yasumi/Yasumi.php | 17 +- 120 files changed, 854 insertions(+), 639 deletions(-) diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index 24633e4d4..976fe2585 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -47,7 +47,7 @@ class BetweenFilter extends FilterIterator implements Countable /** * Construct the Between FilterIterator Object * - * @param \Iterator $iterator Iterator object of the Holidays Provider + * @param Iterator $iterator Iterator object of the Holidays Provider * @param \DateTimeInterface $start_date Start date of the time frame to check against * @param \DateTimeInterface $end_date End date of the time frame to check against * @param bool $equal Indicate whether the start and end dates should be included in the diff --git a/src/Yasumi/Filters/OnFilter.php b/src/Yasumi/Filters/OnFilter.php index 3fdf34cc1..b44c629ec 100644 --- a/src/Yasumi/Filters/OnFilter.php +++ b/src/Yasumi/Filters/OnFilter.php @@ -37,7 +37,7 @@ class OnFilter extends FilterIterator implements Countable /** * Construct the On FilterIterator Object * - * @param \Iterator $iterator Iterator object of the Holidays Provider + * @param Iterator $iterator Iterator object of the Holidays Provider * @param \DateTimeInterface $date Start date of the time frame to check against */ diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 1a72e145e..b42b7d844 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -15,6 +15,7 @@ use DateTime; use InvalidArgumentException; use JsonSerializable; +use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; /** @@ -93,9 +94,9 @@ class Holiday extends DateTime implements JsonSerializable * TYPE_OBSERVANCE, TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an * official holiday is considered. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws UnknownLocaleException - * @throws \InvalidArgumentException + * @throws InvalidArgumentException * @throws \Exception */ public function __construct( diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 439b089d8..dca4f1234 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -16,6 +16,8 @@ use Countable; use InvalidArgumentException; use IteratorAggregate; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Filters\BetweenFilter; use Yasumi\Filters\OnFilter; use Yasumi\Holiday; @@ -181,9 +183,9 @@ public function removeHoliday($shortName): void * @param \DateTimeInterface $date any date object that implements the DateTimeInterface (e.g. Yasumi\Holiday, * \DateTime) * - * @throws \Yasumi\Exception\InvalidDateException - * * @return bool true if date represents a working day, otherwise false + *@throws InvalidDateException + * */ public function isWorkingDay(\DateTimeInterface $date): bool { @@ -211,9 +213,9 @@ public function isWorkingDay(\DateTimeInterface $date): bool * @param \DateTimeInterface $date any date object that implements the DateTimeInterface (e.g. Yasumi\Holiday, * \DateTime) * - * @throws \Yasumi\Exception\InvalidDateException - * * @return bool true if date represents a holiday, otherwise false + *@throws InvalidDateException + * */ public function isHoliday(\DateTimeInterface $date): bool { @@ -332,12 +334,12 @@ public function getYear(): int * * @param string $shortName the name of the holiday for which the next occurrence need to be retrieved. * - * @return \Yasumi\Holiday|null a Holiday instance for the given holiday + * @return Holiday|null a Holiday instance for the given holiday * * @throws \ReflectionException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \RuntimeException - * @throws \InvalidArgumentException + * @throws InvalidArgumentException * * @covers AbstractProvider::anotherTime */ @@ -352,11 +354,11 @@ public function next($shortName): ?Holiday * @param int $year the year to get the holiday date for * @param string $shortName the name of the holiday for which the date needs to be fetched * - * @return \Yasumi\Holiday|null a Holiday instance for the given holiday and year + * @return Holiday|null a Holiday instance for the given holiday and year * * @throws \ReflectionException * @throws InvalidArgumentException when the given name is blank or empty. - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \RuntimeException */ private function anotherTime($year, $shortName): ?Holiday @@ -374,9 +376,9 @@ private function anotherTime($year, $shortName): ?Holiday * * @param string $shortName the name of the holiday. * + * @return Holiday|null a Holiday instance for the given holiday * @throws InvalidArgumentException when the given name is blank or empty. * - * @return \Yasumi\Holiday|null a Holiday instance for the given holiday */ public function getHoliday($shortName): ?Holiday { @@ -390,7 +392,7 @@ public function getHoliday($shortName): ?Holiday /** * Gets all of the holidays defined by this holiday provider (for the given year). * - * @return \Yasumi\Holiday[] list of all holidays defined for the given year + * @return Holiday[] list of all holidays defined for the given year */ public function getHolidays(): array { @@ -402,12 +404,12 @@ public function getHolidays(): array * * @param string $shortName the name of the holiday for which the previous occurrence need to be retrieved. * - * @return \Yasumi\Holiday|null a Holiday instance for the given holiday + * @return Holiday|null a Holiday instance for the given holiday * * @throws \ReflectionException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \RuntimeException - * @throws \InvalidArgumentException + * @throws InvalidArgumentException * * @covers AbstractProvider::anotherTime */ @@ -433,10 +435,10 @@ public function previous($shortName): ?Holiday * @param bool $equals indicate whether the start and end dates should be included in the * comparison * + * @return BetweenFilter * @throws InvalidArgumentException An InvalidArgumentException is thrown if the start date is set after the end * date. * - * @return \Yasumi\Filters\BetweenFilter */ public function between(\DateTimeInterface $start_date, \DateTimeInterface $end_date, $equals = true): BetweenFilter { @@ -458,7 +460,7 @@ public function between(\DateTimeInterface $start_date, \DateTimeInterface $end_ * * @param \DateTimeInterface $date Date to check for holidays on. * - * @return \Yasumi\Filters\OnFilter + * @return OnFilter */ public function on(\DateTimeInterface $date): OnFilter { diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index 26e01e11b..b58508610 100755 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -36,7 +38,7 @@ class Australia extends AbstractProvider * Initialize holidays for Australia. * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -67,7 +69,7 @@ public function initialize(): void * @link https://www.timeanddate.com/holidays/australia/australia-day * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateAustraliaDay(): void @@ -87,9 +89,9 @@ private function calculateAustraliaDay(): void * @param bool $moveFromSunday * @param string $type * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function calculateHoliday( @@ -119,7 +121,7 @@ public function calculateHoliday( * @link https://www.timeanddate.com/holidays/australia/new-year-day * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateNewYearHolidays(): void @@ -151,7 +153,7 @@ private function calculateNewYearHolidays(): void * @link https://www.timeanddate.com/holidays/australia/anzac-day * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateAnzacDay(): void @@ -184,7 +186,7 @@ private function calculateAnzacDay(): void * @link https://www.timeanddate.com/holidays/australia/christmas-day-holiday * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateChristmasDay(): void diff --git a/src/Yasumi/Provider/Australia/ACT.php b/src/Yasumi/Provider/Australia/ACT.php index 8a804c297..c9d2edab8 100644 --- a/src/Yasumi/Provider/Australia/ACT.php +++ b/src/Yasumi/Provider/Australia/ACT.php @@ -15,6 +15,7 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; @@ -36,7 +37,7 @@ class ACT extends Australia * Initialize holidays for Australian Capital Territory (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -112,9 +113,9 @@ private function calculateLabourDay(): void * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -144,9 +145,9 @@ private function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ diff --git a/src/Yasumi/Provider/Australia/NSW.php b/src/Yasumi/Provider/Australia/NSW.php index 8fafbf2f4..491a49b1c 100644 --- a/src/Yasumi/Provider/Australia/NSW.php +++ b/src/Yasumi/Provider/Australia/NSW.php @@ -15,6 +15,7 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; @@ -36,7 +37,7 @@ class NSW extends Australia * Initialize holidays for New South Wales (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -77,9 +78,9 @@ private function calculateLabourDay(): void * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ diff --git a/src/Yasumi/Provider/Australia/NT.php b/src/Yasumi/Provider/Australia/NT.php index 7374f631b..9f9e76f3e 100644 --- a/src/Yasumi/Provider/Australia/NT.php +++ b/src/Yasumi/Provider/Australia/NT.php @@ -15,6 +15,7 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; @@ -36,7 +37,7 @@ class NT extends Australia * Initialize holidays for Northern Territory (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -95,9 +96,9 @@ private function calculatePicnicDay(): void * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index 46ba1351c..c9bb0ce9b 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -14,6 +14,7 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; @@ -35,7 +36,7 @@ class Queensland extends Australia * Initialize holidays for Queensland (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php index bb68208a1..9bbcc9ee3 100644 --- a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php +++ b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php @@ -15,6 +15,7 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Queensland; @@ -37,7 +38,7 @@ class Brisbane extends Queensland * Initialize holidays for Brisbane (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -61,7 +62,7 @@ public function initialize(): void * @link https://en.wikipedia.org/wiki/Ekka * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculatePeoplesDay(): void diff --git a/src/Yasumi/Provider/Australia/SA.php b/src/Yasumi/Provider/Australia/SA.php index 0de3640ee..94344fcfe 100644 --- a/src/Yasumi/Provider/Australia/SA.php +++ b/src/Yasumi/Provider/Australia/SA.php @@ -15,6 +15,7 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; @@ -36,7 +37,7 @@ class SA extends Australia * Initialize holidays for South Australia (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -148,9 +149,9 @@ private function calculateAdelaideCupDay(): void * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index 7c5d287dc..401b5b6d3 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -14,6 +14,7 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; @@ -35,7 +36,7 @@ class Tasmania extends Australia * Initialize holidays for Tasmania (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php index 4c4b35ba5..a69522f3e 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php +++ b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php @@ -14,6 +14,7 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; @@ -34,7 +35,7 @@ class CentralNorth extends Tasmania * Initialize holidays for northeastern Tasmania (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php index 429d173e9..2cc579f40 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php @@ -15,6 +15,7 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; @@ -35,7 +36,7 @@ class FlindersIsland extends Tasmania * Initialize holidays for Flinders Island (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php index d1c3e3a7e..4fc226e7f 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php @@ -14,6 +14,7 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Provider\Australia\Tasmania; /** @@ -33,7 +34,7 @@ class KingIsland extends Tasmania * Initialize holidays for King Island (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php index a1d748bc3..217d98c2d 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php @@ -15,6 +15,7 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; @@ -35,7 +36,7 @@ class Northeast extends Tasmania * Initialize holidays for northeastern Tasmania (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php index 59300888c..c3dda82ae 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php @@ -15,6 +15,7 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; @@ -35,7 +36,7 @@ class Northwest extends Tasmania * Initialize holidays for northwestern Tasmania (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php index 43e6460a6..ba6adbe21 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php @@ -15,6 +15,7 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania\Northwest; @@ -35,7 +36,7 @@ class CircularHead extends Northwest * Initialize holidays for Circular Head (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Australia/Tasmania/South.php b/src/Yasumi/Provider/Australia/Tasmania/South.php index 2f93dab9d..05a5ba4b5 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South.php @@ -15,6 +15,7 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia\Tasmania; @@ -35,7 +36,7 @@ class South extends Tasmania * Initialize holidays for southern Tasmania (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php index a457e76f8..80a49ce53 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php @@ -14,6 +14,7 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Provider\Australia\Tasmania\South; /** @@ -35,7 +36,7 @@ class Southeast extends South * Initialize holidays for southeastern Tasmania (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index 8df350c41..8862db088 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -15,6 +15,7 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; @@ -36,7 +37,7 @@ class Victoria extends Australia * Initialize holidays for Victoria (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -150,9 +151,9 @@ private function calculateQueensBirthday(): void * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -182,9 +183,9 @@ private function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ diff --git a/src/Yasumi/Provider/Australia/WA.php b/src/Yasumi/Provider/Australia/WA.php index e7454da72..3e345827d 100644 --- a/src/Yasumi/Provider/Australia/WA.php +++ b/src/Yasumi/Provider/Australia/WA.php @@ -14,6 +14,7 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Australia; @@ -35,7 +36,7 @@ class WA extends Australia * Initialize holidays for Western Australia (Australia). * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Austria.php b/src/Yasumi/Provider/Austria.php index 6477d1ebb..80f76503e 100644 --- a/src/Yasumi/Provider/Austria.php +++ b/src/Yasumi/Provider/Austria.php @@ -14,6 +14,8 @@ namespace Yasumi\Provider; use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -32,9 +34,9 @@ class Austria extends AbstractProvider /** * Initialize holidays for Austria. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -73,9 +75,9 @@ public function initialize(): void * * @link https://en.wikipedia.org/wiki/Declaration_of_Neutrality * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateNationalDay(): void diff --git a/src/Yasumi/Provider/Belgium.php b/src/Yasumi/Provider/Belgium.php index 9444f06fb..c2f0e27b1 100755 --- a/src/Yasumi/Provider/Belgium.php +++ b/src/Yasumi/Provider/Belgium.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -32,9 +34,9 @@ class Belgium extends AbstractProvider /** * Initialize holidays for Belgium. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Bosnia.php b/src/Yasumi/Provider/Bosnia.php index d90f7e44b..5ff994d37 100644 --- a/src/Yasumi/Provider/Bosnia.php +++ b/src/Yasumi/Provider/Bosnia.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -34,9 +36,9 @@ class Bosnia extends AbstractProvider /** * Initialize holidays for Bosnia. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -57,7 +59,7 @@ public function initialize(): void $this->addHoliday(new Holiday('orthodoxChristmasDay', [ 'en_US' => 'Orthodox Christmas Day', 'bs_Latn_BA' => 'Pravoslavni Božić' - ], new \DateTime("{$this->year}-01-07", new \DateTimeZone($this->timezone)))); + ], new DateTime("{$this->year}-01-07", new DateTimeZone($this->timezone)))); /** diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index e8e832f17..29d19f6f8 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -33,9 +35,9 @@ class Brazil extends AbstractProvider /** * Initialize holidays for Brazil. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index 17bcd0030..40e5c270e 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -40,10 +42,10 @@ trait ChristianHolidays * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -67,10 +69,10 @@ public function easter(int $year, string $timezone, string $locale, string $type * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -104,10 +106,10 @@ public function easterMonday( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -138,10 +140,10 @@ public function ascensionDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -172,10 +174,10 @@ public function pentecost( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -209,10 +211,10 @@ public function pentecostMonday( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default a type of 'other' is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -247,10 +249,10 @@ public function corpusChristi( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default observance is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -282,10 +284,10 @@ public function christmasEve( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -317,10 +319,10 @@ public function christmasDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -355,10 +357,10 @@ public function secondChristmasDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -386,10 +388,10 @@ public function allSaintsDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -421,10 +423,10 @@ public function assumptionOfMary( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -460,10 +462,10 @@ public function goodFriday( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -491,10 +493,10 @@ public function epiphany( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -529,10 +531,10 @@ public function ashWednesday( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -568,10 +570,10 @@ public function immaculateConception( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -607,10 +609,10 @@ public function stStephensDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -639,10 +641,10 @@ public function stJosephsDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -677,10 +679,10 @@ public function maundyThursday( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -710,10 +712,10 @@ public function stGeorgesDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -743,10 +745,10 @@ public function stJohnsDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -771,13 +773,13 @@ public function annunciation( * @param int $year the year for which Easter needs to be calculated * @param string $timezone the timezone in which Easter is celebrated * - * @return \DateTime date of Orthodox Easter + * @return DateTime date of Orthodox Easter * - * @link http://php.net/manual/en/function.easter-date.php#83794 - * @link https://en.wikipedia.org/wiki/Computus#Adaptation_for_Western_Easter_of_Meeus.27_Julian_algorithm * @throws \Exception + * @link https://en.wikipedia.org/wiki/Computus#Adaptation_for_Western_Easter_of_Meeus.27_Julian_algorithm + * @link http://php.net/manual/en/function.easter-date.php#83794 */ - public function calculateOrthodoxEaster(int $year, string $timezone): \DateTime + public function calculateOrthodoxEaster(int $year, string $timezone): DateTime { $a = $year % 4; $b = $year % 7; @@ -811,10 +813,10 @@ public function calculateOrthodoxEaster(int $year, string $timezone): \DateTime * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -845,17 +847,17 @@ public function reformationDay( * * Note: In calendrical calculations, frequently operations called integer division are used. * + * @param int $year the year for which Easter needs to be calculated + * @param string $timezone the timezone in which Easter is celebrated + * + * @return DateTime date of Easter + * @throws \Exception * @see easter_days * * @link https://github.com/php/php-src/blob/c8aa6f3a9a3d2c114d0c5e0c9fdd0a465dbb54a5/ext/calendar/easter.c * @link http://www.gmarts.org/index.php?go=415#EasterMallen * @link http://www.tondering.dk/claus/cal/easter.php * - * @param int $year the year for which Easter needs to be calculated - * @param string $timezone the timezone in which Easter is celebrated - * - * @return \DateTime date of Easter - * @throws \Exception */ protected function calculateEaster(int $year, string $timezone): DateTime { diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index 7c6c62d67..ba770b49d 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -39,10 +41,10 @@ trait CommonHolidays * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -73,10 +75,10 @@ public function newYearsEve( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -106,10 +108,10 @@ public function newYearsDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -145,10 +147,10 @@ public function internationalWorkersDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -182,10 +184,10 @@ public function valentinesDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -221,10 +223,10 @@ public function worldAnimalDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -259,10 +261,10 @@ public function stMartinsDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -297,10 +299,10 @@ public function fathersDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -335,10 +337,10 @@ public function mothersDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -375,10 +377,10 @@ public function victoryInEuropeDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -410,10 +412,10 @@ public function armisticeDay( * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday + * @return Holiday * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -449,7 +451,7 @@ public function internationalWomensDay( * @param string $timezone the timezone in which Easter is celebrated * @param bool $summer whether to calculate the start of summer or winter time * - * @return \DateTime|null A DateTime object representing the summer or winter transition time for the given + * @return DateTime|null A DateTime object representing the summer or winter transition time for the given * timezone. If no transition time is found, a null value is returned. * @throws \Exception */ @@ -483,9 +485,9 @@ protected function calculateSummerWinterTime($year, $timezone, $summer): ?DateTi * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday|null + * @return Holiday|null * - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -517,9 +519,9 @@ public function summerTime($year, $timezone, $locale, $type = Holiday::TYPE_SEAS * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * - * @return \Yasumi\Holiday|null + * @return Holiday|null * - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index 33fe4b984..0c44c23af 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -34,9 +36,9 @@ class Croatia extends AbstractProvider /** * Initialize holidays for Croatia. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/CzechRepublic.php b/src/Yasumi/Provider/CzechRepublic.php index 3bdb2d41a..79a0ca287 100644 --- a/src/Yasumi/Provider/CzechRepublic.php +++ b/src/Yasumi/Provider/CzechRepublic.php @@ -13,6 +13,8 @@ namespace Yasumi\Provider; use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -35,9 +37,9 @@ class CzechRepublic extends AbstractProvider /** * Initialize holidays for the Czech Republic. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -65,9 +67,9 @@ public function initialize(): void * * @see https://en.wikipedia.org/wiki/Public_holidays_in_the_Czech_Republic * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateRenewalOfCzechIndependenceDay(): void @@ -99,9 +101,9 @@ private function calculateRenewalOfCzechIndependenceDay(): void * @see https://en.wikipedia.org/wiki/Saints_Cyril_and_Methodius * @see https://en.wikipedia.org/wiki/Public_holidays_in_the_Czech_Republic * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateSaintsCyrilAndMethodiusDay(): void @@ -124,9 +126,9 @@ private function calculateSaintsCyrilAndMethodiusDay(): void * @see https://en.wikipedia.org/wiki/Jan_Hus * @see https://en.wikipedia.org/wiki/Public_holidays_in_the_Czech_Republic * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateJanHusDay(): void @@ -152,9 +154,9 @@ private function calculateJanHusDay(): void * @see https://en.wikipedia.org/wiki/Wenceslaus_I,_Duke_of_Bohemia * @see https://en.wikipedia.org/wiki/Public_holidays_in_the_Czech_Republic * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateCzechStatehoodDay(): void @@ -172,9 +174,9 @@ private function calculateCzechStatehoodDay(): void * * @see https://en.wikipedia.org/wiki/Public_holidays_in_the_Czech_Republic * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateIndependentCzechoslovakStateDay(): void @@ -190,9 +192,9 @@ private function calculateIndependentCzechoslovakStateDay(): void * * @see https://en.wikipedia.org/wiki/Public_holidays_in_the_Czech_Republic * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateStruggleForFreedomAndDemocracyDay(): void diff --git a/src/Yasumi/Provider/Denmark.php b/src/Yasumi/Provider/Denmark.php index f2db16260..b92fa6e21 100644 --- a/src/Yasumi/Provider/Denmark.php +++ b/src/Yasumi/Provider/Denmark.php @@ -15,6 +15,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -33,9 +35,9 @@ class Denmark extends AbstractProvider /** * Initialize holidays for Denmark. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -83,9 +85,9 @@ public function initialize(): void * * @link https://en.wikipedia.org/wiki/Store_Bededag * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateGreatPrayerDay(): void @@ -113,9 +115,9 @@ private function calculateGreatPrayerDay(): void * * @link https://en.wikipedia.org/wiki/Constitution_Day_(Denmark) * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateConstitutionDay(): void diff --git a/src/Yasumi/Provider/Finland.php b/src/Yasumi/Provider/Finland.php index b85d1a7c4..8e5c84dc1 100644 --- a/src/Yasumi/Provider/Finland.php +++ b/src/Yasumi/Provider/Finland.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -32,9 +34,9 @@ class Finland extends AbstractProvider /** * Initialize holidays for Finland. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -76,9 +78,9 @@ public function initialize(): void * * @link https://en.wikipedia.org/wiki/Midsummer#Finland * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateStJohnsDay(): void @@ -117,9 +119,9 @@ private function calculateStJohnsDay(): void * @link https://en.wikipedia.org/wiki/All_Saints%27_Day * @link https://fi.wikipedia.org/wiki/Pyh%C3%A4inp%C3%A4iv%C3%A4 * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateAllSaintsDay(): void @@ -145,9 +147,9 @@ private function calculateAllSaintsDay(): void * * @link https://en.wikipedia.org/wiki/Independence_Day_(Finland) * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateIndependenceDay(): void diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php index adf84e201..51dee0276 100755 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -32,9 +34,9 @@ class France extends AbstractProvider /** * Initialize holidays for France. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -77,9 +79,9 @@ public function initialize(): void * * @link http://en.wikipedia.org/wiki/Bastille_Day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateBastilleDay(): void diff --git a/src/Yasumi/Provider/France/BasRhin.php b/src/Yasumi/Provider/France/BasRhin.php index 4642c5281..e92075929 100755 --- a/src/Yasumi/Provider/France/BasRhin.php +++ b/src/Yasumi/Provider/France/BasRhin.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\France; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\France; @@ -37,9 +39,9 @@ class BasRhin extends France /** * Initialize holidays for Bas-Rhin (France). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/France/HautRhin.php b/src/Yasumi/Provider/France/HautRhin.php index 9154631ef..5b6a56e66 100755 --- a/src/Yasumi/Provider/France/HautRhin.php +++ b/src/Yasumi/Provider/France/HautRhin.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\France; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\France; @@ -37,9 +39,9 @@ class HautRhin extends France /** * Initialize holidays for Haut-Rhin (France). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/France/Moselle.php b/src/Yasumi/Provider/France/Moselle.php index 12cf57422..ee49214c0 100755 --- a/src/Yasumi/Provider/France/Moselle.php +++ b/src/Yasumi/Provider/France/Moselle.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\France; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\France; @@ -38,9 +40,9 @@ class Moselle extends France /** * Initialize holidays for Moselle (France). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Germany.php b/src/Yasumi/Provider/Germany.php index 24fd56bd4..b17de0345 100644 --- a/src/Yasumi/Provider/Germany.php +++ b/src/Yasumi/Provider/Germany.php @@ -14,6 +14,8 @@ namespace Yasumi\Provider; use DateTime; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -32,9 +34,9 @@ class Germany extends AbstractProvider /** * Initialize holidays for Germany. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -74,9 +76,9 @@ public function initialize(): void * * @link https://en.wikipedia.org/wiki/German_Unity_Day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateGermanUnityDay(): void diff --git a/src/Yasumi/Provider/Germany/BadenWurttemberg.php b/src/Yasumi/Provider/Germany/BadenWurttemberg.php index 593ee50fc..4f4025da3 100755 --- a/src/Yasumi/Provider/Germany/BadenWurttemberg.php +++ b/src/Yasumi/Provider/Germany/BadenWurttemberg.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Germany; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Germany; @@ -35,9 +37,9 @@ class BadenWurttemberg extends Germany /** * Initialize holidays for Baden-Württemberg (Germany). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Germany/Bavaria.php b/src/Yasumi/Provider/Germany/Bavaria.php index 1a97df3ca..842820c24 100755 --- a/src/Yasumi/Provider/Germany/Bavaria.php +++ b/src/Yasumi/Provider/Germany/Bavaria.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Germany; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Germany; @@ -36,9 +38,9 @@ class Bavaria extends Germany /** * Initialize holidays for Bavaria (Germany). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Germany/Berlin.php b/src/Yasumi/Provider/Germany/Berlin.php index 2d1896d44..f667a0a2f 100755 --- a/src/Yasumi/Provider/Germany/Berlin.php +++ b/src/Yasumi/Provider/Germany/Berlin.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Germany; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Provider\Germany; /** @@ -35,9 +37,9 @@ class Berlin extends Germany /** * Initialize holidays for Berlin (Germany). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Germany/Brandenburg.php b/src/Yasumi/Provider/Germany/Brandenburg.php index f405f2330..3003a023b 100755 --- a/src/Yasumi/Provider/Germany/Brandenburg.php +++ b/src/Yasumi/Provider/Germany/Brandenburg.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Germany; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Provider\Germany; /** @@ -34,9 +36,9 @@ class Brandenburg extends Germany /** * Initialize holidays for Brandenburg (Germany). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -55,9 +57,9 @@ public function initialize(): void * For the German state of Brandenburg, Reformation Day was celebrated since 1517. * Note: In 2017 all German states will celebrate Reformation Day for its 500th anniversary. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateReformationDay(): void diff --git a/src/Yasumi/Provider/Germany/Bremen.php b/src/Yasumi/Provider/Germany/Bremen.php index 5f4fc9ae7..b592b4569 100755 --- a/src/Yasumi/Provider/Germany/Bremen.php +++ b/src/Yasumi/Provider/Germany/Bremen.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Germany; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Provider\Germany; /** @@ -34,9 +36,9 @@ class Bremen extends Germany /** * Initialize holidays for Bremen (Germany). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -51,9 +53,9 @@ public function initialize(): void * For the German state of Bremen, Reformation Day is celebrated since 2018. * Note: In 2017 all German states will celebrate Reformation Day for its 500th anniversary. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateReformationDay(): void diff --git a/src/Yasumi/Provider/Germany/Hamburg.php b/src/Yasumi/Provider/Germany/Hamburg.php index fa484c5ff..824e0820e 100755 --- a/src/Yasumi/Provider/Germany/Hamburg.php +++ b/src/Yasumi/Provider/Germany/Hamburg.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Germany; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Germany; @@ -36,9 +38,9 @@ class Hamburg extends Germany /** * Initialize holidays for Schleswig-Holstein (Germany). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -52,9 +54,9 @@ public function initialize(): void * Since 2018 Hamburg celebrates the "Day of Reformation". * It is not called "Reformation Day" like other states to prevent church-based associations * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateDayOfReformation(): void diff --git a/src/Yasumi/Provider/Germany/Hesse.php b/src/Yasumi/Provider/Germany/Hesse.php index 2f9cc2992..34162efc3 100755 --- a/src/Yasumi/Provider/Germany/Hesse.php +++ b/src/Yasumi/Provider/Germany/Hesse.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Germany; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Provider\Germany; /** @@ -36,9 +38,9 @@ class Hesse extends Germany /** * Initialize holidays for Hesse (Germany). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Germany/LowerSaxony.php b/src/Yasumi/Provider/Germany/LowerSaxony.php index e6279be66..a473e4e36 100755 --- a/src/Yasumi/Provider/Germany/LowerSaxony.php +++ b/src/Yasumi/Provider/Germany/LowerSaxony.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Germany; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Provider\Germany; /** @@ -35,9 +37,9 @@ class LowerSaxony extends Germany /** * Initialize holidays for Lower Saxony (Germany). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -54,9 +56,9 @@ public function initialize(): void * * @link https://www.zeit.de/gesellschaft/zeitgeschehen/2018-06/reformationstag-niedersachsen-neuer-feiertag * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateReformationDay(): void diff --git a/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php b/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php index 59202eed5..75adcc5fb 100755 --- a/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php +++ b/src/Yasumi/Provider/Germany/MecklenburgWesternPomerania.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Germany; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Provider\Germany; /** @@ -35,9 +37,9 @@ class MecklenburgWesternPomerania extends Germany /** * Initialize holidays for Mecklenburg-Western Pomerania (Germany). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -52,9 +54,9 @@ public function initialize(): void * For the German state of Mecklenburg-Western Pomerania, Reformation Day was celebrated since 1517. * Note: In 2017 all German states will celebrate Reformation Day for its 500th anniversary. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateReformationDay(): void diff --git a/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php b/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php index b705de979..d31d6d28f 100755 --- a/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php +++ b/src/Yasumi/Provider/Germany/NorthRhineWestphalia.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Germany; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Germany; @@ -36,9 +38,9 @@ class NorthRhineWestphalia extends Germany /** * Initialize holidays for North Rhine-Westphalia (Germany). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Germany/RhinelandPalatinate.php b/src/Yasumi/Provider/Germany/RhinelandPalatinate.php index f99e8ce3f..264907d20 100755 --- a/src/Yasumi/Provider/Germany/RhinelandPalatinate.php +++ b/src/Yasumi/Provider/Germany/RhinelandPalatinate.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Germany; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Germany; @@ -35,9 +37,9 @@ class RhinelandPalatinate extends Germany /** * Initialize holidays for Rhineland Palatinate (Germany). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Germany/Saarland.php b/src/Yasumi/Provider/Germany/Saarland.php index e51ad314b..c00eb112e 100755 --- a/src/Yasumi/Provider/Germany/Saarland.php +++ b/src/Yasumi/Provider/Germany/Saarland.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Germany; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Germany; @@ -36,9 +38,9 @@ class Saarland extends Germany /** * Initialize holidays for Saarland (Germany). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Germany/Saxony.php b/src/Yasumi/Provider/Germany/Saxony.php index 309d1dc4d..17f0df11d 100755 --- a/src/Yasumi/Provider/Germany/Saxony.php +++ b/src/Yasumi/Provider/Germany/Saxony.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Germany; @@ -36,9 +38,9 @@ class Saxony extends Germany /** * Initialize holidays for Saxony (Germany). - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -54,9 +56,9 @@ public function initialize(): void * For the German state of Saxony, Reformation Day was celebrated since 1517. * Note: In 2017 all German states will celebrate Reformation Day for its 500th anniversary. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateReformationDay(): void @@ -80,9 +82,9 @@ private function calculateReformationDay(): void * * @link https://en.wikipedia.org/wiki/Bu%C3%9F-_und_Bettag * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateRepentanceAndPrayerDay(): void diff --git a/src/Yasumi/Provider/Germany/SaxonyAnhalt.php b/src/Yasumi/Provider/Germany/SaxonyAnhalt.php index b946c5bae..d9ae3f354 100755 --- a/src/Yasumi/Provider/Germany/SaxonyAnhalt.php +++ b/src/Yasumi/Provider/Germany/SaxonyAnhalt.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Germany; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\Germany; @@ -35,9 +37,9 @@ class SaxonyAnhalt extends Germany /** * Initialize holidays for Saxony-Anhalt (Germany). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -53,9 +55,9 @@ public function initialize(): void * For the German state of Saxony-Anhalt, Reformation Day was celebrated since 1517. * Note: In 2017 all German states will celebrate Reformation Day for its 500th anniversary. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateReformationDay(): void diff --git a/src/Yasumi/Provider/Germany/SchleswigHolstein.php b/src/Yasumi/Provider/Germany/SchleswigHolstein.php index f37a99875..80b37fef3 100755 --- a/src/Yasumi/Provider/Germany/SchleswigHolstein.php +++ b/src/Yasumi/Provider/Germany/SchleswigHolstein.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Germany; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Provider\Germany; /** @@ -30,13 +32,13 @@ class SchleswigHolstein extends Germany * country or sub-region. */ public const ID = 'DE-SH'; - + /** * Initialize holidays for Schleswig-Holstein (Germany). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -51,9 +53,9 @@ public function initialize(): void * For the German state of Schleswig-Holstein, Reformation Day is celebrated since 2018. * Note: In 2017 all German states will celebrate Reformation Day for its 500th anniversary. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateReformationDay(): void diff --git a/src/Yasumi/Provider/Germany/Thuringia.php b/src/Yasumi/Provider/Germany/Thuringia.php index c8839ab0c..18a5a9053 100755 --- a/src/Yasumi/Provider/Germany/Thuringia.php +++ b/src/Yasumi/Provider/Germany/Thuringia.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Germany; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Provider\Germany; /** @@ -35,9 +37,9 @@ class Thuringia extends Germany /** * Initialize holidays for Thuringia (Germany). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -52,9 +54,9 @@ public function initialize(): void * For the German state of Thuringia, Reformation Day was celebrated since 1517. * Note: In 2017 all German states will celebrate Reformation Day for its 500th anniversary. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateReformationDay(): void diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index 14ec3b972..d6bfe9679 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -33,9 +35,9 @@ class Greece extends AbstractProvider /** * Initialize holidays for Greece. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -74,9 +76,9 @@ public function initialize(): void * * @see https://en.wikipedia.org/wiki/Three_Holy_Hierarchs * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateThreeHolyHierarchs(): void @@ -99,9 +101,9 @@ private function calculateThreeHolyHierarchs(): void * * @see https://en.wikipedia.org/wiki/Clean_Monday * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateCleanMonday(): void @@ -120,7 +122,7 @@ private function calculateCleanMonday(): void * @param int $year * @param string $timezone * - * @return \DateTime + * @return DateTime * * @throws \Exception */ @@ -136,9 +138,9 @@ private function calculateEaster($year, $timezone): DateTime * * @link https://en.wikipedia.org/wiki/Greek_War_of_Independence * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ @@ -161,9 +163,9 @@ private function calculateIndependenceDay(): void * * @link https://en.wikipedia.org/wiki/Ohi_Day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateOhiDay(): void @@ -185,9 +187,9 @@ private function calculateOhiDay(): void * * @link https://en.wikipedia.org/wiki/Athens_Polytechnic_uprising * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculatePolytechnio(): void diff --git a/src/Yasumi/Provider/Hungary.php b/src/Yasumi/Provider/Hungary.php index 13bffbcee..673351d95 100644 --- a/src/Yasumi/Provider/Hungary.php +++ b/src/Yasumi/Provider/Hungary.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -34,9 +36,9 @@ class Hungary extends AbstractProvider /** * Initialize holidays for Hungary. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index c15f971db..42b1887fc 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -15,6 +15,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -38,9 +40,9 @@ class Ireland extends AbstractProvider /** * Initialize holidays for Ireland. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -86,9 +88,9 @@ public function initialize(): void * states that New Years Day is substituted the *next* day if it does not fall on a weekday. So what if it * falls on a Saturday? * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateNewYearsDay(): void @@ -119,9 +121,9 @@ private function calculateNewYearsDay(): void * @link http://www.irishstatutebook.ie/eli/1939/act/1/section/8/enacted/en/html * @link http://www.irishstatutebook.ie/eli/1973/act/25/schedule/1/enacted/en/html#sched1 * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculatePentecostMonday(): void @@ -141,9 +143,9 @@ private function calculatePentecostMonday(): void * * @link http://www.irishstatutebook.ie/eli/1973/act/25/schedule/1/enacted/en/html#sched1 * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ @@ -178,9 +180,9 @@ private function calculateChristmasDay(): void * @link https://en.wikipedia.org/wiki/St._Stephen%27s_Day * @see ChristianHolidays * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ @@ -217,9 +219,9 @@ private function calculateStStephensDay(): void * * @link https://en.wikipedia.org/wiki/Saint_Patrick%27s_Day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ @@ -259,9 +261,9 @@ private function calculateStPatricksDay(): void * * @link https://en.wikipedia.org/wiki/May_Day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ @@ -287,9 +289,9 @@ private function calculateMayDay(): void * * @link http://www.irishstatutebook.ie/eli/1961/act/33/section/8/enacted/en/html * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ @@ -314,9 +316,9 @@ private function calculateJuneHoliday(): void * * @link http://www.irishstatutebook.ie/eli/1973/act/25/schedule/1/enacted/en/html#sched1 * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index 84fc91f6b..8cf53239d 100755 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -32,9 +34,9 @@ class Italy extends AbstractProvider /** * Initialize holidays for Italy. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -71,9 +73,9 @@ public function initialize(): void * * @link http://en.wikipedia.org/wiki/Liberation_Day_%28Italy%29 * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ @@ -99,9 +101,9 @@ private function calculateLiberationDay(): void * * @link http://en.wikipedia.org/wiki/Festa_della_Repubblica * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index ef1a0e8ca..99667f353 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -16,6 +16,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -74,9 +76,9 @@ class Japan extends AbstractProvider /** * Initialize holidays for Japan. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -285,9 +287,9 @@ private function calculateEnthronementProclamationCeremony(): void * * @link http://www.h3.dion.ne.jp/~sakatsu/holiday_topic.htm (in Japanese) * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateVernalEquinoxDay(): void @@ -319,9 +321,9 @@ private function calculateVernalEquinoxDay(): void * Coming of Age Day was established after 1948 on January 15th. After 2000 it was changed to be the second monday * of January. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ @@ -349,9 +351,9 @@ private function calculateComingOfAgeDay(): void * * Greenery Day was established from 1989 on April 29th. After 2007 it was changed to be May 4th. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ @@ -380,9 +382,9 @@ private function calculateGreeneryDay(): void * Marine Day was established since 1996 on July 20th. After 2003 it was changed to be the third monday of July.In * 2020 is July 23th. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception * @throws \Exception @@ -414,7 +416,7 @@ private function calculateMarineDay(): void * Mountain Day. Mountain Day is held on August 11th and established since 2016.In 2020 is August 10th. * * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ @@ -443,9 +445,9 @@ private function calculateMountainDay(): void * Respect for the Age Day was established since 1996 on September 15th. After 2003 it was changed to be the third * monday of September. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ @@ -474,9 +476,9 @@ private function calculateRespectForTheAgeDay(): void * Health And Sports Day was established since 1966 on October 10th. After 2000 it was changed to be the second * monday of October.In 2020 is July 24th. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception * @throws \Exception @@ -516,9 +518,9 @@ private function calculateSportsDay(): void * * @link http://www.h3.dion.ne.jp/~sakatsu/holiday_topic.htm (in Japanese) * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateAutumnalEquinoxDay(): void @@ -550,9 +552,9 @@ private function calculateAutumnalEquinoxDay(): void * Generally if a national holiday falls on a Sunday, the holiday is observed the next working day (not being * another holiday). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateSubstituteHolidays(): void @@ -597,9 +599,9 @@ private function calculateSubstituteHolidays(): void * * Any day that falls between two other national holidays also becomes a holiday, known as a bridge holiday. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateBridgeHolidays(): void diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 0bab0fb87..329210ca6 100755 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -33,9 +35,9 @@ class Netherlands extends AbstractProvider /** * Initialize holidays for the Netherlands. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index 3cfb08228..81b016e34 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -33,9 +35,9 @@ class NewZealand extends AbstractProvider /** * Initialize holidays for New Zealand. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -66,9 +68,9 @@ public function initialize(): void * @link http://www.timeanddate.com/holidays/new-zealand/day-after-new-years-day * @link http://employment.govt.nz/er/holidaysandleave/publicholidays/mondayisation.asp * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateNewYearHolidays(): void @@ -106,9 +108,9 @@ private function calculateNewYearHolidays(): void * @link https://en.wikipedia.org/wiki/Waitangi_Day * @link http://employment.govt.nz/er/holidaysandleave/publicholidays/mondayisation.asp * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateWaitangiDay(): void @@ -136,9 +138,9 @@ private function calculateWaitangiDay(): void * @link https://en.wikipedia.org/wiki/Anzac_Day * @link http://employment.govt.nz/er/holidaysandleave/publicholidays/mondayisation.asp * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateAnzacDay(): void @@ -169,9 +171,9 @@ private function calculateAnzacDay(): void * * @link http://www.timeanddate.com/holidays/new-zealand/queen-birthday * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateQueensBirthday(): void @@ -202,9 +204,9 @@ private function calculateQueensBirthday(): void * * @link http://www.timeanddate.com/holidays/new-zealand/labour-day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateLabourDay(): void @@ -231,9 +233,9 @@ private function calculateLabourDay(): void * @link http://www.timeanddate.com/holidays/new-zealand/christmas-day * @link http://employment.govt.nz/er/holidaysandleave/publicholidays/mondayisation.asp * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateChristmasHolidays(): void diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index a556746c2..973d39011 100644 --- a/src/Yasumi/Provider/Norway.php +++ b/src/Yasumi/Provider/Norway.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -32,9 +34,9 @@ class Norway extends AbstractProvider /** * Initialize holidays for Norway. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -73,9 +75,9 @@ public function initialize(): void * * @link https://en.wikipedia.org/wiki/Norwegian_Constitution_Day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateConstitutionDay(): void diff --git a/src/Yasumi/Provider/Poland.php b/src/Yasumi/Provider/Poland.php index a6321a5e1..9062b240f 100755 --- a/src/Yasumi/Provider/Poland.php +++ b/src/Yasumi/Provider/Poland.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -32,9 +34,9 @@ class Poland extends AbstractProvider /** * Initialize holidays for Poland. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -71,9 +73,9 @@ public function initialize(): void * * @link https://en.wikipedia.org/wiki/May_3rd_Constitution_Day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ @@ -99,9 +101,9 @@ private function calculateIndependenceDay(): void * * @link https://en.wikipedia.org/wiki/National_Independence_Day_(Poland) * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ diff --git a/src/Yasumi/Provider/Portugal.php b/src/Yasumi/Provider/Portugal.php index 4248f4dd1..8708f09b5 100644 --- a/src/Yasumi/Provider/Portugal.php +++ b/src/Yasumi/Provider/Portugal.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -36,9 +38,9 @@ class Portugal extends AbstractProvider /** * Initialize holidays for Portugal. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -76,9 +78,9 @@ public function initialize(): void * * @link https://en.wikipedia.org/wiki/Carnation_Revolution * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateCarnationRevolutionDay(): void @@ -98,9 +100,9 @@ private function calculateCarnationRevolutionDay(): void * In Portugal, between 2013 andd 2015 (inclusive) this holiday did not happen due to government deliberation. * It was restored in 2016. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateCorpusChristi(): void @@ -123,9 +125,9 @@ private function calculateCorpusChristi(): void * * @link https://en.wikipedia.org/wiki/Portugal_Day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculatePortugalDay(): void @@ -157,9 +159,9 @@ private function calculatePortugalDay(): void * * @link https://en.wikipedia.org/wiki/5_October_1910_revolution * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculatePortugueseRepublicDay(): void @@ -178,9 +180,9 @@ private function calculatePortugueseRepublicDay(): void * In Portugal, between 2013 and 2015 (inclusive) this holiday did not happen due to government deliberation. * It was restored in 2016. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateAllSaintsDay(): void @@ -212,9 +214,9 @@ private function calculateAllSaintsDay(): void * @link https://pt.wikipedia.org/wiki/Restauração_da_Independência (portuguese link) * @link https://pt.wikipedia.org/wiki/Guerra_da_Restauração (english link) * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateRestorationOfIndependenceDay(): void diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index 975626eec..a2040cc4f 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -37,9 +39,9 @@ class Romania extends AbstractProvider /** * Initialize holidays for Romania. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -79,9 +81,9 @@ public function initialize(): void * * @link https://en.wikipedia.org/wiki/Public_holidays_in_Romania * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateDayAfterNewYearsDay(): void @@ -102,9 +104,9 @@ private function calculateDayAfterNewYearsDay(): void * * @link https://en.wikipedia.org/wiki/United_Principalities * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateUnitedPrincipalitiesDay(): void @@ -125,9 +127,9 @@ private function calculateUnitedPrincipalitiesDay(): void * * @link https://en.wikipedia.org/wiki/St._Andrew%27s_Day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateStAndrewDay(): void @@ -151,9 +153,9 @@ private function calculateStAndrewDay(): void * @link https://en.wikipedia.org/wiki/Great_Union_Day * @link https://ro.wikipedia.org/wiki/Ziua_na%C8%9Bional%C4%83_a_Rom%C3%A2niei * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateNationalDay(): void @@ -187,9 +189,9 @@ private function calculateNationalDay(): void * Constantin Brâncuși (February 19, 1876 – March 16, 1957) was a Romanian sculptor, painter and photographer. * * @link https://en.wikipedia.org/wiki/Constantin_Br%C3%A2ncu%C8%99i - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateConstantinBrancusiDay(): void @@ -215,9 +217,9 @@ private function calculateConstantinBrancusiDay(): void * according to the Law 220/2016 (18.11.2016) * * @link https://en.wikipedia.org/wiki/Children%27s_Day - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ @@ -248,7 +250,7 @@ private function calculateChildrensDay(): void * @param int $year * @param string $timezone * - * @return \DateTime + * @return DateTime * * @throws \Exception */ diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index 14e59b2db..6fef2ca43 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -15,6 +15,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -58,9 +60,9 @@ class Slovakia extends AbstractProvider /** * Initialize holidays for Slovakia. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -110,9 +112,9 @@ public function initialize(): void * * @see https://en.wikipedia.org/wiki/Public_holidays_in_Slovakia * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateSlovakIndependenceDay(): void @@ -123,7 +125,7 @@ private function calculateSlovakIndependenceDay(): void 'sk_SK' => 'Deň vzniku Slovenskej republiky', 'en_US' => 'Day of the Establishment of the Slovak Republic' ], - new DateTime($this->year . '-01-01', new \DateTimeZone($this->timezone)), + new DateTime($this->year . '-01-01', new DateTimeZone($this->timezone)), $this->locale )); } @@ -135,9 +137,9 @@ private function calculateSlovakIndependenceDay(): void * * Note: this holiday is common for Czech republic and Slovakia. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateSaintsCyrilAndMethodiusDay(): void @@ -160,9 +162,9 @@ private function calculateSaintsCyrilAndMethodiusDay(): void * * @see https://en.wikipedia.org/wiki/Slovak_National_Uprising * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateSlovakNationalUprisingDay(): void @@ -184,9 +186,9 @@ private function calculateSlovakNationalUprisingDay(): void * * @see https://en.wikipedia.org/wiki/Constitution_of_Slovakia * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateSlovakConstitutionDay(): void @@ -212,9 +214,9 @@ private function calculateSlovakConstitutionDay(): void * @see https://en.wikipedia.org/wiki/Our_Lady_of_Sorrows * @see https://sk.wikipedia.org/wiki/Sedembolestn%C3%A1_Panna_M%C3%A1ria * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateOurLadyOfSorrowsDay(): void @@ -230,9 +232,9 @@ private function calculateOurLadyOfSorrowsDay(): void * * Note: this national day is common for Czech republic and Slovakia. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateStruggleForFreedomAndDemocracyDay(): void diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index 430033f47..3bc524697 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -16,6 +16,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -38,9 +40,9 @@ class SouthAfrica extends AbstractProvider /** * Initialize holidays for South Africa. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -87,9 +89,9 @@ public function initialize(): void * * @link http://www.gov.za/about-sa/public-holidays#21march * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateHumanRightsDay(): void @@ -109,9 +111,9 @@ private function calculateHumanRightsDay(): void * * @link http://www.gov.za/sites/www.gov.za/files/Act36of1994.pdf * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateFamilyDay(): void @@ -132,9 +134,9 @@ private function calculateFamilyDay(): void * @link http://www.gov.za/sites/www.gov.za/files/Act36of1994.pdf * @link http://www.gov.za/freedom-day-2014 * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateFreedomDay(): void @@ -159,9 +161,9 @@ private function calculateFreedomDay(): void * @link http://www.gov.za/sites/www.gov.za/files/Act36of1994.pdf * @link http://www.gov.za/youth-day-2014 * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateYouthDay(): void @@ -182,9 +184,9 @@ private function calculateYouthDay(): void * * @link http://www.gov.za/speeches/president-jacob-zuma-declares-3-august-2016-public-holiday-24-jun-2016-0000 * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculate2016MunicipalElectionsDay(): void @@ -211,9 +213,9 @@ private function calculate2016MunicipalElectionsDay(): void * @link http://www.gov.za/about-sa/public-holidays#women * @link http://www.gov.za/womens-day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateNationalWomensDay(): void @@ -236,9 +238,9 @@ private function calculateNationalWomensDay(): void * @link http://www.gov.za/sites/www.gov.za/files/Act36of1994.pdf * @link http://www.gov.za/heritage-day-2014 * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateHeritageDay(): void @@ -263,9 +265,9 @@ private function calculateHeritageDay(): void * @link http://www.gov.za/sites/www.gov.za/files/Act36of1994.pdf * @link http://www.gov.za/day-reconciliation-2014 * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateDayOfReconciliation(): void @@ -289,9 +291,9 @@ private function calculateDayOfReconciliation(): void * * @link http://www.gov.za/sites/www.gov.za/files/Act36of1994.pdf * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateSubstituteDayOfGoodwill(): void @@ -314,9 +316,9 @@ private function calculateSubstituteDayOfGoodwill(): void * The Public Holidays Act (Act No 36 of 1994) determines whenever any public holiday falls on a Sunday, the Monday * following on it shall be a public holiday. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateSubstituteHolidays(): void diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 33de90b00..ca59b081c 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -16,6 +16,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -113,9 +115,9 @@ class SouthKorea extends AbstractProvider /** * Initialize holidays for South Korea. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index 995b35f89..21a52f0e6 100755 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -32,9 +34,9 @@ class Spain extends AbstractProvider /** * Initialize holidays for Spain. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -71,9 +73,9 @@ public function initialize(): void * * @link http://en.wikipedia.org/wiki/Fiesta_Nacional_de_España * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateNationalDay(): void @@ -97,9 +99,9 @@ private function calculateNationalDay(): void * * @link http://www.timeanddate.com/holidays/spain/constitution-day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateConstitutionDay(): void diff --git a/src/Yasumi/Provider/Spain/Andalusia.php b/src/Yasumi/Provider/Spain/Andalusia.php index 05dc8e7cf..06cc7be3d 100755 --- a/src/Yasumi/Provider/Spain/Andalusia.php +++ b/src/Yasumi/Provider/Spain/Andalusia.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -40,9 +42,9 @@ class Andalusia extends Spain /** * Initialize holidays for Andalusia (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -66,9 +68,9 @@ public function initialize(): void * * @link http://en.wikipedia.org/wiki/D%C3%ADa_de_Andaluc%C3%ADa * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateAndalusiaDay(): void diff --git a/src/Yasumi/Provider/Spain/Aragon.php b/src/Yasumi/Provider/Spain/Aragon.php index 0ba419e3b..4649c509e 100755 --- a/src/Yasumi/Provider/Spain/Aragon.php +++ b/src/Yasumi/Provider/Spain/Aragon.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Spain; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -39,9 +41,9 @@ class Aragon extends Spain /** * Initialize holidays for Aragon (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Spain/Asturias.php b/src/Yasumi/Provider/Spain/Asturias.php index 0ca453912..296b8736b 100755 --- a/src/Yasumi/Provider/Spain/Asturias.php +++ b/src/Yasumi/Provider/Spain/Asturias.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -41,9 +43,9 @@ class Asturias extends Spain /** * Initialize holidays for Asturias (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -68,9 +70,9 @@ public function initialize(): void * * @link http://www.timeanddate.com/holidays/spain/asturias-day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateAsturiasDay(): void diff --git a/src/Yasumi/Provider/Spain/BalearicIslands.php b/src/Yasumi/Provider/Spain/BalearicIslands.php index 8b3d6cc8b..75a4c2b07 100755 --- a/src/Yasumi/Provider/Spain/BalearicIslands.php +++ b/src/Yasumi/Provider/Spain/BalearicIslands.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -40,9 +42,9 @@ class BalearicIslands extends Spain /** * Initialize holidays for Balearic Islands (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -68,9 +70,9 @@ public function initialize(): void * * @link http://www.timeanddate.com/holidays/spain/the-balearic-islands-day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateBalearicIslandsDay(): void diff --git a/src/Yasumi/Provider/Spain/BasqueCountry.php b/src/Yasumi/Provider/Spain/BasqueCountry.php index cce2f5491..6d88d8ce9 100755 --- a/src/Yasumi/Provider/Spain/BasqueCountry.php +++ b/src/Yasumi/Provider/Spain/BasqueCountry.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -39,9 +41,9 @@ class BasqueCountry extends Spain /** * Initialize holidays for Basque Country (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -68,9 +70,9 @@ public function initialize(): void * * @link http://www.officeholidays.com/countries/spain/basque_community_day.php * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateBasqueCountryDay(): void diff --git a/src/Yasumi/Provider/Spain/CanaryIslands.php b/src/Yasumi/Provider/Spain/CanaryIslands.php index 1787a08c1..c976c2b36 100755 --- a/src/Yasumi/Provider/Spain/CanaryIslands.php +++ b/src/Yasumi/Provider/Spain/CanaryIslands.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -41,9 +43,9 @@ class CanaryIslands extends Spain /** * Initialize holidays for Canary Islands (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -67,9 +69,9 @@ public function initialize(): void * * @link http://www.timeanddate.com/holidays/spain/canaries-day-observed * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateCanaryIslandsDay(): void diff --git a/src/Yasumi/Provider/Spain/Cantabria.php b/src/Yasumi/Provider/Spain/Cantabria.php index c28104b2d..5d3def10f 100755 --- a/src/Yasumi/Provider/Spain/Cantabria.php +++ b/src/Yasumi/Provider/Spain/Cantabria.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -41,9 +43,9 @@ class Cantabria extends Spain /** * Initialize holidays for Cantabria (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -71,9 +73,9 @@ public function initialize(): void * * @link http://www.timeanddate.com/holidays/spain/cantabria-day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateCantabriaDay(): void diff --git a/src/Yasumi/Provider/Spain/CastileAndLeon.php b/src/Yasumi/Provider/Spain/CastileAndLeon.php index 028924726..9a77a57db 100755 --- a/src/Yasumi/Provider/Spain/CastileAndLeon.php +++ b/src/Yasumi/Provider/Spain/CastileAndLeon.php @@ -15,6 +15,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -42,9 +44,9 @@ class CastileAndLeon extends Spain /** * Initialize holidays for Castile and León (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -68,9 +70,9 @@ public function initialize(): void * * @link http://en.wikipedia.org/wiki/Castile_and_León_Day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateCastileAndLeonDay(): void diff --git a/src/Yasumi/Provider/Spain/CastillaLaMancha.php b/src/Yasumi/Provider/Spain/CastillaLaMancha.php index 7f97419ab..87300bba8 100755 --- a/src/Yasumi/Provider/Spain/CastillaLaMancha.php +++ b/src/Yasumi/Provider/Spain/CastillaLaMancha.php @@ -15,6 +15,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -42,9 +44,9 @@ class CastillaLaMancha extends Spain /** * Initialize holidays for Castilla-La Mancha (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -71,9 +73,9 @@ public function initialize(): void * * @link http://www.timeanddate.com/holidays/spain/castile-la-mancha-day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateCastillaLaManchaDay(): void diff --git a/src/Yasumi/Provider/Spain/Catalonia.php b/src/Yasumi/Provider/Spain/Catalonia.php index 69552d85c..f46287287 100755 --- a/src/Yasumi/Provider/Spain/Catalonia.php +++ b/src/Yasumi/Provider/Spain/Catalonia.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -43,9 +45,9 @@ class Catalonia extends Spain /** * Initialize holidays for Catalonia (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -71,9 +73,9 @@ public function initialize(): void * * @link https://en.wikipedia.org/wiki/National_Day_of_Catalonia * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateNationalDayOfCatalonia(): void diff --git a/src/Yasumi/Provider/Spain/Ceuta.php b/src/Yasumi/Provider/Spain/Ceuta.php index be615ceb9..cfc937b23 100755 --- a/src/Yasumi/Provider/Spain/Ceuta.php +++ b/src/Yasumi/Provider/Spain/Ceuta.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -40,9 +42,9 @@ class Ceuta extends Spain /** * Initialize holidays for Ceuta (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -65,9 +67,9 @@ public function initialize(): void * * @link http://www.timeanddate.com/holidays/spain/the-independent-city-ceuta-day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateDayOfCeuta(): void diff --git a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php index b10c6dc9b..d05c448db 100755 --- a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php +++ b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -42,9 +44,9 @@ class CommunityOfMadrid extends Spain /** * Initialize holidays for the Community Of Madrid (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -72,9 +74,9 @@ public function initialize(): void * * @link http://en.wikipedia.org/wiki/Dos_de_Mayo_Uprising * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateDosdeMayoUprisingDay(): void diff --git a/src/Yasumi/Provider/Spain/Extremadura.php b/src/Yasumi/Provider/Spain/Extremadura.php index 93beb95fe..1e6393112 100755 --- a/src/Yasumi/Provider/Spain/Extremadura.php +++ b/src/Yasumi/Provider/Spain/Extremadura.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -41,9 +43,9 @@ class Extremadura extends Spain /** * Initialize holidays for Extremadura (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -68,9 +70,9 @@ public function initialize(): void * * @link http://www.timeanddate.com/holidays/spain/extremadura-day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateDayOfExtremadura(): void diff --git a/src/Yasumi/Provider/Spain/Galicia.php b/src/Yasumi/Provider/Spain/Galicia.php index 5bb1254ff..7cf08fc00 100755 --- a/src/Yasumi/Provider/Spain/Galicia.php +++ b/src/Yasumi/Provider/Spain/Galicia.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -41,9 +43,9 @@ class Galicia extends Spain /** * Initialize holidays for Galicia (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -69,9 +71,9 @@ public function initialize(): void * * @link http://en.wikipedia.org/wiki/Galician_Literature_Day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateGalicianLiteratureDay(): void @@ -97,9 +99,9 @@ private function calculateGalicianLiteratureDay(): void * * @link http://www.timeanddate.com/holidays/spain/santiago-apostle * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateStJamesDay(): void diff --git a/src/Yasumi/Provider/Spain/LaRioja.php b/src/Yasumi/Provider/Spain/LaRioja.php index 6e84bdb56..291d06774 100755 --- a/src/Yasumi/Provider/Spain/LaRioja.php +++ b/src/Yasumi/Provider/Spain/LaRioja.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -40,9 +42,9 @@ class LaRioja extends Spain /** * Initialize holidays for La Rioja (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -65,9 +67,9 @@ public function initialize(): void * * @link http://www.timeanddate.com/holidays/spain/rioja-day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateLaRiojaDay(): void diff --git a/src/Yasumi/Provider/Spain/Melilla.php b/src/Yasumi/Provider/Spain/Melilla.php index 44fe9fc74..a3ed3f803 100755 --- a/src/Yasumi/Provider/Spain/Melilla.php +++ b/src/Yasumi/Provider/Spain/Melilla.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Spain; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -38,9 +40,9 @@ class Melilla extends Spain /** * Initialize holidays for Melilla (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Spain/Navarre.php b/src/Yasumi/Provider/Spain/Navarre.php index 3edfe3887..9c52019e5 100755 --- a/src/Yasumi/Provider/Spain/Navarre.php +++ b/src/Yasumi/Provider/Spain/Navarre.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Spain; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -38,9 +40,9 @@ class Navarre extends Spain /** * Initialize holidays for Navarre (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Spain/RegionOfMurcia.php b/src/Yasumi/Provider/Spain/RegionOfMurcia.php index 38b7f4c10..d76c87ddc 100755 --- a/src/Yasumi/Provider/Spain/RegionOfMurcia.php +++ b/src/Yasumi/Provider/Spain/RegionOfMurcia.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -40,9 +42,9 @@ class RegionOfMurcia extends Spain /** * Initialize holidays for the Region of Murcia (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -66,9 +68,9 @@ public function initialize(): void * * @link http://www.timeanddate.com/holidays/spain/murcia-day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateDayOfMurcia(): void diff --git a/src/Yasumi/Provider/Spain/ValencianCommunity.php b/src/Yasumi/Provider/Spain/ValencianCommunity.php index 35bacf0ed..ea5c12906 100755 --- a/src/Yasumi/Provider/Spain/ValencianCommunity.php +++ b/src/Yasumi/Provider/Spain/ValencianCommunity.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Spain; @@ -43,9 +45,9 @@ class ValencianCommunity extends Spain /** * Initialize holidays for the Valencian Community (Spain). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -73,9 +75,9 @@ public function initialize(): void * * @link http://www.timeanddate.com/holidays/spain/the-valencian-community-day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateValencianCommunityDay(): void diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index a60223a98..b0c85f414 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -33,9 +35,9 @@ class Sweden extends AbstractProvider /** * Initialize holidays for Sweden. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -78,8 +80,8 @@ public function initialize(): void * * @link https://en.wikipedia.org/wiki/Twelfth_Night_(holiday) * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -106,8 +108,8 @@ public function calculateEpiphanyEve(): void * * @link https://en.wikipedia.org/wiki/Walpurgis_Night * - * @throws \Yasumi\Exception\InvalidDateException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws InvalidDateException + * @throws UnknownLocaleException * @throws \InvalidArgumentException * @throws \Exception */ @@ -136,9 +138,9 @@ public function calculateWalpurgisEve(): void * * @link https://en.wikipedia.org/wiki/Midsummer#Sweden * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateStJohnsHolidays(): void @@ -177,9 +179,9 @@ private function calculateStJohnsHolidays(): void * @link https://en.wikipedia.org/wiki/All_Saints%27_Day * @link http://www.timeanddate.com/holidays/sweden/all-saints-day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateAllSaintsHolidays(): void @@ -211,9 +213,9 @@ private function calculateAllSaintsHolidays(): void * Olympic Stadium, in honour of the election of King Gustav Vasa in 1523, as this was considered the foundation of * modern Sweden. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateNationalDay(): void diff --git a/src/Yasumi/Provider/Switzerland.php b/src/Yasumi/Provider/Switzerland.php index cf15ce923..dc6ec6dc0 100644 --- a/src/Yasumi/Provider/Switzerland.php +++ b/src/Yasumi/Provider/Switzerland.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -33,9 +35,9 @@ class Switzerland extends AbstractProvider /** * Initialize holidays for Switzerland. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -54,9 +56,9 @@ public function initialize(): void * * @link https://en.wikipedia.org/wiki/Swiss_National_Day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ @@ -100,9 +102,9 @@ private function calculateNationalDay(): void * * @link https://en.wikipedia.org/wiki/Berchtoldstag * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function calculateBerchtoldsTag(): void @@ -132,9 +134,9 @@ public function calculateBerchtoldsTag(): void * * @link https://en.wikipedia.org/wiki/Federal_Day_of_Thanksgiving,_Repentance_and_Prayer * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function calculateBettagsMontag(): void diff --git a/src/Yasumi/Provider/Switzerland/Aargau.php b/src/Yasumi/Provider/Switzerland/Aargau.php index 7d47ff712..38ee4f388 100644 --- a/src/Yasumi/Provider/Switzerland/Aargau.php +++ b/src/Yasumi/Provider/Switzerland/Aargau.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class Aargau extends Switzerland /** * Initialize holidays for Aargau (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/AppenzellAusserrhoden.php b/src/Yasumi/Provider/Switzerland/AppenzellAusserrhoden.php index 65bf4a492..973490ad8 100644 --- a/src/Yasumi/Provider/Switzerland/AppenzellAusserrhoden.php +++ b/src/Yasumi/Provider/Switzerland/AppenzellAusserrhoden.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class AppenzellAusserrhoden extends Switzerland /** * Initialize holidays for Appenzell Ausserrhoden (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/AppenzellInnerrhoden.php b/src/Yasumi/Provider/Switzerland/AppenzellInnerrhoden.php index c466071b7..5b4159215 100644 --- a/src/Yasumi/Provider/Switzerland/AppenzellInnerrhoden.php +++ b/src/Yasumi/Provider/Switzerland/AppenzellInnerrhoden.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class AppenzellInnerrhoden extends Switzerland /** * Initialize holidays for Appenzell Innerrhoden (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/BaselLandschaft.php b/src/Yasumi/Provider/Switzerland/BaselLandschaft.php index 9757483eb..45877e304 100644 --- a/src/Yasumi/Provider/Switzerland/BaselLandschaft.php +++ b/src/Yasumi/Provider/Switzerland/BaselLandschaft.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class BaselLandschaft extends Switzerland /** * Initialize holidays for Basel-Landschaft (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/BaselStadt.php b/src/Yasumi/Provider/Switzerland/BaselStadt.php index 00bbb1970..6825ce6ec 100644 --- a/src/Yasumi/Provider/Switzerland/BaselStadt.php +++ b/src/Yasumi/Provider/Switzerland/BaselStadt.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class BaselStadt extends Switzerland /** * Initialize holidays for Basel-Stadt (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/Bern.php b/src/Yasumi/Provider/Switzerland/Bern.php index 65515f457..ad024d320 100644 --- a/src/Yasumi/Provider/Switzerland/Bern.php +++ b/src/Yasumi/Provider/Switzerland/Bern.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class Bern extends Switzerland /** * Initialize holidays for Bern (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/Fribourg.php b/src/Yasumi/Provider/Switzerland/Fribourg.php index bdf5f25fa..9ea56ce3b 100644 --- a/src/Yasumi/Provider/Switzerland/Fribourg.php +++ b/src/Yasumi/Provider/Switzerland/Fribourg.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class Fribourg extends Switzerland /** * Initialize holidays for Fribourg (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/Geneva.php b/src/Yasumi/Provider/Switzerland/Geneva.php index 649df8db7..b850971d8 100644 --- a/src/Yasumi/Provider/Switzerland/Geneva.php +++ b/src/Yasumi/Provider/Switzerland/Geneva.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -37,9 +39,9 @@ class Geneva extends Switzerland /** * Initialize holidays for Geneva (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -65,9 +67,9 @@ public function initialize(): void * * @link https://en.wikipedia.org/wiki/Je%C3%BBne_genevois * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateJeuneGenevois(): void @@ -100,9 +102,9 @@ private function calculateJeuneGenevois(): void * * @link https://fr.wikipedia.org/wiki/Restauration_genevoise * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateRestaurationGenevoise(): void diff --git a/src/Yasumi/Provider/Switzerland/Glarus.php b/src/Yasumi/Provider/Switzerland/Glarus.php index 34b88626f..1fc882569 100644 --- a/src/Yasumi/Provider/Switzerland/Glarus.php +++ b/src/Yasumi/Provider/Switzerland/Glarus.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -36,9 +38,9 @@ class Glarus extends Switzerland /** * Initialize holidays for Glarus (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -67,9 +69,9 @@ public function initialize(): void * * @link https://en.wikipedia.org/wiki/Battle_of_N%C3%A4fels * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateNafelserFahrt(): void diff --git a/src/Yasumi/Provider/Switzerland/Grisons.php b/src/Yasumi/Provider/Switzerland/Grisons.php index 80fcdc279..9f6b833a3 100644 --- a/src/Yasumi/Provider/Switzerland/Grisons.php +++ b/src/Yasumi/Provider/Switzerland/Grisons.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class Grisons extends Switzerland /** * Initialize holidays for Grisons (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/Jura.php b/src/Yasumi/Provider/Switzerland/Jura.php index bbc1df93c..bacf09d9a 100644 --- a/src/Yasumi/Provider/Switzerland/Jura.php +++ b/src/Yasumi/Provider/Switzerland/Jura.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -36,9 +38,9 @@ class Jura extends Switzerland /** * Initialize holidays for Jura (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -70,9 +72,9 @@ public function initialize(): void * * @link https://fr.wikipedia.org/wiki/Pl%C3%A9biscite_jurassien * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculatePlebisciteJurassien(): void diff --git a/src/Yasumi/Provider/Switzerland/Lucerne.php b/src/Yasumi/Provider/Switzerland/Lucerne.php index 89115995d..d48093f6c 100644 --- a/src/Yasumi/Provider/Switzerland/Lucerne.php +++ b/src/Yasumi/Provider/Switzerland/Lucerne.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class Lucerne extends Switzerland /** * Initialize holidays for Lucerne (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/Neuchatel.php b/src/Yasumi/Provider/Switzerland/Neuchatel.php index 4bfe307f4..ba94b24be 100644 --- a/src/Yasumi/Provider/Switzerland/Neuchatel.php +++ b/src/Yasumi/Provider/Switzerland/Neuchatel.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -36,9 +38,9 @@ class Neuchatel extends Switzerland /** * Initialize holidays for Neuchâtel (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -68,9 +70,9 @@ public function initialize(): void * * @link https://www.feiertagskalender.ch/feiertag.php?ft_id=11&geo=3056&hl=fr * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateInstaurationRepublique(): void diff --git a/src/Yasumi/Provider/Switzerland/Nidwalden.php b/src/Yasumi/Provider/Switzerland/Nidwalden.php index 98276f72e..f33d4bf01 100644 --- a/src/Yasumi/Provider/Switzerland/Nidwalden.php +++ b/src/Yasumi/Provider/Switzerland/Nidwalden.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class Nidwalden extends Switzerland /** * Initialize holidays for Nidwalden (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/Obwalden.php b/src/Yasumi/Provider/Switzerland/Obwalden.php index 796a0b85b..a76823687 100644 --- a/src/Yasumi/Provider/Switzerland/Obwalden.php +++ b/src/Yasumi/Provider/Switzerland/Obwalden.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -36,9 +38,9 @@ class Obwalden extends Switzerland /** * Initialize holidays for Obwalden (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -71,9 +73,9 @@ public function initialize(): void * * @link http://www.lebendigetraditionen.ch/traditionen/00210/index.html?lang=en * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ diff --git a/src/Yasumi/Provider/Switzerland/Schaffhausen.php b/src/Yasumi/Provider/Switzerland/Schaffhausen.php index b36b48f82..56485aa55 100644 --- a/src/Yasumi/Provider/Switzerland/Schaffhausen.php +++ b/src/Yasumi/Provider/Switzerland/Schaffhausen.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class Schaffhausen extends Switzerland /** * Initialize holidays for Schaffhausen (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/Schwyz.php b/src/Yasumi/Provider/Switzerland/Schwyz.php index 661f1b110..e3e0a36c7 100644 --- a/src/Yasumi/Provider/Switzerland/Schwyz.php +++ b/src/Yasumi/Provider/Switzerland/Schwyz.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class Schwyz extends Switzerland /** * Initialize holidays for Schwyz (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/Solothurn.php b/src/Yasumi/Provider/Switzerland/Solothurn.php index c0c19a318..978c1049e 100644 --- a/src/Yasumi/Provider/Switzerland/Solothurn.php +++ b/src/Yasumi/Provider/Switzerland/Solothurn.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class Solothurn extends Switzerland /** * Initialize holidays for Solothurn (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/StGallen.php b/src/Yasumi/Provider/Switzerland/StGallen.php index 9dc34c694..3f4599302 100644 --- a/src/Yasumi/Provider/Switzerland/StGallen.php +++ b/src/Yasumi/Provider/Switzerland/StGallen.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class StGallen extends Switzerland /** * Initialize holidays for St. Gallen (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/Thurgau.php b/src/Yasumi/Provider/Switzerland/Thurgau.php index fdc7effa3..47e466c30 100644 --- a/src/Yasumi/Provider/Switzerland/Thurgau.php +++ b/src/Yasumi/Provider/Switzerland/Thurgau.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class Thurgau extends Switzerland /** * Initialize holidays for Thurgau (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/Ticino.php b/src/Yasumi/Provider/Switzerland/Ticino.php index 5c4024988..9c53a1046 100644 --- a/src/Yasumi/Provider/Switzerland/Ticino.php +++ b/src/Yasumi/Provider/Switzerland/Ticino.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -36,9 +38,9 @@ class Ticino extends Switzerland /** * Initialize holidays for Ticino (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -77,9 +79,9 @@ public function initialize(): void * * @link https://en.wikipedia.org/wiki/Feast_of_Saints_Peter_and_Paul * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateStPeterPaul(): void diff --git a/src/Yasumi/Provider/Switzerland/Uri.php b/src/Yasumi/Provider/Switzerland/Uri.php index 191ac8cd5..58fecd013 100644 --- a/src/Yasumi/Provider/Switzerland/Uri.php +++ b/src/Yasumi/Provider/Switzerland/Uri.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class Uri extends Switzerland /** * Initialize holidays for Uri (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/Valais.php b/src/Yasumi/Provider/Switzerland/Valais.php index ca49019c7..0518f4668 100644 --- a/src/Yasumi/Provider/Switzerland/Valais.php +++ b/src/Yasumi/Provider/Switzerland/Valais.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class Valais extends Switzerland /** * Initialize holidays for Valais (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/Vaud.php b/src/Yasumi/Provider/Switzerland/Vaud.php index 8ebab708d..e2a90d3ab 100644 --- a/src/Yasumi/Provider/Switzerland/Vaud.php +++ b/src/Yasumi/Provider/Switzerland/Vaud.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class Vaud extends Switzerland /** * Initialize holidays for Vaud (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/Zug.php b/src/Yasumi/Provider/Switzerland/Zug.php index 0e5678d70..18abff86c 100644 --- a/src/Yasumi/Provider/Switzerland/Zug.php +++ b/src/Yasumi/Provider/Switzerland/Zug.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class Zug extends Switzerland /** * Initialize holidays for Zug (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/Switzerland/Zurich.php b/src/Yasumi/Provider/Switzerland/Zurich.php index d95d4b763..296b20dbe 100644 --- a/src/Yasumi/Provider/Switzerland/Zurich.php +++ b/src/Yasumi/Provider/Switzerland/Zurich.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider\Switzerland; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\ChristianHolidays; use Yasumi\Provider\Switzerland; @@ -34,9 +36,9 @@ class Zurich extends Switzerland /** * Initialize holidays for Zürich (Switzerland). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 7b0682a96..f04196928 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -33,9 +35,9 @@ class USA extends AbstractProvider /** * Initialize holidays for the USA. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -258,9 +260,9 @@ private function calculateWashingtonsBirthday(): void * When New Year's Day, Independence Day, or Christmas Day falls on a Saturday, the previous day is also a holiday. * When one of these holidays fall on a Sunday, the next day is also a holiday. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateSubstituteHolidays(): void diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 9f1d2684c..ab68655ab 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -12,6 +12,8 @@ namespace Yasumi\Provider; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -35,9 +37,9 @@ class Ukraine extends AbstractProvider /** * Initialize holidays for Ukraine. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -65,9 +67,9 @@ public function initialize(): void /** * Christmas Day. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateChristmasDay(): void @@ -85,9 +87,9 @@ private function calculateChristmasDay(): void * * @link https://en.wikipedia.org/wiki/International_Workers%27_Day#Ukraine * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateSecondInternationalWorkersDay(): void @@ -109,9 +111,9 @@ private function calculateSecondInternationalWorkersDay(): void * * @link https://en.wikipedia.org/wiki/Victory_Day_over_Nazism_in_World_War_II * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateVictoryDay(): void @@ -131,9 +133,9 @@ private function calculateVictoryDay(): void * * @link https://en.wikipedia.org/wiki/Constitution_Day_(Ukraine) * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateConstitutionDay(): void @@ -159,9 +161,9 @@ private function calculateConstitutionDay(): void * * @link https://en.wikipedia.org/wiki/Declaration_of_Independence_of_Ukraine * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateIndependenceDay(): void @@ -188,9 +190,9 @@ private function calculateIndependenceDay(): void * * @link https://en.wikipedia.org/wiki/Defender_of_Ukraine_Day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateDefenderOfUkraineDay(): void diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 1892ec8ea..0a4c7ea5a 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; /** @@ -34,9 +36,9 @@ class UnitedKingdom extends AbstractProvider /** * Initialize holidays for the United Kingdom. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -67,9 +69,9 @@ public function initialize(): void * @link https://en.wikipedia.org/wiki/Public_holidays_in_the_United_Kingdom * @link http://www.timeanddate.com/holidays/uk/new-year-day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateNewYearsDay(): void @@ -106,9 +108,9 @@ private function calculateNewYearsDay(): void * * @link http://www.timeanddate.com/holidays/uk/early-may-bank-holiday * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateMayDayBankHoliday(): void @@ -151,9 +153,9 @@ private function calculateMayDayBankHoliday(): void * @link http://www.timeanddate.com/holidays/uk/spring-bank-holiday * @link https://en.wikipedia.org/wiki/Public_holidays_in_the_United_Kingdom * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateSpringBankHoliday(): void @@ -197,9 +199,9 @@ private function calculateSpringBankHoliday(): void * @link https://www.timeanddate.com/holidays/uk/summer-bank-holiday * @link https://en.wikipedia.org/wiki/Public_holidays_in_the_United_Kingdom * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateSummerBankHoliday(): void @@ -261,9 +263,9 @@ private function calculateSummerBankHoliday(): void * @link http://www.timeanddate.com/holidays/uk/christmas-day * @link http://www.timeanddate.com/holidays/uk/boxing-day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ private function calculateChristmasHolidays(): void diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index 2ac7576f3..f2c2e0b07 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -47,8 +47,8 @@ public function __construct(array $availableLocales) * * @param string $directoryPath directory path for translation files * - * @throws \Yasumi\Exception\UnknownLocaleException - * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws InvalidArgumentException */ public function loadTranslations(string $directoryPath): void { @@ -109,7 +109,7 @@ protected function isValidLocale(string $locale): bool * @param string $locale locale * @param string $translation translation * - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException */ public function addTranslation(string $shortName, string $locale, string $translation): void { diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index d81fb0be0..71b328a84 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -18,6 +18,7 @@ use RecursiveIteratorIterator; use ReflectionClass; use RuntimeException; +use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\InvalidYearException; use Yasumi\Exception\ProviderNotFoundException; use Yasumi\Exception\UnknownLocaleException; @@ -70,11 +71,11 @@ class Yasumi * @return \DateTimeInterface * * @throws \ReflectionException - * @throws \Yasumi\Exception\UnknownLocaleException - * @throws \RuntimeException - * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws RuntimeException + * @throws InvalidArgumentException * @throws \Exception - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * * @TODO we should accept a timezone so we can accept int/string for $startDate * @@ -265,11 +266,11 @@ public static function getProviders(): array * @return \DateTimeInterface * * @throws \ReflectionException - * @throws \Yasumi\Exception\UnknownLocaleException - * @throws \RuntimeException - * @throws \InvalidArgumentException + * @throws UnknownLocaleException + * @throws RuntimeException + * @throws InvalidArgumentException * @throws \Exception - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * * @TODO we should accept a timezone so we can accept int/string for $startDate * From 439f8296a617b865ca4dc0b5ba737e4a06424ca0 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Sep 2019 10:18:31 +0900 Subject: [PATCH 084/133] Replaced null checks by appropriate instance / type checks. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 2 +- src/Yasumi/Provider/Denmark.php | 4 ++-- src/Yasumi/Provider/Japan.php | 17 +++++++++-------- src/Yasumi/Provider/Netherlands.php | 4 ++-- src/Yasumi/Provider/Romania.php | 2 +- src/Yasumi/Provider/USA.php | 2 +- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index dca4f1234..bd55347bf 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -150,7 +150,7 @@ private static function compareDates(\DateTimeInterface $dateA, \DateTimeInterfa */ public function addHoliday(Holiday $holiday) { - if ($this->globalTranslations !== null) { + if ($this->globalTranslations instanceof TranslationsInterface) { $holiday->mergeGlobalTranslations($this->globalTranslations); } diff --git a/src/Yasumi/Provider/Denmark.php b/src/Yasumi/Provider/Denmark.php index b92fa6e21..1c49bc53c 100644 --- a/src/Yasumi/Provider/Denmark.php +++ b/src/Yasumi/Provider/Denmark.php @@ -65,11 +65,11 @@ public function initialize(): void $this->calculateConstitutionDay(); $summerTime = $this->summerTime($this->year, $this->timezone, $this->locale); - if ($summerTime !== null) { + if ($summerTime instanceof Holiday) { $this->addHoliday($summerTime); } $winterTime = $this->winterTime($this->year, $this->timezone, $this->locale); - if ($winterTime !== null) { + if ($winterTime instanceof Holiday) { $this->addHoliday($winterTime); } } diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 99667f353..1f5de3999 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -15,6 +15,7 @@ use DateInterval; use DateTime; +use DateTimeInterface; use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; @@ -231,8 +232,8 @@ private function calculateEmperorsBirthday(): void } elseif ($this->year >= 1949 && $this->year <1988) { $emperorsBirthday = "$this->year-4-29"; } - - if ($emperorsBirthday) { + + if (\is_string($emperorsBirthday)) { $this->addHoliday(new Holiday( 'emperorsBirthday', ['en_US' => 'Emperors Birthday', 'ja_JP' => '天皇誕生日'], @@ -336,7 +337,7 @@ private function calculateComingOfAgeDay(): void $date = new DateTime("$this->year-1-15", new DateTimeZone($this->timezone)); } - if ($date instanceof DateTime) { + if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'comingOfAgeDay', ['en_US' => 'Coming of Age Day', 'ja_JP' => '成人の日'], @@ -366,7 +367,7 @@ private function calculateGreeneryDay(): void $date = new DateTime("$this->year-4-29", new DateTimeZone($this->timezone)); } - if ($date instanceof DateTime) { + if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'greeneryDay', ['en_US' => 'Greenery Day', 'ja_JP' => 'みどりの日'], @@ -400,7 +401,7 @@ private function calculateMarineDay(): void $date = new DateTime("$this->year-7-20", new DateTimeZone($this->timezone)); } - if ($date instanceof DateTime) { + if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'marineDay', ['en_US' => 'Marine Day', 'ja_JP' => '海の日'], @@ -429,7 +430,7 @@ private function calculateMountainDay(): void $date = new DateTime("$this->year-8-11", new DateTimeZone($this->timezone)); } - if ($date instanceof DateTime) { + if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'mountainDay', ['en_US' => 'Mountain Day', 'ja_JP' => '山の日'], @@ -460,7 +461,7 @@ private function calculateRespectForTheAgeDay(): void $date = new DateTime("$this->year-9-15", new DateTimeZone($this->timezone)); } - if ($date instanceof DateTime) { + if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'respectfortheAgedDay', ['en_US' => 'Respect for the Aged Day', 'ja_JP' => '敬老の日'], @@ -499,7 +500,7 @@ private function calculateSportsDay(): void $holiday_name =['en_US' => 'Sports Day', 'ja_JP' => 'スポーツの日']; } - if ($date instanceof DateTime) { + if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'sportsDay', $holiday_name, diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 329210ca6..e5a21d983 100755 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -251,7 +251,7 @@ private function calculateStNicholasDay(): void private function calculateSummerTime(): void { $summerTime = $this->summerTime($this->year, $this->timezone, $this->locale); - if ($summerTime !== null) { + if ($summerTime instanceof Holiday) { $this->addHoliday($summerTime); } } @@ -268,7 +268,7 @@ private function calculateSummerTime(): void private function calculateWinterTime(): void { $winterTime = $this->winterTime($this->year, $this->timezone, $this->locale); - if ($winterTime !== null) { + if ($winterTime instanceof Holiday) { $this->addHoliday($winterTime); } } diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index a2040cc4f..86b9abe9d 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -175,7 +175,7 @@ private function calculateNationalDay(): void $national_day = "$this->year-05-10"; } - if (null !== $national_day) { + if (\is_string($national_day)) { $this->addHoliday(new Holiday('nationalDay', [ 'en_US' => 'National Day', 'ro_RO' => 'Ziua Națională' diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index f04196928..87344a0d7 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -285,7 +285,7 @@ private function calculateSubstituteHolidays(): void } // Add substitute holiday - if (null !== $substituteHoliday) { + if ($substituteHoliday instanceof \DateTimeInterface) { $this->addHoliday(new Holiday('substituteHoliday:' . $substituteHoliday->shortName, [ 'en_US' => $substituteHoliday->getName() . ' observed', ], $substituteHoliday, $this->locale)); From 3bd023b62ca940b5d6f675cb307d11085314f104 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Sep 2019 10:42:44 +0900 Subject: [PATCH 085/133] Updated the Changelog with the latest changes. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ce1e86a3..caa51a6b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,15 +11,22 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Translation for the Pentecost holiday for the 'fr_FR' locale [\#145](https://github.com/azuyalabs/yasumi/pull/145) ([pioc92](https://github.com/pioc92)) - Late Summer Bank Holiday in United Kingdom prior to 1965 [\#161](https://github.com/azuyalabs/yasumi/pull/161) ([c960657](https://github.com/c960657)) - Observance holidays for Sweden [\#172](https://github.com/azuyalabs/yasumi/pull/172) ([c960657](https://github.com/c960657)) +- Added additional code style fixers and aligning StyleCI settings with PHP-CS. +- Included extra requirement for some PHP Extensions in the composer file. ### Changed -- Upgraded to PHPUnit 8. -- Replaced the standard 'InvalidArgumentException' when an invalid year or holiday provider are given by a new exception for each of these two situations separately ('InvalidYearException' and 'ProviderNotFoundException'). This allows you to better distinguish which exception may occur when instantiating the Yasumi class. [\#95](https://github.com/azuyalabs/yasumi/pull/95) ([qneyrat](https://github.com/qneyrat)) - Updated the translation for the All Saints holiday for the 'fr_FR' locale [\#152](https://github.com/azuyalabs/yasumi/pull/152) ([pioc92](https://github.com/pioc92)) - Updated the translation for the Armistice holiday for the 'fr_FR' locale [\#154](https://github.com/azuyalabs/yasumi/pull/154) ([pioc92](https://github.com/pioc92)) - Updated the translation for the Victory in Europe holiday for the 'fr_FR' locale [\#153](https://github.com/azuyalabs/yasumi/pull/153) ([pioc92](https://github.com/pioc92)) - Updated the translation for the Assumption of Mary holiday for the 'fr_FR' locale [\#155](https://github.com/azuyalabs/yasumi/pull/155) ([pioc92](https://github.com/pioc92)) - Updated the translation for Christmas Day for the 'nl_NL' locale [\#160](https://github.com/azuyalabs/yasumi/pull/160) ([pioc92](https://github.com/pioc92)) +- Replaced null checks by appropriate instance / type checks. +- Moved default method values to method body as parameters should be nullable. +- Applying the use of strict types. Strict typing allows for improved readability, maintainability, and less prone to bugs and security vulnerabilities. +- PHP 7.1 is allowed to fail for Travis-CI due to the fact PHPUnit 8 requires PHP >= 7.2. Likely 7.1 support will be dropped in Yasumi once 7.1 has reached its end of life (December 2019). +- Code using class imports rather than Fully Qualified Class names. +- Upgraded to PHPUnit 8. +- Replaced the standard 'InvalidArgumentException' when an invalid year or holiday provider are given by a new exception for each of these two situations separately ('InvalidYearException' and 'ProviderNotFoundException'). This allows you to better distinguish which exception may occur when instantiating the Yasumi class. [\#95](https://github.com/azuyalabs/yasumi/pull/95) ([qneyrat](https://github.com/qneyrat)) ### Fixed - Late Summer Bank Holiday in 1968 and 1969 in United Kingdom [\#161](https://github.com/azuyalabs/yasumi/pull/161) ([c960657](https://github.com/c960657)) @@ -29,10 +36,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Corpus Christi is official in Poland [\#168](https://github.com/azuyalabs/yasumi/pull/168) ([c960657](https://github.com/c960657)) - Liberation Day is official in the Netherlands [\#169](https://github.com/azuyalabs/yasumi/pull/169) ([c960657](https://github.com/c960657)) - Typos in Easter Monday and Republic Day for the 'it_IT' locale [\#171](https://github.com/azuyalabs/yasumi/pull/171) ([c960657](https://github.com/c960657)) +- Corrected the name of the Emperors Birthday function and variable. ### Removed - +- Unused constants. ## [2.1.0] - 2019-03-29 From c791119f89b69c0e69af3145bc5a600ade2f2ca5 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Sep 2019 10:52:17 +0900 Subject: [PATCH 086/133] Fixed to appropriate class. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/USA.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 87344a0d7..7203a61df 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -14,6 +14,7 @@ use DateInterval; use DateTime; +use DateTimeInterface; use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; @@ -285,7 +286,7 @@ private function calculateSubstituteHolidays(): void } // Add substitute holiday - if ($substituteHoliday instanceof \DateTimeInterface) { + if ($substituteHoliday instanceof Holiday) { $this->addHoliday(new Holiday('substituteHoliday:' . $substituteHoliday->shortName, [ 'en_US' => $substituteHoliday->getName() . ' observed', ], $substituteHoliday, $this->locale)); From 5c5d8577b0b495b8650971cc0332d95aab429851 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Sep 2019 11:17:16 +0900 Subject: [PATCH 087/133] Added necessary and optional PHP extensions. Signed-off-by: Sacha Telgenhof --- composer.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 6e0470c75..b3aec3538 100755 --- a/composer.json +++ b/composer.json @@ -20,10 +20,10 @@ } ], "require": { - "php": ">=7.1" + "php": ">=7.1", + "ext-json": "*" }, "require-dev": { - "ext-json": "*", "friendsofphp/php-cs-fixer": "^2.14", "fzaninotto/faker": "~1.8", "mikey179/vfsstream": "~1.6", @@ -46,5 +46,8 @@ }, "config": { "sort-packages": true + }, + "suggest": { + "ext-calendar": "For calculating the date of Easter" } } From f3c155d23977fedb9a03332c5f2d03892658a6c6 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Sep 2019 11:39:48 +0900 Subject: [PATCH 088/133] Argument can be dropped as it is the same as the default. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Sweden.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index b0c85f414..ee075f357 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -59,7 +59,7 @@ public function initialize(): void $this->addHoliday($this->pentecost($this->year, $this->timezone, $this->locale)); $this->calculateStJohnsHolidays(); // aka Midsummer $this->calculateAllSaintsHolidays(); - $this->addHoliday($this->christmasEve($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE)); + $this->addHoliday($this->christmasEve($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->secondChristmasDay($this->year, $this->timezone, $this->locale)); From 85bb3dcadefcfd73649a8e9bca1a44b7425b4b49 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Sep 2019 11:41:09 +0900 Subject: [PATCH 089/133] Reducing the number of return points in the method. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 8 ++++--- src/Yasumi/Translations.php | 27 +++++++++++------------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index bd55347bf..ac047e7e0 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -189,9 +189,11 @@ public function removeHoliday($shortName): void */ public function isWorkingDay(\DateTimeInterface $date): bool { + $isWorkingDay = true; + // First check if the given date is a holiday if ($this->isHoliday($date)) { - return false; + $isWorkingDay = false; } // Check if given date is a falls in the weekend or not @@ -201,10 +203,10 @@ public function isWorkingDay(\DateTimeInterface $date): bool $weekend_days = $weekend_data[$this::ID] ?? [0, 6]; if (\in_array((int)$date->format('w'), $weekend_days, true)) { - return false; + $isWorkingDay = false; } - return true; + return $isWorkingDay; } /** diff --git a/src/Yasumi/Translations.php b/src/Yasumi/Translations.php index f2c2e0b07..c2752bdef 100644 --- a/src/Yasumi/Translations.php +++ b/src/Yasumi/Translations.php @@ -52,12 +52,12 @@ public function __construct(array $availableLocales) */ public function loadTranslations(string $directoryPath): void { - if (! \file_exists($directoryPath)) { + if (!\file_exists($directoryPath)) { throw new InvalidArgumentException('Directory with translations not found'); } $directoryPath = \rtrim($directoryPath, '/\\') . DIRECTORY_SEPARATOR; - $extension = 'php'; + $extension = 'php'; foreach (new DirectoryIterator($directoryPath) as $file) { if ($file->isDot() || $file->isDir()) { @@ -68,7 +68,7 @@ public function loadTranslations(string $directoryPath): void continue; } - $filename = $file->getFilename(); + $filename = $file->getFilename(); $shortName = $file->getBasename('.' . $extension); $translations = require $directoryPath . $filename; @@ -88,14 +88,14 @@ public function loadTranslations(string $directoryPath): void * * @param string $locale locale the locale to be validated * + * @return true upon success, otherwise an UnknownLocaleException is thrown * @throws UnknownLocaleException An UnknownLocaleException is thrown if the given locale is not * valid/available. * - * @return true upon success, otherwise an UnknownLocaleException is thrown */ protected function isValidLocale(string $locale): bool { - if (! \in_array($locale, $this->availableLocales, true)) { + if (!\in_array($locale, $this->availableLocales, true)) { throw new UnknownLocaleException(\sprintf('Locale "%s" is not a valid locale.', $locale)); } @@ -105,8 +105,8 @@ protected function isValidLocale(string $locale): bool /** * Adds translation for holiday in specific locale. * - * @param string $shortName holiday short name - * @param string $locale locale + * @param string $shortName holiday short name + * @param string $locale locale * @param string $translation translation * * @throws UnknownLocaleException @@ -115,7 +115,7 @@ public function addTranslation(string $shortName, string $locale, string $transl { $this->isValidLocale($locale); // Validate the given locale - if (! \array_key_exists($shortName, $this->translations)) { + if (!\array_key_exists($shortName, $this->translations)) { $this->translations[$shortName] = []; } @@ -126,17 +126,14 @@ public function addTranslation(string $shortName, string $locale, string $transl * Returns translation for holiday in specific locale. * * @param string $shortName holiday short name - * @param string $locale locale + * @param string $locale locale * * @return string|null translated holiday name */ public function getTranslation(string $shortName, string $locale): ?string { - if (! \array_key_exists($shortName, $this->translations)) { - return null; - } - - if (! \array_key_exists($locale, $this->translations[$shortName])) { + if (!\array_key_exists($shortName, $this->translations) + || !\array_key_exists($locale, $this->translations[$shortName])) { return null; } @@ -152,7 +149,7 @@ public function getTranslation(string $shortName, string $locale): ?string */ public function getTranslations(string $shortName): array { - if (! \array_key_exists($shortName, $this->translations)) { + if (!\array_key_exists($shortName, $this->translations)) { return []; } From a9c5f19ebcab6ac60f87a79bd5ae8c5b4cf725cd Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Sep 2019 11:41:34 +0900 Subject: [PATCH 090/133] Clean up / reordering. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/USA.php | 1 - src/Yasumi/Provider/UnitedKingdom.php | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 7203a61df..6aa8e1d79 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -14,7 +14,6 @@ use DateInterval; use DateTime; -use DateTimeInterface; use DateTimeZone; use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 0a4c7ea5a..2a921d1da 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -121,7 +121,7 @@ private function calculateMayDayBankHoliday(): void } // Moved to 8 May to commemorate the 50th (1995) and 75th (2020) anniversary of VE Day. - if ($this->year == 1995 || $this->year == 2020) { + if (1995 === $this->year || 2020 === $this->year) { $this->addHoliday(new Holiday( 'mayDayBankHoliday', ['en_GB' => 'May Day Bank Holiday'], @@ -167,7 +167,7 @@ private function calculateSpringBankHoliday(): void // Moved to 4 June for the celebration of the Golden (2002) and Diamond (2012) Jubilee // of Elizabeth II. - if ($this->year == 2002 || $this->year == 2012) { + if (2002 === $this->year || 2012 === $this->year) { $this->addHoliday(new Holiday( 'springBankHoliday', ['en_GB' => 'Spring Bank Holiday'], @@ -225,7 +225,7 @@ private function calculateSummerBankHoliday(): void // Statutory bank holiday from 1971, following a trial period from 1965 to 1970. // During the trial period, the definition was different than today, causing exceptions // in 1968 and 1969. - if ($this->year == 1968 || $this->year == 1969) { + if (1968 === $this->year || 1969 === $this->year) { $this->addHoliday(new Holiday( 'summerBankHoliday', ['en_GB' => 'Summer Bank Holiday'], From 90cb597850247d588c21d67662d62c84387060ed Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Sep 2019 11:47:42 +0900 Subject: [PATCH 091/133] Removed last comma in lists (not needed). Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Belgium.php | 2 +- src/Yasumi/Provider/France.php | 2 +- src/Yasumi/Provider/Hungary.php | 6 +++--- src/Yasumi/Provider/Ireland.php | 8 ++++---- src/Yasumi/Provider/Japan.php | 4 ++-- src/Yasumi/Provider/Slovakia.php | 10 +++++----- src/Yasumi/Provider/SouthAfrica.php | 2 +- src/Yasumi/Provider/SouthKorea.php | 12 ++++++------ 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/Switzerland.php | 6 +++--- src/Yasumi/Provider/Switzerland/Geneva.php | 6 +++--- src/Yasumi/Provider/Switzerland/Glarus.php | 2 +- src/Yasumi/Provider/Switzerland/Jura.php | 2 +- src/Yasumi/Provider/Switzerland/Neuchatel.php | 2 +- src/Yasumi/Provider/Switzerland/Obwalden.php | 4 ++-- src/Yasumi/Provider/Switzerland/Ticino.php | 2 +- src/Yasumi/Provider/USA.php | 18 +++++++++--------- src/Yasumi/Yasumi.php | 2 +- src/Yasumi/data/locales.php | 2 +- src/Yasumi/data/translations/allSaintsDay.php | 2 +- src/Yasumi/data/translations/allSaintsEve.php | 2 +- src/Yasumi/data/translations/annunciation.php | 2 +- src/Yasumi/data/translations/anzacDay.php | 2 +- src/Yasumi/data/translations/armisticeDay.php | 2 +- src/Yasumi/data/translations/ascensionDay.php | 2 +- src/Yasumi/data/translations/ashWednesday.php | 2 +- .../data/translations/assumptionOfMary.php | 2 +- src/Yasumi/data/translations/australiaDay.php | 2 +- .../translations/carnationRevolutionDay.php | 2 +- src/Yasumi/data/translations/christmasDay.php | 2 +- src/Yasumi/data/translations/christmasEve.php | 2 +- src/Yasumi/data/translations/corpusChristi.php | 2 +- .../data/translations/dayAfterNewYearsDay.php | 2 +- .../data/translations/dayOfReformation.php | 2 +- src/Yasumi/data/translations/easter.php | 2 +- src/Yasumi/data/translations/easterMonday.php | 2 +- src/Yasumi/data/translations/epiphany.php | 2 +- src/Yasumi/data/translations/epiphanyEve.php | 2 +- src/Yasumi/data/translations/fathersDay.php | 2 +- src/Yasumi/data/translations/goodFriday.php | 2 +- .../data/translations/immaculateConception.php | 2 +- .../translations/internationalWomensDay.php | 2 +- .../translations/internationalWorkersDay.php | 2 +- src/Yasumi/data/translations/labourDay.php | 2 +- .../data/translations/maundyThursday.php | 2 +- src/Yasumi/data/translations/mothersDay.php | 2 +- src/Yasumi/data/translations/newYearsDay.php | 2 +- src/Yasumi/data/translations/newYearsEve.php | 2 +- src/Yasumi/data/translations/pentecost.php | 2 +- .../data/translations/pentecostMonday.php | 2 +- src/Yasumi/data/translations/portugalDay.php | 2 +- .../translations/portugueseRepublicDay.php | 2 +- .../data/translations/reformationDay.php | 2 +- .../translations/restorationOfIndepence.php | 2 +- .../data/translations/secondChristmasDay.php | 2 +- src/Yasumi/data/translations/stDavidsDay.php | 2 +- src/Yasumi/data/translations/stGeorgesDay.php | 2 +- src/Yasumi/data/translations/stJohnsDay.php | 2 +- src/Yasumi/data/translations/stJohnsEve.php | 2 +- src/Yasumi/data/translations/stJosephsDay.php | 2 +- src/Yasumi/data/translations/stMartinsDay.php | 2 +- src/Yasumi/data/translations/stStephensDay.php | 2 +- src/Yasumi/data/translations/summerTime.php | 2 +- src/Yasumi/data/translations/valentinesDay.php | 2 +- .../data/translations/victoryInEuropeDay.php | 2 +- src/Yasumi/data/translations/waitangiDay.php | 2 +- src/Yasumi/data/translations/walpurgisEve.php | 2 +- src/Yasumi/data/translations/winterTime.php | 2 +- .../data/translations/worldAnimalDay.php | 2 +- 72 files changed, 101 insertions(+), 101 deletions(-) diff --git a/src/Yasumi/Provider/Belgium.php b/src/Yasumi/Provider/Belgium.php index c2f0e27b1..e82d331ea 100755 --- a/src/Yasumi/Provider/Belgium.php +++ b/src/Yasumi/Provider/Belgium.php @@ -68,7 +68,7 @@ public function initialize(): void 'fr_BE' => 'Fête nationale', 'en_US' => 'Belgian National Day', 'nl_NL' => 'Nationale feestdag', - 'nl_BE' => 'Nationale feestdag', + 'nl_BE' => 'Nationale feestdag' ], new DateTime("$this->year-7-21", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php index 51dee0276..496b99cfb 100755 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -89,7 +89,7 @@ private function calculateBastilleDay(): void if ($this->year >= 1790) { $this->addHoliday(new Holiday('bastilleDay', [ 'en_US' => 'Bastille Day', - 'fr_FR' => 'La Fête nationale', + 'fr_FR' => 'La Fête nationale' ], new DateTime("$this->year-7-14", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Hungary.php b/src/Yasumi/Provider/Hungary.php index 673351d95..511ce72cb 100644 --- a/src/Yasumi/Provider/Hungary.php +++ b/src/Yasumi/Provider/Hungary.php @@ -67,7 +67,7 @@ public function initialize(): void if ($this->year >= 1927) { $this->addHoliday(new Holiday('memorialDay1848', [ 'en_US' => 'Memorial day of the 1848 Revolution', - 'hu_HU' => 'Az 1848-as forradalom ünnepe', + 'hu_HU' => 'Az 1848-as forradalom ünnepe' ], new DateTime("$this->year-3-15", new DateTimeZone($this->timezone)), $this->locale)); } @@ -77,7 +77,7 @@ public function initialize(): void if ($this->year >= 1891) { $this->addHoliday(new Holiday('stateFoundation', [ 'en_US' => 'State Foundation Day', - 'hu_HU' => 'Az államalapítás ünnepe', + 'hu_HU' => 'Az államalapítás ünnepe' ], new DateTime("$this->year-8-20", new DateTimeZone($this->timezone)), $this->locale)); } @@ -87,7 +87,7 @@ public function initialize(): void if ($this->year >= 1991) { $this->addHoliday(new Holiday('memorialDay1956', [ 'en_US' => 'Memorial day of the 1956 Revolution', - 'hu_HU' => 'Az 1956-os forradalom ünnepe', + 'hu_HU' => 'Az 1956-os forradalom ünnepe' ], new DateTime("$this->year-10-23", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index 42b1887fc..8b2d2183f 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -108,7 +108,7 @@ private function calculateNewYearsDay(): void $substituteHoliday->modify('next monday'); $this->addHoliday(new Holiday('substituteHoliday:' . $substituteHoliday->shortName, [ - 'en_IE' => $substituteHoliday->getName() . ' observed', + 'en_IE' => $substituteHoliday->getName() . ' observed' ], $substituteHoliday, $this->locale)); } } @@ -166,7 +166,7 @@ private function calculateChristmasDay(): void $substituteHoliday->modify('next tuesday'); $this->addHoliday(new Holiday('substituteHoliday:' . $substituteHoliday->shortName, [ - 'en_IE' => $substituteHoliday->getName() . ' observed', + 'en_IE' => $substituteHoliday->getName() . ' observed' ], $substituteHoliday, $this->locale)); } } @@ -203,7 +203,7 @@ private function calculateStStephensDay(): void $substituteHoliday->modify('next monday'); $this->addHoliday(new Holiday('substituteHoliday:' . $substituteHoliday->shortName, [ - 'en_IE' => $substituteHoliday->getName() . ' observed', + 'en_IE' => $substituteHoliday->getName() . ' observed' ], $substituteHoliday, $this->locale)); } } @@ -245,7 +245,7 @@ private function calculateStPatricksDay(): void $substituteHoliday->modify('next monday'); $this->addHoliday(new Holiday('substituteHoliday:' . $substituteHoliday->shortName, [ - 'en_IE' => $substituteHoliday->getName() . ' observed', + 'en_IE' => $substituteHoliday->getName() . ' observed' ], $substituteHoliday, $this->locale)); } } diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 1f5de3999..9f4fc93b1 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -587,7 +587,7 @@ private function calculateSubstituteHolidays(): void // Add a new holiday that is substituting the original holiday $substituteHoliday = new Holiday('substituteHoliday:' . $shortName, [ 'en_US' => $date->translations['en_US'] . ' Observed', - 'ja_JP' => '振替休日 (' . $date->translations['ja_JP'] . ')', + 'ja_JP' => '振替休日 (' . $date->translations['ja_JP'] . ')' ], $substituteDay, $this->locale); $this->addHoliday($substituteHoliday); @@ -628,7 +628,7 @@ private function calculateBridgeHolidays(): void $this->addHoliday(new Holiday('bridgeDay'.$counter, [ 'en_US' => 'Bridge Public holiday', - 'ja_JP' => '国民の休日', + 'ja_JP' => '国民の休日' ], $bridgeDate, $this->locale)); $counter++; } diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index 6fef2ca43..8b5e375c8 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -149,7 +149,7 @@ private function calculateSaintsCyrilAndMethodiusDay(): void [ 'sk_SK' => 'Sviatok svätého Cyrila a Metoda', 'cs_CZ' => 'Den slovanských věrozvěstů Cyrila a Metoděje', - 'en_US' => 'Saints Cyril and Methodius Day', + 'en_US' => 'Saints Cyril and Methodius Day' ], new DateTime($this->year . '-07-05', new DateTimeZone($this->timezone)), $this->locale, @@ -173,7 +173,7 @@ private function calculateSlovakNationalUprisingDay(): void 'slovakNationalUprisingDay', [ 'sk_SK' => 'Výročie Slovenského národného povstania', - 'en_US' => 'Slovak National Uprising Day', + 'en_US' => 'Slovak National Uprising Day' ], new DateTime($this->year . '-08-29', new DateTimeZone($this->timezone)), $this->locale, @@ -197,7 +197,7 @@ private function calculateSlovakConstitutionDay(): void 'slovakConstitutionDay', [ 'sk_SK' => 'Deň Ústavy Slovenskej republiky', - 'en_US' => 'Day of the Constitution of the Slovak Republic', + 'en_US' => 'Day of the Constitution of the Slovak Republic' ], new DateTime($this->year . '-09-01', new DateTimeZone($this->timezone)), $this->locale, @@ -223,7 +223,7 @@ private function calculateOurLadyOfSorrowsDay(): void { $this->addHoliday(new Holiday('ourLadyOfSorrowsDay', [ 'sk_SK' => 'Sviatok Sedembolestnej Panny Márie', - 'en_US' => 'Our Lady of Sorrows Day', + 'en_US' => 'Our Lady of Sorrows Day' ], new DateTime($this->year . '-09-15', new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK)); } @@ -244,7 +244,7 @@ private function calculateStruggleForFreedomAndDemocracyDay(): void [ 'sk_SK' => 'Deň boja za slobodu a demokraciu', 'cs_CZ' => 'Den boje za svobodu a demokracii', - 'en_US' => 'Struggle for Freedom and Democracy Day', + 'en_US' => 'Struggle for Freedom and Democracy Day' ], new DateTime($this->year . '-11-17', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index 3bc524697..b907f7da6 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -343,7 +343,7 @@ private function calculateSubstituteHolidays(): void $substituteHoliday->add(new DateInterval('P1D')); $this->addHoliday(new Holiday('substituteHoliday:' . $substituteHoliday->shortName, [ - 'en_ZA' => $substituteHoliday->getName() . ' observed', + 'en_ZA' => $substituteHoliday->getName() . ' observed' ], $substituteHoliday, $this->locale)); } diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index ca59b081c..412f03701 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -67,7 +67,7 @@ class SouthKorea extends AbstractProvider 2035 => '2035-2-8', 2036 => '2036-1-28', 2037 => '2037-2-15', 2038 => '2038-2-4', 2039 => '2037-1-24', 2040 => '2040-2-12', 2041 => '2041-2-1', 2042 => '2042-1-22', 2043 => '2043-2-10', 2044 => '2044-1-30', 2045 => '2045-2-17', 2046 => '2046-2-6', 2047 => '2047-1-26', 2048 => '2048-2-14', 2049 => '2049-2-2', - 2050 => '2050-1-23', + 2050 => '2050-1-23' ], 'buddhasBirthday' => [ 1975 => '1975-5-18', 1976 => '1976-5-6', 1977 => '1977-5-25', 1978 => '1978-5-14', 1979 => '1979-5-3', @@ -85,7 +85,7 @@ class SouthKorea extends AbstractProvider 2035 => '2035-5-15', 2036 => '2036-5-3', 2037 => '2037-5-22', 2038 => '2038-5-11', 2039 => '2039-4-30', 2040 => '2040-5-18', 2041 => '2041-5-7', 2042 => '2042-5-26', 2043 => '2043-5-16', 2044 => '2044-5-5', 2045 => '2045-5-24', 2046 => '2046-5-13', 2047 => '2047-5-2', 2048 => '2048-5-20', 2049 => '2049-5-9', - 2050 => '2050-5-28', + 2050 => '2050-5-28' ], 'chuseok' => [ 1949 => '1949-10-6', 1950 => '1950-9-26', 1951 => '1951-9-15', 1952 => '1952-10-3', 1953 => '1953-9-22', @@ -108,8 +108,8 @@ class SouthKorea extends AbstractProvider 2034 => '2034-9-27', 2035 => '2035-9-16', 2036 => '2036-10-4', 2037 => '2037-9-24', 2038 => '2038-9-13', 2039 => '2039-10-2', 2040 => '2040-9-21', 2041 => '2041-9-10', 2042 => '2042-9-28', 2043 => '2043-9-17', 2044 => '2044-10-5', 2045 => '2045-9-25', 2046 => '2046-9-15', 2047 => '2047-10-4', 2048 => '2048-9-22', - 2049 => '2049-9-11', 2050 => '2050-9-30', - ], + 2049 => '2049-9-11', 2050 => '2050-9-30' + ] ]; /** @@ -474,7 +474,7 @@ public function calculateSubstituteHolidays(): void $acceptedHolidays = [ 'dayBeforeSeollal', 'seollal', 'dayAfterSeollal', 'dayBeforeChuseok', 'chuseok', 'dayAfterChuseok', - 'childrensDay', + 'childrensDay' ]; // Loop through all holidays @@ -505,7 +505,7 @@ public function calculateSubstituteHolidays(): void // Add a new holiday that is substituting the original holiday $holiday = new Holiday("substituteHoliday:$substitute->shortName", [ 'en_US' => $substitute->translations['en_US'] . ' Observed', - 'ko_KR' => '대체공휴일', + 'ko_KR' => '대체공휴일' ], $substitute, $this->locale); // Add a new holiday that is substituting the original holiday diff --git a/src/Yasumi/Provider/Spain/Galicia.php b/src/Yasumi/Provider/Spain/Galicia.php index 7cf08fc00..76f32c7df 100755 --- a/src/Yasumi/Provider/Spain/Galicia.php +++ b/src/Yasumi/Provider/Spain/Galicia.php @@ -81,7 +81,7 @@ private function calculateGalicianLiteratureDay(): void if ($this->year >= 1991) { $this->addHoliday(new Holiday('galicianLiteratureDay', [ 'es_ES' => 'Día de las Letras Gallegas', - 'gl_ES' => 'Día das Letras Galegas', + 'gl_ES' => 'Día das Letras Galegas' ], new DateTime("$this->year-5-17", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -108,7 +108,7 @@ private function calculateStJamesDay(): void { if ($this->year >= 2000) { $this->addHoliday(new Holiday('stJamesDay', [ - 'es_ES' => 'Santiago Apostol', + 'es_ES' => 'Santiago Apostol' ], new DateTime("$this->year-7-25", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Spain/LaRioja.php b/src/Yasumi/Provider/Spain/LaRioja.php index 291d06774..a03d516b9 100755 --- a/src/Yasumi/Provider/Spain/LaRioja.php +++ b/src/Yasumi/Provider/Spain/LaRioja.php @@ -76,7 +76,7 @@ private function calculateLaRiojaDay(): void { if ($this->year >= 1983) { $this->addHoliday(new Holiday('laRiojaDay', [ - 'es_ES' => 'Día de La Rioja', + 'es_ES' => 'Día de La Rioja' ], new DateTime("$this->year-6-9", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Spain/RegionOfMurcia.php b/src/Yasumi/Provider/Spain/RegionOfMurcia.php index d76c87ddc..c9ee8aae5 100755 --- a/src/Yasumi/Provider/Spain/RegionOfMurcia.php +++ b/src/Yasumi/Provider/Spain/RegionOfMurcia.php @@ -77,7 +77,7 @@ private function calculateDayOfMurcia(): void { if ($this->year >= 1983) { $this->addHoliday(new Holiday('murciaDay', [ - 'es_ES' => 'Día de la Región de Murcia', + 'es_ES' => 'Día de la Región de Murcia' ], new DateTime("$this->year-6-9", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Spain/ValencianCommunity.php b/src/Yasumi/Provider/Spain/ValencianCommunity.php index ea5c12906..cf3dbb8b9 100755 --- a/src/Yasumi/Provider/Spain/ValencianCommunity.php +++ b/src/Yasumi/Provider/Spain/ValencianCommunity.php @@ -84,7 +84,7 @@ private function calculateValencianCommunityDay(): void { if ($this->year >= 1239) { $this->addHoliday(new Holiday('valencianCommunityDay', [ - 'es_ES' => 'Día de la Comunidad Valenciana', + 'es_ES' => 'Día de la Comunidad Valenciana' ], new DateTime("$this->year-10-9", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Switzerland.php b/src/Yasumi/Provider/Switzerland.php index dc6ec6dc0..a5227aa42 100644 --- a/src/Yasumi/Provider/Switzerland.php +++ b/src/Yasumi/Provider/Switzerland.php @@ -72,7 +72,7 @@ private function calculateNationalDay(): void 'de_CH' => 'Bundesfeiertag', 'it_IT' => 'Giorno festivo federale', 'it_CH' => 'Giorno festivo federale', - 'rm_CH' => 'Fiasta naziunala', + 'rm_CH' => 'Fiasta naziunala' ]; if ($this->year >= 1994) { $this->addHoliday(new Holiday( @@ -116,7 +116,7 @@ public function calculateBerchtoldsTag(): void 'de_CH' => 'Berchtoldstag', 'fr_FR' => 'Jour de la Saint-Berthold', 'fr_CH' => 'Jour de la Saint-Berthold', - 'en_US' => 'Berchtoldstag', + 'en_US' => 'Berchtoldstag' ], new DateTime($this->year . '-01-02', new DateTimeZone($this->timezone)), $this->locale, @@ -153,7 +153,7 @@ public function calculateBettagsMontag(): void 'de_DE' => 'Eidgenössischer Dank-, Buss- und Bettag', 'de_CH' => 'Eidgenössischer Dank-, Buss- und Bettag', 'it_IT' => 'Festa federale di ringraziamento, pentimento e preghiera', - 'it_CH' => 'Festa federale di ringraziamento, pentimento e preghiera', + 'it_CH' => 'Festa federale di ringraziamento, pentimento e preghiera' ], $date, $this->locale, Holiday::TYPE_OTHER)); } } diff --git a/src/Yasumi/Provider/Switzerland/Geneva.php b/src/Yasumi/Provider/Switzerland/Geneva.php index b850971d8..3724bd1d4 100644 --- a/src/Yasumi/Provider/Switzerland/Geneva.php +++ b/src/Yasumi/Provider/Switzerland/Geneva.php @@ -82,12 +82,12 @@ private function calculateJeuneGenevois(): void if (($this->year >= 1840 && $this->year <= 1869) || $this->year >= 1966) { $this->addHoliday(new Holiday('jeuneGenevois', [ 'fr_FR' => 'Jeûne genevois', - 'fr_CH' => 'Jeûne genevois', + 'fr_CH' => 'Jeûne genevois' ], $date, $this->locale, Holiday::TYPE_OTHER)); } elseif ($this->year > 1869 && $this->year < 1966) { $this->addHoliday(new Holiday('jeuneGenevois', [ 'fr_FR' => 'Jeûne genevois', - 'fr_CH' => 'Jeûne genevois', + 'fr_CH' => 'Jeûne genevois' ], $date, $this->locale, Holiday::TYPE_OBSERVANCE)); } } @@ -114,7 +114,7 @@ private function calculateRestaurationGenevoise(): void 'restaurationGenevoise', [ 'fr_FR' => 'Restauration de la République', - 'fr_CH' => 'Restauration de la République', + 'fr_CH' => 'Restauration de la République' ], new DateTime($this->year . '-12-31', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/Switzerland/Glarus.php b/src/Yasumi/Provider/Switzerland/Glarus.php index 1fc882569..0cf2af917 100644 --- a/src/Yasumi/Provider/Switzerland/Glarus.php +++ b/src/Yasumi/Provider/Switzerland/Glarus.php @@ -80,7 +80,7 @@ private function calculateNafelserFahrt(): void $date = new DateTime('First Thursday of ' . $this->year . '-04', new DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('nafelserFahrt', [ 'de_DE' => 'Näfelser Fahrt', - 'de_CH' => 'Näfelser Fahrt', + 'de_CH' => 'Näfelser Fahrt' ], $date, $this->locale, Holiday::TYPE_OTHER)); } } diff --git a/src/Yasumi/Provider/Switzerland/Jura.php b/src/Yasumi/Provider/Switzerland/Jura.php index bacf09d9a..f973b2f1a 100644 --- a/src/Yasumi/Provider/Switzerland/Jura.php +++ b/src/Yasumi/Provider/Switzerland/Jura.php @@ -84,7 +84,7 @@ private function calculatePlebisciteJurassien(): void 'plebisciteJurassien', [ 'fr_FR' => 'Commémoration du plébiscite jurassien', - 'fr_CH' => 'Commémoration du plébiscite jurassien', + 'fr_CH' => 'Commémoration du plébiscite jurassien' ], new DateTime($this->year . '-06-23', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/Switzerland/Neuchatel.php b/src/Yasumi/Provider/Switzerland/Neuchatel.php index ba94b24be..0378be25a 100644 --- a/src/Yasumi/Provider/Switzerland/Neuchatel.php +++ b/src/Yasumi/Provider/Switzerland/Neuchatel.php @@ -82,7 +82,7 @@ private function calculateInstaurationRepublique(): void 'instaurationRepublique', [ 'fr_FR' => 'Instauration de la République', - 'fr_CH' => 'Instauration de la République', + 'fr_CH' => 'Instauration de la République' ], new DateTime($this->year . '-03-01', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/Switzerland/Obwalden.php b/src/Yasumi/Provider/Switzerland/Obwalden.php index a76823687..01c878415 100644 --- a/src/Yasumi/Provider/Switzerland/Obwalden.php +++ b/src/Yasumi/Provider/Switzerland/Obwalden.php @@ -86,7 +86,7 @@ private function calculateBruderKlausenFest(): void 'bruderKlausenFest', [ 'de_DE' => 'Bruder-Klausen-Fest', - 'de_CH' => 'Bruder-Klausen-Fest', + 'de_CH' => 'Bruder-Klausen-Fest' ], new DateTime($this->year . '-09-25', new DateTimeZone($this->timezone)), $this->locale, @@ -97,7 +97,7 @@ private function calculateBruderKlausenFest(): void 'bruderKlausenFest', [ 'de_DE' => 'Bruder-Klausen-Fest', - 'de_CH' => 'Bruder-Klausen-Fest', + 'de_CH' => 'Bruder-Klausen-Fest' ], new DateTime($this->year . '-09-21', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/Switzerland/Ticino.php b/src/Yasumi/Provider/Switzerland/Ticino.php index 9c53a1046..ccbe44c77 100644 --- a/src/Yasumi/Provider/Switzerland/Ticino.php +++ b/src/Yasumi/Provider/Switzerland/Ticino.php @@ -95,7 +95,7 @@ private function calculateStPeterPaul(): void 'fr_FR' => 'Solennité des saints Pierre et Paul', 'fr_CH' => 'Solennité des saints Pierre et Paul', 'de_DE' => 'St. Peter und Paul', - 'de_CH' => 'St. Peter und Paul', + 'de_CH' => 'St. Peter und Paul' ], new DateTime($this->year . '-06-29', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 6aa8e1d79..98b77f76f 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -77,7 +77,7 @@ private function calculateMartinLutherKingday(): void { if ($this->year >= 1986) { $this->addHoliday(new Holiday('martinLutherKingDay', [ - 'en_US' => 'Dr. Martin Luther King Jr\'s Birthday', + 'en_US' => 'Dr. Martin Luther King Jr\'s Birthday' ], new DateTime("third monday of january $this->year", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -102,7 +102,7 @@ private function calculateMemorialDay(): void $date = new DateTime("last monday of may $this->year", new DateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('memorialDay', [ - 'en_US' => 'Memorial Day', + 'en_US' => 'Memorial Day' ], $date, $this->locale)); } } @@ -123,7 +123,7 @@ private function calculateIndependenceDay(): void { if ($this->year >= 1776) { $this->addHoliday(new Holiday('independenceDay', [ - 'en_US' => 'Independence Day', + 'en_US' => 'Independence Day' ], new DateTime("$this->year-7-4", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -144,7 +144,7 @@ private function calculateLabourDay(): void $this->addHoliday(new Holiday( 'labourDay', [ - 'en_US' => 'Labour Day', + 'en_US' => 'Labour Day' ], new DateTime("first monday of september $this->year", new DateTimeZone($this->timezone)), $this->locale @@ -173,7 +173,7 @@ private function calculateColumbusDay(): void $date = new DateTime("second monday of october $this->year", new DateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('columbusDay', [ - 'en_US' => 'Columbus Day', + 'en_US' => 'Columbus Day' ], $date, $this->locale)); } } @@ -195,7 +195,7 @@ private function calculateVeteransDay(): void $name = ($this->year < 1954) ? 'Armistice Day' : 'Veterans Day'; $this->addHoliday(new Holiday('veteransDay', [ - 'en_US' => $name, + 'en_US' => $name ], new DateTime("$this->year-11-11", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -218,7 +218,7 @@ private function calculateThanksgivingDay(): void $this->addHoliday(new Holiday( 'thanksgivingDay', [ - 'en_US' => 'Thanksgiving Day', + 'en_US' => 'Thanksgiving Day' ], new DateTime("fourth thursday of november $this->year", new DateTimeZone($this->timezone)), $this->locale @@ -249,7 +249,7 @@ private function calculateWashingtonsBirthday(): void $date = new DateTime("third monday of february $this->year", new DateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('washingtonsBirthday', [ - 'en_US' => 'Washington\'s Birthday', + 'en_US' => 'Washington\'s Birthday' ], $date, $this->locale)); } } @@ -287,7 +287,7 @@ private function calculateSubstituteHolidays(): void // Add substitute holiday if ($substituteHoliday instanceof Holiday) { $this->addHoliday(new Holiday('substituteHoliday:' . $substituteHoliday->shortName, [ - 'en_US' => $substituteHoliday->getName() . ' observed', + 'en_US' => $substituteHoliday->getName() . ' observed' ], $substituteHoliday, $this->locale)); } diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 71b328a84..d2255a1c7 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -54,7 +54,7 @@ class Yasumi private static $ignoredProvider = [ 'AbstractProvider.php', 'CommonHolidays.php', - 'ChristianHolidays.php', + 'ChristianHolidays.php' ]; /** diff --git a/src/Yasumi/data/locales.php b/src/Yasumi/data/locales.php index 9b8a65476..f965b114f 100644 --- a/src/Yasumi/data/locales.php +++ b/src/Yasumi/data/locales.php @@ -554,5 +554,5 @@ 'zh_Hant_HK', 'zh_Hant_MO', 'zh_Hant_TW', - 'zu_ZA', + 'zu_ZA' ]; diff --git a/src/Yasumi/data/translations/allSaintsDay.php b/src/Yasumi/data/translations/allSaintsDay.php index bd3314d1c..ec3b6ec14 100755 --- a/src/Yasumi/data/translations/allSaintsDay.php +++ b/src/Yasumi/data/translations/allSaintsDay.php @@ -33,5 +33,5 @@ 'pt_PT' => 'Dia de todos os Santos', 'ro_RO' => 'Ziua tuturor sfinților', 'sk_SK' => 'Sviatok Všetkých svätých', - 'sv_SE' => 'alla helgons dag', + 'sv_SE' => 'alla helgons dag' ]; diff --git a/src/Yasumi/data/translations/allSaintsEve.php b/src/Yasumi/data/translations/allSaintsEve.php index 20a902d7b..40cb2da92 100755 --- a/src/Yasumi/data/translations/allSaintsEve.php +++ b/src/Yasumi/data/translations/allSaintsEve.php @@ -14,5 +14,5 @@ return [ 'da_DK' => 'Allehelgensaften', 'en_US' => 'All Saints\' Eve', - 'sv_SE' => 'alla helgons afton', + 'sv_SE' => 'alla helgons afton' ]; diff --git a/src/Yasumi/data/translations/annunciation.php b/src/Yasumi/data/translations/annunciation.php index eb2bb79b3..09011c497 100644 --- a/src/Yasumi/data/translations/annunciation.php +++ b/src/Yasumi/data/translations/annunciation.php @@ -15,5 +15,5 @@ 'el_GR' => 'Ευαγγελισμός της Θεοτόκου', 'en_US' => 'Annunciation', 'fr_BE' => 'Annonciation', - 'fr_FR' => 'Annonciation', + 'fr_FR' => 'Annonciation' ]; diff --git a/src/Yasumi/data/translations/anzacDay.php b/src/Yasumi/data/translations/anzacDay.php index ecae451ef..d60606e0a 100644 --- a/src/Yasumi/data/translations/anzacDay.php +++ b/src/Yasumi/data/translations/anzacDay.php @@ -14,5 +14,5 @@ return [ 'en_AU' => 'ANZAC Day', 'en_NZ' => 'ANZAC Day', - 'en_US' => 'ANZAC Day', + 'en_US' => 'ANZAC Day' ]; diff --git a/src/Yasumi/data/translations/armisticeDay.php b/src/Yasumi/data/translations/armisticeDay.php index 6ab487c99..a3e27fc35 100644 --- a/src/Yasumi/data/translations/armisticeDay.php +++ b/src/Yasumi/data/translations/armisticeDay.php @@ -16,5 +16,5 @@ 'en_US' => 'Armistice Day', 'fr_BE' => 'Armistice', 'fr_FR' => 'Armistice 1918', - 'nl_BE' => 'Wapenstilstand', + 'nl_BE' => 'Wapenstilstand' ]; diff --git a/src/Yasumi/data/translations/ascensionDay.php b/src/Yasumi/data/translations/ascensionDay.php index 5ac109f69..1b65c632d 100644 --- a/src/Yasumi/data/translations/ascensionDay.php +++ b/src/Yasumi/data/translations/ascensionDay.php @@ -26,5 +26,5 @@ 'nb_NO' => 'Kristi himmelfartsdag', 'nl_BE' => 'Hemelvaart', 'nl_NL' => 'Hemelvaart', - 'sv_SE' => 'Kristi himmelsfärdsdag', + 'sv_SE' => 'Kristi himmelsfärdsdag' ]; diff --git a/src/Yasumi/data/translations/ashWednesday.php b/src/Yasumi/data/translations/ashWednesday.php index ec9019b52..c8a27973e 100644 --- a/src/Yasumi/data/translations/ashWednesday.php +++ b/src/Yasumi/data/translations/ashWednesday.php @@ -20,5 +20,5 @@ 'it_CH' => 'Mercoledi delle Ceneri', 'nl_BE' => 'Aswoensdag', 'nl_NL' => 'Aswoensdag', - 'pt_BR' => 'Quarta-feira de Cinzas', + 'pt_BR' => 'Quarta-feira de Cinzas' ]; diff --git a/src/Yasumi/data/translations/assumptionOfMary.php b/src/Yasumi/data/translations/assumptionOfMary.php index 848e19b77..0f4fc6688 100755 --- a/src/Yasumi/data/translations/assumptionOfMary.php +++ b/src/Yasumi/data/translations/assumptionOfMary.php @@ -30,5 +30,5 @@ 'pl_PL' => 'Wniebowzięcie Najświętszej Marii Panny', 'pt_PT' => 'Assunção de Nossa Senhora', 'ro_RO' => 'Adormirea Maicii Domnului', - 'sk_SK' => 'Nanebovzatie Panny Márie', + 'sk_SK' => 'Nanebovzatie Panny Márie' ]; diff --git a/src/Yasumi/data/translations/australiaDay.php b/src/Yasumi/data/translations/australiaDay.php index ee2b3640b..52c1819d9 100644 --- a/src/Yasumi/data/translations/australiaDay.php +++ b/src/Yasumi/data/translations/australiaDay.php @@ -13,5 +13,5 @@ // Translations for Australia Day return [ 'en_AU' => 'Australia Day', - 'en_US' => 'Australia Day', + 'en_US' => 'Australia Day' ]; diff --git a/src/Yasumi/data/translations/carnationRevolutionDay.php b/src/Yasumi/data/translations/carnationRevolutionDay.php index 0943891e4..9d8d2e6b6 100644 --- a/src/Yasumi/data/translations/carnationRevolutionDay.php +++ b/src/Yasumi/data/translations/carnationRevolutionDay.php @@ -13,5 +13,5 @@ // Translations for Freedom Day return [ 'en_US' => 'Freedom Day', - 'pt_PT' => 'Dia da Liberdade', + 'pt_PT' => 'Dia da Liberdade' ]; diff --git a/src/Yasumi/data/translations/christmasDay.php b/src/Yasumi/data/translations/christmasDay.php index 07969a068..8771f2282 100755 --- a/src/Yasumi/data/translations/christmasDay.php +++ b/src/Yasumi/data/translations/christmasDay.php @@ -48,5 +48,5 @@ 'ru_UA' => 'Рождество', 'sk_SK' => 'Prvý sviatok vianočný', 'sv_SE' => 'juldagen', - 'uk_UA' => 'Різдво', + 'uk_UA' => 'Різдво' ]; diff --git a/src/Yasumi/data/translations/christmasEve.php b/src/Yasumi/data/translations/christmasEve.php index 8615c58c6..bff866e7e 100755 --- a/src/Yasumi/data/translations/christmasEve.php +++ b/src/Yasumi/data/translations/christmasEve.php @@ -27,5 +27,5 @@ 'pt_PT' => 'Véspera de Natal', 'ro_RO' => 'Ajunul Crãciunului', 'sk_SK' => 'Štedrý deň', - 'sv_SE' => 'julafton', + 'sv_SE' => 'julafton' ]; diff --git a/src/Yasumi/data/translations/corpusChristi.php b/src/Yasumi/data/translations/corpusChristi.php index 731842810..23116adc1 100644 --- a/src/Yasumi/data/translations/corpusChristi.php +++ b/src/Yasumi/data/translations/corpusChristi.php @@ -22,5 +22,5 @@ 'it_CH' => 'Corpus Domini', 'pl_PL' => 'Boże Ciało', 'pt_BR' => 'Corpus Christi', - 'pt_PT' => 'Corpo de Deus', + 'pt_PT' => 'Corpo de Deus' ]; diff --git a/src/Yasumi/data/translations/dayAfterNewYearsDay.php b/src/Yasumi/data/translations/dayAfterNewYearsDay.php index 0a827e96d..4b7a50896 100644 --- a/src/Yasumi/data/translations/dayAfterNewYearsDay.php +++ b/src/Yasumi/data/translations/dayAfterNewYearsDay.php @@ -14,5 +14,5 @@ return [ 'en_NZ' => 'Day after New Year\'s Day', 'en_US' => 'Day after New Year\'s Day', - 'ko_KR' => '새해 연휴', + 'ko_KR' => '새해 연휴' ]; diff --git a/src/Yasumi/data/translations/dayOfReformation.php b/src/Yasumi/data/translations/dayOfReformation.php index a0d17a2f3..4cfefcb34 100755 --- a/src/Yasumi/data/translations/dayOfReformation.php +++ b/src/Yasumi/data/translations/dayOfReformation.php @@ -13,5 +13,5 @@ // Translations for Day of Reformation return [ 'de_DE' => 'Tag der Reformation', - 'en_US' => 'Day of Reformation', + 'en_US' => 'Day of Reformation' ]; diff --git a/src/Yasumi/data/translations/easter.php b/src/Yasumi/data/translations/easter.php index 2664faaa3..2e59da34a 100644 --- a/src/Yasumi/data/translations/easter.php +++ b/src/Yasumi/data/translations/easter.php @@ -42,5 +42,5 @@ 'ro_RO' => 'Paștele', 'ru_UA' => 'Пасха', 'sv_SE' => 'påskdagen', - 'uk_UA' => 'Великдень', + 'uk_UA' => 'Великдень' ]; diff --git a/src/Yasumi/data/translations/easterMonday.php b/src/Yasumi/data/translations/easterMonday.php index 1b6853074..631c6a848 100644 --- a/src/Yasumi/data/translations/easterMonday.php +++ b/src/Yasumi/data/translations/easterMonday.php @@ -42,5 +42,5 @@ 'pl_PL' => 'Poniedziałek Wielkanocny', 'ro_RO' => 'A doua zi de Paște', 'sk_SK' => 'Veľkonočný pondelok', - 'sv_SE' => 'annandag påsk', + 'sv_SE' => 'annandag påsk' ]; diff --git a/src/Yasumi/data/translations/epiphany.php b/src/Yasumi/data/translations/epiphany.php index 9e1bbb216..98d290ad7 100644 --- a/src/Yasumi/data/translations/epiphany.php +++ b/src/Yasumi/data/translations/epiphany.php @@ -29,5 +29,5 @@ 'nl_NL' => 'Drie Koningen', 'pl_PL' => 'Święto Trzech Króli', 'sk_SK' => 'Zjavenie Pána / Traja králi', - 'sv_SE' => 'trettondedag jul', + 'sv_SE' => 'trettondedag jul' ]; diff --git a/src/Yasumi/data/translations/epiphanyEve.php b/src/Yasumi/data/translations/epiphanyEve.php index d2c8ba509..4bcb4314d 100644 --- a/src/Yasumi/data/translations/epiphanyEve.php +++ b/src/Yasumi/data/translations/epiphanyEve.php @@ -14,5 +14,5 @@ return [ 'da_DK' => 'Helligtrekongersaften', 'en_US' => 'Epiphany Eve', - 'sv_SE' => 'trettondagsafton', + 'sv_SE' => 'trettondagsafton' ]; diff --git a/src/Yasumi/data/translations/fathersDay.php b/src/Yasumi/data/translations/fathersDay.php index 0a87da240..e59d11dc9 100755 --- a/src/Yasumi/data/translations/fathersDay.php +++ b/src/Yasumi/data/translations/fathersDay.php @@ -22,5 +22,5 @@ 'nl_NL' => 'Vaderdag', 'pt_PT' => 'Dia do Pai', 'ro_RO' => 'Ziua Tatălui', - 'sk_SK' => 'Deň otcov', + 'sk_SK' => 'Deň otcov' ]; diff --git a/src/Yasumi/data/translations/goodFriday.php b/src/Yasumi/data/translations/goodFriday.php index 02823ca89..1ebfc60cd 100644 --- a/src/Yasumi/data/translations/goodFriday.php +++ b/src/Yasumi/data/translations/goodFriday.php @@ -42,5 +42,5 @@ 'pt_BR' => 'Sexta feira santa', 'pt_PT' => 'Sexta-feira Santa', 'sk_SK' => 'Veľký piatok', - 'sv_SE' => 'långfredagen', + 'sv_SE' => 'långfredagen' ]; diff --git a/src/Yasumi/data/translations/immaculateConception.php b/src/Yasumi/data/translations/immaculateConception.php index c7e677a4a..c8c222ddc 100644 --- a/src/Yasumi/data/translations/immaculateConception.php +++ b/src/Yasumi/data/translations/immaculateConception.php @@ -21,5 +21,5 @@ 'fr_CH' => 'Immaculée Conception', 'it_CH' => 'Immacolata Concezione', 'it_IT' => 'Immacolata Concezione', - 'pt_PT' => 'Dia da Imaculada Conceição', + 'pt_PT' => 'Dia da Imaculada Conceição' ]; diff --git a/src/Yasumi/data/translations/internationalWomensDay.php b/src/Yasumi/data/translations/internationalWomensDay.php index 9511db9ed..6214d44e6 100755 --- a/src/Yasumi/data/translations/internationalWomensDay.php +++ b/src/Yasumi/data/translations/internationalWomensDay.php @@ -17,5 +17,5 @@ 'ko_KR' => '국제 여성의 날', 'ru_RU' => 'Международный женский день', 'ru_UA' => 'Международный женский день', - 'uk_UA' => 'Міжнародний жіночий день', + 'uk_UA' => 'Міжнародний жіночий день' ]; diff --git a/src/Yasumi/data/translations/internationalWorkersDay.php b/src/Yasumi/data/translations/internationalWorkersDay.php index 3ddadc70a..890fa5cae 100755 --- a/src/Yasumi/data/translations/internationalWorkersDay.php +++ b/src/Yasumi/data/translations/internationalWorkersDay.php @@ -45,5 +45,5 @@ 'ru_UA' => 'День международной солидарности трудящихся', 'sk_SK' => 'Sviatok práce', 'sv_SE' => 'Första maj', - 'uk_UA' => 'День міжнародної солідарності трудящих', + 'uk_UA' => 'День міжнародної солідарності трудящих' ]; diff --git a/src/Yasumi/data/translations/labourDay.php b/src/Yasumi/data/translations/labourDay.php index bc2103ecb..3856c5be1 100644 --- a/src/Yasumi/data/translations/labourDay.php +++ b/src/Yasumi/data/translations/labourDay.php @@ -19,5 +19,5 @@ 'ko_KR' => '노동절', 'nl_BE' => 'Dag van de arbeid', 'nl_NL' => 'Dag van de arbeid', - 'sk_SK' => 'Sviatok práce', + 'sk_SK' => 'Sviatok práce' ]; diff --git a/src/Yasumi/data/translations/maundyThursday.php b/src/Yasumi/data/translations/maundyThursday.php index f3ca528b1..2e11b8812 100644 --- a/src/Yasumi/data/translations/maundyThursday.php +++ b/src/Yasumi/data/translations/maundyThursday.php @@ -16,5 +16,5 @@ 'el_GR' => 'Μεγάλη Πέμπτη', 'en_US' => 'Maundy Thursday', 'es_ES' => 'Jueves Santo', - 'nb_NO' => 'Skjærtorsdag', + 'nb_NO' => 'Skjærtorsdag' ]; diff --git a/src/Yasumi/data/translations/mothersDay.php b/src/Yasumi/data/translations/mothersDay.php index 2680faac2..7bab3de57 100755 --- a/src/Yasumi/data/translations/mothersDay.php +++ b/src/Yasumi/data/translations/mothersDay.php @@ -22,5 +22,5 @@ 'nl_NL' => 'Moederdag', 'pt_PT' => 'Dia da Mãe', 'ro_RO' => 'Ziua Mamei', - 'sk_SK' => 'Deň matiek', + 'sk_SK' => 'Deň matiek' ]; diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php index 5dcb7626a..7c340c85a 100755 --- a/src/Yasumi/data/translations/newYearsDay.php +++ b/src/Yasumi/data/translations/newYearsDay.php @@ -52,5 +52,5 @@ 'ru_UA' => 'Новый Год', 'sk_SK' => 'Nový rok', 'sv_SE' => 'nyårsdagen', - 'uk_UA' => 'Новий Рік', + 'uk_UA' => 'Новий Рік' ]; diff --git a/src/Yasumi/data/translations/newYearsEve.php b/src/Yasumi/data/translations/newYearsEve.php index 56de73ade..da632561e 100755 --- a/src/Yasumi/data/translations/newYearsEve.php +++ b/src/Yasumi/data/translations/newYearsEve.php @@ -16,5 +16,5 @@ 'en_US' => 'New Year\'s Eve', 'ko_KR' => '신년전야', 'lv_LV' => 'Vecgada vakars', - 'sv_SE' => 'nyårsafton', + 'sv_SE' => 'nyårsafton' ]; diff --git a/src/Yasumi/data/translations/pentecost.php b/src/Yasumi/data/translations/pentecost.php index 29bd99ac0..97b5601a6 100755 --- a/src/Yasumi/data/translations/pentecost.php +++ b/src/Yasumi/data/translations/pentecost.php @@ -34,5 +34,5 @@ 'ro_RO' => 'Rusaliile', 'ru_UA' => 'Троица', 'sv_SE' => 'Pingstdagen', - 'uk_UA' => 'Трійця', + 'uk_UA' => 'Трійця' ]; diff --git a/src/Yasumi/data/translations/pentecostMonday.php b/src/Yasumi/data/translations/pentecostMonday.php index 7f00ab9d2..f41afc64e 100755 --- a/src/Yasumi/data/translations/pentecostMonday.php +++ b/src/Yasumi/data/translations/pentecostMonday.php @@ -28,5 +28,5 @@ 'nb_NO' => 'Andre pinsedag', 'nl_BE' => 'Pinkstermaandag', 'nl_NL' => 'Tweede pinksterdag', - 'ro_RO' => 'A doua zi de Rusalii', + 'ro_RO' => 'A doua zi de Rusalii' ]; diff --git a/src/Yasumi/data/translations/portugalDay.php b/src/Yasumi/data/translations/portugalDay.php index d91a0a165..40d56c097 100644 --- a/src/Yasumi/data/translations/portugalDay.php +++ b/src/Yasumi/data/translations/portugalDay.php @@ -13,5 +13,5 @@ // Translations for Portugal Day return [ 'en_US' => 'Portugal Day', - 'pt_PT' => 'Dia de Portugal', + 'pt_PT' => 'Dia de Portugal' ]; diff --git a/src/Yasumi/data/translations/portugueseRepublicDay.php b/src/Yasumi/data/translations/portugueseRepublicDay.php index 22d37b3fd..6a2890ba7 100644 --- a/src/Yasumi/data/translations/portugueseRepublicDay.php +++ b/src/Yasumi/data/translations/portugueseRepublicDay.php @@ -13,5 +13,5 @@ // Translations for Implantation of the Portuguese Republic return [ 'en_US' => 'Implantation of the Portuguese Republic', - 'pt_PT' => 'Implantação da República Portuguesa', + 'pt_PT' => 'Implantação da República Portuguesa' ]; diff --git a/src/Yasumi/data/translations/reformationDay.php b/src/Yasumi/data/translations/reformationDay.php index 1e29c045a..0d1f26046 100755 --- a/src/Yasumi/data/translations/reformationDay.php +++ b/src/Yasumi/data/translations/reformationDay.php @@ -13,5 +13,5 @@ // Translations for Reformation Day return [ 'de_DE' => 'Reformationstag', - 'en_US' => 'Reformation Day', + 'en_US' => 'Reformation Day' ]; diff --git a/src/Yasumi/data/translations/restorationOfIndepence.php b/src/Yasumi/data/translations/restorationOfIndepence.php index 50dfdcfbf..d0c6aa92a 100644 --- a/src/Yasumi/data/translations/restorationOfIndepence.php +++ b/src/Yasumi/data/translations/restorationOfIndepence.php @@ -13,5 +13,5 @@ // Translations for Restoration of Independence return [ 'en_US' => 'Restoration of Independence', - 'pt_PT' => 'Restauração da Independência', + 'pt_PT' => 'Restauração da Independência' ]; diff --git a/src/Yasumi/data/translations/secondChristmasDay.php b/src/Yasumi/data/translations/secondChristmasDay.php index 32ea2753d..7b4abe4da 100755 --- a/src/Yasumi/data/translations/secondChristmasDay.php +++ b/src/Yasumi/data/translations/secondChristmasDay.php @@ -34,5 +34,5 @@ 'pl_PL' => 'drugi dzień Bożego Narodzenia', 'ro_RO' => 'A doua zi de Crăciun', 'sk_SK' => 'Druhý sviatok vianočný', - 'sv_SE' => 'annandag jul', + 'sv_SE' => 'annandag jul' ]; diff --git a/src/Yasumi/data/translations/stDavidsDay.php b/src/Yasumi/data/translations/stDavidsDay.php index b721ee90e..22f4a6502 100644 --- a/src/Yasumi/data/translations/stDavidsDay.php +++ b/src/Yasumi/data/translations/stDavidsDay.php @@ -14,5 +14,5 @@ return [ 'cy_GB' => 'Dydd Gŵyl Dewi', 'en_GB' => 'St. David\'s Day', - 'en_US' => 'St. David\'s Day', + 'en_US' => 'St. David\'s Day' ]; diff --git a/src/Yasumi/data/translations/stGeorgesDay.php b/src/Yasumi/data/translations/stGeorgesDay.php index d43a97688..b91a23938 100644 --- a/src/Yasumi/data/translations/stGeorgesDay.php +++ b/src/Yasumi/data/translations/stGeorgesDay.php @@ -14,5 +14,5 @@ return [ 'el_GR' => 'Αγίου Γεωργίου', 'en_US' => 'St. George\'s Day', - 'es_ES' => 'San Jorge', + 'es_ES' => 'San Jorge' ]; diff --git a/src/Yasumi/data/translations/stJohnsDay.php b/src/Yasumi/data/translations/stJohnsDay.php index 6907dda89..0761a1878 100644 --- a/src/Yasumi/data/translations/stJohnsDay.php +++ b/src/Yasumi/data/translations/stJohnsDay.php @@ -20,5 +20,5 @@ 'fi_FI' => 'Juhannuspäivä', 'lt_LT' => 'Rasos ir Joninių diena', 'lv_LV' => 'Jāņi', - 'sv_SE' => 'midsommardagen', + 'sv_SE' => 'midsommardagen' ]; diff --git a/src/Yasumi/data/translations/stJohnsEve.php b/src/Yasumi/data/translations/stJohnsEve.php index b979daa37..463a7c5dc 100644 --- a/src/Yasumi/data/translations/stJohnsEve.php +++ b/src/Yasumi/data/translations/stJohnsEve.php @@ -14,5 +14,5 @@ return [ 'da_DK' => 'Sankthansaften', 'en_US' => 'St. John\'s Eve', - 'sv_SE' => 'midsommarafton', + 'sv_SE' => 'midsommarafton' ]; diff --git a/src/Yasumi/data/translations/stJosephsDay.php b/src/Yasumi/data/translations/stJosephsDay.php index 9cf6ba0bd..ecae48452 100644 --- a/src/Yasumi/data/translations/stJosephsDay.php +++ b/src/Yasumi/data/translations/stJosephsDay.php @@ -16,5 +16,5 @@ 'en_US' => 'St. Joseph\'s Day', 'es_ES' => 'San José', 'fr_CH' => 'Saint-Joseph', - 'it_CH' => 'San Giuseppe', + 'it_CH' => 'San Giuseppe' ]; diff --git a/src/Yasumi/data/translations/stMartinsDay.php b/src/Yasumi/data/translations/stMartinsDay.php index c7472a78e..5da91e001 100644 --- a/src/Yasumi/data/translations/stMartinsDay.php +++ b/src/Yasumi/data/translations/stMartinsDay.php @@ -14,5 +14,5 @@ return [ 'en_US' => 'St. Martin\'s Day', 'nl_BE' => 'Sint Maarten', - 'nl_NL' => 'Sint Maarten', + 'nl_NL' => 'Sint Maarten' ]; diff --git a/src/Yasumi/data/translations/stStephensDay.php b/src/Yasumi/data/translations/stStephensDay.php index b1b6a71a3..a7e4527ec 100644 --- a/src/Yasumi/data/translations/stStephensDay.php +++ b/src/Yasumi/data/translations/stStephensDay.php @@ -22,5 +22,5 @@ 'ga_IE' => 'Lá Fhéile Stiofáin', 'hr_HR' => 'Sveti Stjepan', 'it_CH' => 'Santo Stefano', - 'it_IT' => 'Santo Stefano', + 'it_IT' => 'Santo Stefano' ]; diff --git a/src/Yasumi/data/translations/summerTime.php b/src/Yasumi/data/translations/summerTime.php index 3ba814638..5d23a5fc9 100644 --- a/src/Yasumi/data/translations/summerTime.php +++ b/src/Yasumi/data/translations/summerTime.php @@ -15,5 +15,5 @@ 'da_DK' => 'Sommertid starter', 'en_US' => 'Summertime', 'ko_KR' => '서머타임', - 'nl_NL' => 'Zomertijd', + 'nl_NL' => 'Zomertijd' ]; diff --git a/src/Yasumi/data/translations/valentinesDay.php b/src/Yasumi/data/translations/valentinesDay.php index 065fbb4f9..1bd8bc811 100644 --- a/src/Yasumi/data/translations/valentinesDay.php +++ b/src/Yasumi/data/translations/valentinesDay.php @@ -24,5 +24,5 @@ 'nl_BE' => 'Valentijnsdag', 'nl_NL' => 'Valentijnsdag', 'pl_PL' => 'Walentynki', - 'pt_PT' => 'Dia dos Namorados', + 'pt_PT' => 'Dia dos Namorados' ]; diff --git a/src/Yasumi/data/translations/victoryInEuropeDay.php b/src/Yasumi/data/translations/victoryInEuropeDay.php index f85548344..8571b27ba 100644 --- a/src/Yasumi/data/translations/victoryInEuropeDay.php +++ b/src/Yasumi/data/translations/victoryInEuropeDay.php @@ -15,5 +15,5 @@ 'cs_CZ' => 'Den vítězství', 'en_US' => 'Victory in Europe Day', 'fr_FR' => 'Victoire 1945', - 'sk_SK' => 'Deň víťazstva nad fašizmom', + 'sk_SK' => 'Deň víťazstva nad fašizmom' ]; diff --git a/src/Yasumi/data/translations/waitangiDay.php b/src/Yasumi/data/translations/waitangiDay.php index a7d64b2c6..19cb2e0b5 100644 --- a/src/Yasumi/data/translations/waitangiDay.php +++ b/src/Yasumi/data/translations/waitangiDay.php @@ -13,5 +13,5 @@ // Translations for Waitangi Day return [ 'en_NZ' => 'Waitangi Day', - 'en_US' => 'Waitangi Day', + 'en_US' => 'Waitangi Day' ]; diff --git a/src/Yasumi/data/translations/walpurgisEve.php b/src/Yasumi/data/translations/walpurgisEve.php index 3570a04a1..47476f9f3 100755 --- a/src/Yasumi/data/translations/walpurgisEve.php +++ b/src/Yasumi/data/translations/walpurgisEve.php @@ -13,5 +13,5 @@ // Translations for Walpurgis Night return [ 'en_US' => 'Walpurgis Night', - 'sv_SE' => 'valborgsmässoafton', + 'sv_SE' => 'valborgsmässoafton' ]; diff --git a/src/Yasumi/data/translations/winterTime.php b/src/Yasumi/data/translations/winterTime.php index 06f5bdd19..bc55337a1 100644 --- a/src/Yasumi/data/translations/winterTime.php +++ b/src/Yasumi/data/translations/winterTime.php @@ -14,5 +14,5 @@ return [ 'da_DK' => 'Sommertid slutter', 'en_US' => 'Wintertime', - 'nl_NL' => 'Wintertijd', + 'nl_NL' => 'Wintertijd' ]; diff --git a/src/Yasumi/data/translations/worldAnimalDay.php b/src/Yasumi/data/translations/worldAnimalDay.php index cfb7f1da9..19310d209 100644 --- a/src/Yasumi/data/translations/worldAnimalDay.php +++ b/src/Yasumi/data/translations/worldAnimalDay.php @@ -14,5 +14,5 @@ return [ 'en_US' => 'World Animal Day', 'nl_BE' => 'Werelddierendag', - 'nl_NL' => 'Werelddierendag', + 'nl_NL' => 'Werelddierendag' ]; From a15a1f76a82b188212ff79b443769e7007cdcbde Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Sep 2019 11:48:28 +0900 Subject: [PATCH 092/133] Reordered arguments in Yoda style. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Australia.php | 4 ++-- src/Yasumi/Provider/Australia/ACT.php | 4 ++-- src/Yasumi/Provider/Australia/Queensland.php | 4 ++-- src/Yasumi/Provider/Australia/WA.php | 4 ++-- src/Yasumi/Provider/ChristianHolidays.php | 2 +- src/Yasumi/Provider/Germany.php | 2 +- src/Yasumi/Provider/SouthAfrica.php | 4 ++-- src/Yasumi/Provider/SouthKorea.php | 4 ++-- src/Yasumi/Provider/Switzerland.php | 2 +- src/Yasumi/Yasumi.php | 4 ++-- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index b58508610..48503902c 100755 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -103,8 +103,8 @@ public function calculateHoliday( $type = Holiday::TYPE_OFFICIAL ): void { $day = (int)$date->format('w'); - if (($day === 0 && $moveFromSunday) || ($day === 6 && $moveFromSaturday)) { - $date = $date->add($day === 0 ? new DateInterval('P1D') : new DateInterval('P2D')); + if ((0 === $day && $moveFromSunday) || (6 === $day && $moveFromSaturday)) { + $date = $date->add(0 === $day ? new DateInterval('P1D') : new DateInterval('P2D')); } $this->addHoliday(new Holiday($shortName, $names, $date, $this->locale, $type)); diff --git a/src/Yasumi/Provider/Australia/ACT.php b/src/Yasumi/Provider/Australia/ACT.php index c9d2edab8..0899d2d7c 100644 --- a/src/Yasumi/Provider/Australia/ACT.php +++ b/src/Yasumi/Provider/Australia/ACT.php @@ -80,8 +80,8 @@ private function calculateReconciliationDay(): void $date = new DateTime($this->year . '-05-27', new DateTimeZone($this->timezone)); $day = (int)$date->format('w'); - if ($day !== 1) { - $date = $date->add($day === 0 ? new DateInterval('P1D') : new DateInterval('P'.(8-$day).'D')); + if (1 !== $day) { + $date = $date->add(0 === $day ? new DateInterval('P1D') : new DateInterval('P' . (8 - $day) . 'D')); } $this->addHoliday(new Holiday('reconciliationDay', ['en_AU' => 'Reconciliation Day'], $date, $this->locale)); } diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index c9bb0ce9b..bd5169f6c 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -54,7 +54,7 @@ public function initialize(): void */ private function calculateLabourDay(): void { - if ($this->year === 2013 || $this->year === 2014 || $this->year === 2015) { + if (2013 === $this->year || 2014 === $this->year || 2015 === $this->year) { $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); } else { $date = new DateTime("first monday of may $this->year", new DateTimeZone($this->timezone)); @@ -80,7 +80,7 @@ private function calculateLabourDay(): void */ private function calculateQueensBirthday(): void { - if ($this->year < 2012 || $this->year === 2013 || $this->year === 2014 || $this->year === 2015) { + if ($this->year < 2012 || 2013 === $this->year || 2014 === $this->year || 2015 === $this->year) { $this->calculateHoliday( 'queensBirthday', ['en_AU' => "Queen's Birthday"], diff --git a/src/Yasumi/Provider/Australia/WA.php b/src/Yasumi/Provider/Australia/WA.php index 3e345827d..ee7e04516 100644 --- a/src/Yasumi/Provider/Australia/WA.php +++ b/src/Yasumi/Provider/Australia/WA.php @@ -96,7 +96,7 @@ private function calculateWesternAustraliaDay(): void */ private function calculateQueensBirthday(): void { - if ($this->year === 2011) { + if (2011 === $this->year) { $this->calculateHoliday( 'queensBirthday', ['en_AU' => "Queen's Birthday"], @@ -104,7 +104,7 @@ private function calculateQueensBirthday(): void false, false ); - } elseif ($this->year === 2012) { + } elseif (2012 === $this->year) { $this->calculateHoliday( 'queensBirthday', ['en_AU' => "Queen's Birthday"], diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index 40e5c270e..4b75c5cec 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -896,7 +896,7 @@ protected function calculateEaster(int $year, string $timezone): DateTime } // Corrected date of the Paschal full moon, - days after 21st March - if (($pfm === 29) || ($pfm === 28 && $golden > 11)) { + if ((29 === $pfm) || (28 === $pfm && $golden > 11)) { --$pfm; } diff --git a/src/Yasumi/Provider/Germany.php b/src/Yasumi/Provider/Germany.php index b17de0345..b0ffe2641 100644 --- a/src/Yasumi/Provider/Germany.php +++ b/src/Yasumi/Provider/Germany.php @@ -59,7 +59,7 @@ public function initialize(): void $this->calculateGermanUnityDay(); // Note: all German states have agreed this to be a nationwide holiday in 2017 to celebrate the 500th anniversary. - if ($this->year === 2017) { + if (2017 === $this->year) { $this->addHoliday($this->reformationDay($this->year, $this->timezone, $this->locale)); } } diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index b907f7da6..8a392f46c 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -191,7 +191,7 @@ private function calculateYouthDay(): void */ private function calculate2016MunicipalElectionsDay(): void { - if ($this->year !== 2016) { + if (2016 !== $this->year) { return; } @@ -298,7 +298,7 @@ private function calculateDayOfReconciliation(): void */ private function calculateSubstituteDayOfGoodwill(): void { - if ($this->year !== 2016) { + if (2016 !== $this->year) { return; } diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 412f03701..7a8849fa8 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -489,14 +489,14 @@ public function calculateSubstituteHolidays(): void && ( 0 === (int)$date->format('w') || \in_array($date, $holidayDates, false) - || (6 === (int)$date->format('w') && $shortName === 'childrensDay') + || (6 === (int)$date->format('w') && 'childrensDay' === $shortName) ) ) { $substitute = clone $date; // Find next week day (not being another holiday) while (0 === (int)$substitute->format('w') - || (6 === (int)$substitute->format('w') && $shortName === 'childrensDay') + || (6 === (int)$substitute->format('w') && 'childrensDay' === $shortName) || \in_array($substitute, $holidayDates, false)) { $substitute->add(new DateInterval('P1D')); continue; diff --git a/src/Yasumi/Provider/Switzerland.php b/src/Yasumi/Provider/Switzerland.php index a5227aa42..3e8fbe982 100644 --- a/src/Yasumi/Provider/Switzerland.php +++ b/src/Yasumi/Provider/Switzerland.php @@ -82,7 +82,7 @@ private function calculateNationalDay(): void $this->locale, Holiday::TYPE_OFFICIAL )); - } elseif ($this->year >= 1899 || $this->year === 1891) { + } elseif ($this->year >= 1899 || 1891 === $this->year) { $this->addHoliday(new Holiday( 'swissNationalDay', $translations, diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index d2255a1c7..88153e0a9 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -133,7 +133,7 @@ public static function create(string $class, int $year = 0, string $locale = sel $providerClass = $class; } - if ($class === 'AbstractProvider' || ! \class_exists($providerClass)) { + if ('AbstractProvider' === $class || !\class_exists($providerClass)) { throw new ProviderNotFoundException(\sprintf('Unable to find holiday provider "%s".', $class)); } @@ -230,7 +230,7 @@ public static function getProviders(): array ), RecursiveIteratorIterator::SELF_FIRST); foreach ($filesIterator as $file) { - if ($file->isDir() || $file->getExtension() !== 'php' || \in_array( + if ($file->isDir() || 'php' !== $file->getExtension() || \in_array( $file->getBasename('.php'), self::$ignoredProvider, true From 5b427026afee887b7e7133d1112d1f9f02ed5636 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Sep 2019 12:05:02 +0900 Subject: [PATCH 093/133] Reordered arguments in Yoda style. Reformatting. Changed visibility of constants. Added class constant for the case in which Arbor was not celebrated. Signed-off-by: Sacha Telgenhof --- tests/SouthKorea/ArborDayTest.php | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/tests/SouthKorea/ArborDayTest.php b/tests/SouthKorea/ArborDayTest.php index 2c650e7af..6786e26af 100644 --- a/tests/SouthKorea/ArborDayTest.php +++ b/tests/SouthKorea/ArborDayTest.php @@ -28,27 +28,33 @@ class ArborDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInter /** * The name of the holiday */ - public const HOLIDAY = 'arborDay'; + private const HOLIDAY = 'arborDay'; /** * The year in which the holiday was first established */ - public const ESTABLISHMENT_YEAR = 1949; + private const ESTABLISHMENT_YEAR = 1949; /** * The year in which the holiday was removed */ - public const REMOVED_YEAR = 2005; + private const REMOVED_YEAR = 2005; + + /** + * The year in which the holiday was not celebrated + */ + private const YEAR_NOT_CELEBRATED = 1960; /** * Tests the holiday defined in this test. + * * @throws Exception * @throws ReflectionException */ public function testHoliday() { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); - if ($year === 1960) { + if (self::YEAR_NOT_CELEBRATED === $year) { $this->assertNotHoliday( self::REGION, self::HOLIDAY, @@ -66,6 +72,7 @@ public function testHoliday() /** * Tests the holiday defined in this test after removal. + * * @throws ReflectionException */ public function testHolidayAfterRemoval() @@ -79,6 +86,7 @@ public function testHolidayAfterRemoval() /** * Tests the holiday defined in this test before establishment. + * * @throws ReflectionException */ public function testHolidayBeforeEstablishment() @@ -92,12 +100,13 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. + * * @throws ReflectionException */ public function testTranslation(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); - if ($year !== 1960) { + if (self::YEAR_NOT_CELEBRATED !== $year) { $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, @@ -109,12 +118,13 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. + * * @throws ReflectionException */ public function testHolidayType(): void { $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::REMOVED_YEAR); - if ($year !== 1960) { + if (self::YEAR_NOT_CELEBRATED !== $year) { $this->assertHolidayType( self::REGION, self::HOLIDAY, From 4236325859b9b57a05b0c9251def1e9eb2e8eff8 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Sep 2019 15:20:27 +0900 Subject: [PATCH 094/133] Changed visibility of constants again so they can be used in the main country test. Signed-off-by: Sacha Telgenhof --- tests/SouthKorea/ArborDayTest.php | 4 ++-- tests/SouthKorea/SouthKoreaTest.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/SouthKorea/ArborDayTest.php b/tests/SouthKorea/ArborDayTest.php index 6786e26af..ccce9260c 100644 --- a/tests/SouthKorea/ArborDayTest.php +++ b/tests/SouthKorea/ArborDayTest.php @@ -38,12 +38,12 @@ class ArborDayTest extends SouthKoreaBaseTestCase implements YasumiTestCaseInter /** * The year in which the holiday was removed */ - private const REMOVED_YEAR = 2005; + public const REMOVED_YEAR = 2005; /** * The year in which the holiday was not celebrated */ - private const YEAR_NOT_CELEBRATED = 1960; + public const YEAR_NOT_CELEBRATED = 1960; /** * Tests the holiday defined in this test. diff --git a/tests/SouthKorea/SouthKoreaTest.php b/tests/SouthKorea/SouthKoreaTest.php index 0202c7b3a..b177e8b89 100644 --- a/tests/SouthKorea/SouthKoreaTest.php +++ b/tests/SouthKorea/SouthKoreaTest.php @@ -39,7 +39,7 @@ public function testOfficialHolidays(): void $officialHolidays[] = 'liberationDay'; $officialHolidays[] = 'nationalFoundationDay'; $officialHolidays[] = 'christmasDay'; - if ($this->year !== 1960 && $this->year < 2006) { + if ($this->year !== ArborDayTest::YEAR_NOT_CELEBRATED && $this->year < ArborDayTest::REMOVED_YEAR + 1) { $officialHolidays[] = 'arborDay'; } if ($this->year <= 1990 || $this->year > 2012) { From cae64b8dbacb20cac1f8cf2b01714229f271a844 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 8 Sep 2019 18:00:15 +0900 Subject: [PATCH 095/133] Replaced null checks by appropriate instance / type checks. Applying the use of strict typing. Strict typing allows for improved readability, maintainability, and the code becoming less prone to bugs and security vulnerabilities. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Exception/Exception.php | 2 +- src/Yasumi/Exception/InvalidDateException.php | 2 +- src/Yasumi/Exception/InvalidYearException.php | 2 +- .../Exception/ProviderNotFoundException.php | 2 +- .../Exception/UnknownLocaleException.php | 2 +- src/Yasumi/Filters/BankHolidaysFilter.php | 2 +- src/Yasumi/Filters/BetweenFilter.php | 10 +- src/Yasumi/Filters/ObservedHolidaysFilter.php | 2 +- src/Yasumi/Filters/OfficialHolidaysFilter.php | 2 +- src/Yasumi/Filters/OnFilter.php | 4 +- src/Yasumi/Filters/OtherHolidaysFilter.php | 2 +- src/Yasumi/Filters/SeasonalHolidaysFilter.php | 2 +- src/Yasumi/Holiday.php | 22 +- src/Yasumi/Provider/AbstractProvider.php | 52 +-- src/Yasumi/Provider/Australia.php | 92 +++--- src/Yasumi/Provider/Australia/ACT.php | 130 ++++---- src/Yasumi/Provider/Australia/NSW.php | 40 +-- src/Yasumi/Provider/Australia/NT.php | 74 ++--- src/Yasumi/Provider/Australia/Queensland.php | 34 +- .../Australia/Queensland/Brisbane.php | 4 +- src/Yasumi/Provider/Australia/SA.php | 158 ++++----- 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 | 176 +++++----- src/Yasumi/Provider/Australia/WA.php | 64 ++-- src/Yasumi/Provider/Austria.php | 2 +- src/Yasumi/Provider/Belgium.php | 2 +- src/Yasumi/Provider/Bosnia.php | 2 +- src/Yasumi/Provider/Brazil.php | 2 +- src/Yasumi/Provider/ChristianHolidays.php | 306 +++++++++--------- src/Yasumi/Provider/CommonHolidays.php | 150 ++++----- src/Yasumi/Provider/Croatia.php | 2 +- src/Yasumi/Provider/CzechRepublic.php | 2 +- src/Yasumi/Provider/Denmark.php | 2 +- src/Yasumi/Provider/Estonia.php | 2 +- src/Yasumi/Provider/Finland.php | 25 +- src/Yasumi/Provider/France.php | 2 +- src/Yasumi/Provider/France/BasRhin.php | 2 +- src/Yasumi/Provider/France/HautRhin.php | 2 +- src/Yasumi/Provider/France/Moselle.php | 2 +- src/Yasumi/Provider/Germany.php | 2 +- .../Provider/Germany/BadenWurttemberg.php | 2 +- src/Yasumi/Provider/Germany/Bavaria.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/Hesse.php | 2 +- src/Yasumi/Provider/Germany/LowerSaxony.php | 2 +- .../Germany/MecklenburgWesternPomerania.php | 2 +- .../Provider/Germany/NorthRhineWestphalia.php | 2 +- .../Provider/Germany/RhinelandPalatinate.php | 2 +- src/Yasumi/Provider/Germany/Saarland.php | 2 +- src/Yasumi/Provider/Germany/Saxony.php | 2 +- src/Yasumi/Provider/Germany/SaxonyAnhalt.php | 2 +- .../Provider/Germany/SchleswigHolstein.php | 2 +- src/Yasumi/Provider/Germany/Thuringia.php | 2 +- src/Yasumi/Provider/Greece.php | 4 +- src/Yasumi/Provider/Hungary.php | 2 +- src/Yasumi/Provider/Ireland.php | 2 +- src/Yasumi/Provider/Italy.php | 2 +- src/Yasumi/Provider/Japan.php | 89 ++--- src/Yasumi/Provider/Latvia.php | 6 +- src/Yasumi/Provider/Lithuania.php | 2 +- src/Yasumi/Provider/Netherlands.php | 272 ++++++++-------- src/Yasumi/Provider/NewZealand.php | 10 +- src/Yasumi/Provider/Norway.php | 2 +- src/Yasumi/Provider/Poland.php | 2 +- src/Yasumi/Provider/Portugal.php | 2 +- src/Yasumi/Provider/Romania.php | 4 +- src/Yasumi/Provider/Russia.php | 2 +- src/Yasumi/Provider/Slovakia.php | 2 +- src/Yasumi/Provider/SouthAfrica.php | 2 +- src/Yasumi/Provider/SouthKorea.php | 190 +++++------ src/Yasumi/Provider/Spain.php | 2 +- src/Yasumi/Provider/Spain/Andalusia.php | 2 +- src/Yasumi/Provider/Spain/Aragon.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 | 2 +- src/Yasumi/Provider/Spain/LaRioja.php | 2 +- src/Yasumi/Provider/Spain/Melilla.php | 2 +- src/Yasumi/Provider/Spain/Navarre.php | 2 +- src/Yasumi/Provider/Spain/RegionOfMurcia.php | 2 +- .../Provider/Spain/ValencianCommunity.php | 2 +- src/Yasumi/Provider/Sweden.php | 2 +- src/Yasumi/Provider/Switzerland.php | 2 +- src/Yasumi/Provider/Switzerland/Aargau.php | 2 +- .../Switzerland/AppenzellAusserrhoden.php | 2 +- .../Switzerland/AppenzellInnerrhoden.php | 2 +- .../Provider/Switzerland/BaselLandschaft.php | 2 +- .../Provider/Switzerland/BaselStadt.php | 2 +- src/Yasumi/Provider/Switzerland/Bern.php | 2 +- src/Yasumi/Provider/Switzerland/Fribourg.php | 2 +- src/Yasumi/Provider/Switzerland/Geneva.php | 2 +- src/Yasumi/Provider/Switzerland/Glarus.php | 2 +- src/Yasumi/Provider/Switzerland/Grisons.php | 2 +- src/Yasumi/Provider/Switzerland/Jura.php | 2 +- src/Yasumi/Provider/Switzerland/Lucerne.php | 2 +- src/Yasumi/Provider/Switzerland/Neuchatel.php | 2 +- src/Yasumi/Provider/Switzerland/Nidwalden.php | 2 +- src/Yasumi/Provider/Switzerland/Obwalden.php | 2 +- .../Provider/Switzerland/Schaffhausen.php | 2 +- src/Yasumi/Provider/Switzerland/Schwyz.php | 2 +- src/Yasumi/Provider/Switzerland/Solothurn.php | 2 +- src/Yasumi/Provider/Switzerland/StGallen.php | 2 +- src/Yasumi/Provider/Switzerland/Thurgau.php | 2 +- src/Yasumi/Provider/Switzerland/Ticino.php | 2 +- src/Yasumi/Provider/Switzerland/Uri.php | 2 +- src/Yasumi/Provider/Switzerland/Valais.php | 2 +- src/Yasumi/Provider/Switzerland/Vaud.php | 2 +- src/Yasumi/Provider/Switzerland/Zug.php | 2 +- src/Yasumi/Provider/Switzerland/Zurich.php | 2 +- src/Yasumi/Provider/USA.php | 60 ++-- src/Yasumi/Provider/Ukraine.php | 4 +- src/Yasumi/Provider/UnitedKingdom.php | 6 +- src/Yasumi/ProviderInterface.php | 2 +- src/Yasumi/Translations.php | 2 +- src/Yasumi/TranslationsInterface.php | 4 +- src/Yasumi/Yasumi.php | 38 +-- src/Yasumi/data/locales.php | 2 +- src/Yasumi/data/translations/allSaintsDay.php | 2 +- src/Yasumi/data/translations/allSaintsEve.php | 2 +- src/Yasumi/data/translations/annunciation.php | 2 +- src/Yasumi/data/translations/anzacDay.php | 2 +- src/Yasumi/data/translations/armisticeDay.php | 2 +- src/Yasumi/data/translations/ascensionDay.php | 2 +- src/Yasumi/data/translations/ashWednesday.php | 2 +- .../data/translations/assumptionOfMary.php | 2 +- src/Yasumi/data/translations/australiaDay.php | 2 +- .../translations/carnationRevolutionDay.php | 2 +- src/Yasumi/data/translations/christmasDay.php | 2 +- src/Yasumi/data/translations/christmasEve.php | 2 +- .../data/translations/corpusChristi.php | 2 +- .../data/translations/dayAfterNewYearsDay.php | 2 +- .../data/translations/dayOfReformation.php | 2 +- src/Yasumi/data/translations/easter.php | 2 +- src/Yasumi/data/translations/easterMonday.php | 2 +- src/Yasumi/data/translations/epiphany.php | 2 +- src/Yasumi/data/translations/epiphanyEve.php | 2 +- src/Yasumi/data/translations/fathersDay.php | 2 +- src/Yasumi/data/translations/goodFriday.php | 2 +- .../translations/immaculateConception.php | 2 +- .../translations/internationalWomensDay.php | 2 +- .../translations/internationalWorkersDay.php | 2 +- src/Yasumi/data/translations/labourDay.php | 2 +- .../data/translations/maundyThursday.php | 2 +- src/Yasumi/data/translations/mothersDay.php | 2 +- src/Yasumi/data/translations/newYearsDay.php | 2 +- src/Yasumi/data/translations/newYearsEve.php | 2 +- src/Yasumi/data/translations/pentecost.php | 2 +- .../data/translations/pentecostMonday.php | 2 +- src/Yasumi/data/translations/portugalDay.php | 2 +- .../translations/portugueseRepublicDay.php | 2 +- .../data/translations/reformationDay.php | 2 +- .../translations/restorationOfIndepence.php | 2 +- .../data/translations/secondChristmasDay.php | 2 +- src/Yasumi/data/translations/stDavidsDay.php | 2 +- src/Yasumi/data/translations/stGeorgesDay.php | 2 +- src/Yasumi/data/translations/stJohnsDay.php | 2 +- src/Yasumi/data/translations/stJohnsEve.php | 2 +- src/Yasumi/data/translations/stJosephsDay.php | 2 +- src/Yasumi/data/translations/stMartinsDay.php | 2 +- .../data/translations/stStephensDay.php | 2 +- src/Yasumi/data/translations/summerTime.php | 2 +- .../data/translations/valentinesDay.php | 2 +- .../data/translations/victoryInEuropeDay.php | 2 +- src/Yasumi/data/translations/waitangiDay.php | 2 +- src/Yasumi/data/translations/walpurgisEve.php | 2 +- src/Yasumi/data/translations/winterTime.php | 2 +- .../data/translations/worldAnimalDay.php | 2 +- 187 files changed, 1172 insertions(+), 1178 deletions(-) diff --git a/src/Yasumi/Exception/Exception.php b/src/Yasumi/Exception/Exception.php index 2405ddde7..14b038858 100644 --- a/src/Yasumi/Exception/Exception.php +++ b/src/Yasumi/Exception/Exception.php @@ -1,4 +1,4 @@ -equal = $equal; + $this->equal = $equal; $this->start_date = $start_date->format('Y-m-d'); - $this->end_date = $end_date->format('Y-m-d'); + $this->end_date = $end_date->format('Y-m-d'); } /** diff --git a/src/Yasumi/Filters/ObservedHolidaysFilter.php b/src/Yasumi/Filters/ObservedHolidaysFilter.php index 2ebe0ecad..e15e828dd 100644 --- a/src/Yasumi/Filters/ObservedHolidaysFilter.php +++ b/src/Yasumi/Filters/ObservedHolidaysFilter.php @@ -1,4 +1,4 @@ -date = $date->format('Y-m-d'); + $this->date = $date->format('Y-m-d'); } /** diff --git a/src/Yasumi/Filters/OtherHolidaysFilter.php b/src/Yasumi/Filters/OtherHolidaysFilter.php index 5807b44e3..8fcd42cd6 100644 --- a/src/Yasumi/Filters/OtherHolidaysFilter.php +++ b/src/Yasumi/Filters/OtherHolidaysFilter.php @@ -1,4 +1,4 @@ -shortName = $shortName; - $this->translations = $names; + $this->shortName = $shortName; + $this->translations = $names; $this->displayLocale = $displayLocale; - $this->type = $type; + $this->type = $type; // Construct instance parent::__construct($date->format('Y-m-d'), $date->getTimezone()); @@ -171,7 +171,7 @@ public function getName(): string public function mergeGlobalTranslations(TranslationsInterface $globalTranslations) { $holidayGlobalTranslations = $globalTranslations->getTranslations($this->shortName); - $this->translations = \array_merge($holidayGlobalTranslations, $this->translations); + $this->translations = \array_merge($holidayGlobalTranslations, $this->translations); } /** diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index ac047e7e0..5fb341014 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -1,4 +1,4 @@ -clearHolidays(); - $this->year = $year ?: \getdate()['year']; - $this->locale = $locale; + $this->year = $year ?: \getdate()['year']; + $this->locale = $locale ?? 'en_US'; $this->globalTranslations = $globalTranslations; $this->initialize(); @@ -184,7 +184,7 @@ public function removeHoliday($shortName): void * \DateTime) * * @return bool true if date represents a working day, otherwise false - *@throws InvalidDateException + * @throws InvalidDateException * */ public function isWorkingDay(\DateTimeInterface $date): bool @@ -216,7 +216,7 @@ public function isWorkingDay(\DateTimeInterface $date): bool * \DateTime) * * @return bool true if date represents a holiday, otherwise false - *@throws InvalidDateException + * @throws InvalidDateException * */ public function isHoliday(\DateTimeInterface $date): bool @@ -246,9 +246,9 @@ public function getHolidayDates(): array * * @param string $shortName short name of the holiday * + * @return string the date of the requested holiday * @throws InvalidArgumentException when the given name is blank or empty. * - * @return string the date of the requested holiday */ public function whenIs($shortName): string { @@ -262,9 +262,9 @@ public function whenIs($shortName): string * * @param string $shortName the name of the holiday to be checked. * + * @return true upon success, otherwise an InvalidArgumentException is thrown * @throws InvalidArgumentException An InvalidArgumentException is thrown if the given holiday parameter is empty. * - * @return true upon success, otherwise an InvalidArgumentException is thrown */ protected function isHolidayNameNotEmpty($shortName): bool { @@ -283,9 +283,9 @@ protected function isHolidayNameNotEmpty($shortName): bool * * @param string $shortName short name of the holiday * + * @return int the index of the weekdays of the requested holiday (0 = Sunday, 1 = Monday, etc.) * @throws InvalidArgumentException when the given name is blank or empty. * - * @return int the index of the weekdays of the requested holiday (0 = Sunday, 1 = Monday, etc.) */ public function whatWeekDayIs($shortName): int { @@ -353,7 +353,7 @@ public function next($shortName): ?Holiday /** * Determines the date of the given holiday for another year. * - * @param int $year the year to get the holiday date for + * @param int $year the year to get the holiday date for * @param string $shortName the name of the holiday for which the date needs to be fetched * * @return Holiday|null a Holiday instance for the given holiday and year @@ -433,8 +433,8 @@ public function previous($shortName): ?Holiday * correct). * * @param \DateTimeInterface $start_date Start date of the time frame to check against - * @param \DateTimeInterface $end_date End date of the time frame to check against - * @param bool $equals indicate whether the start and end dates should be included in the + * @param \DateTimeInterface $end_date End date of the time frame to check against + * @param bool $equals indicate whether the start and end dates should be included in the * comparison * * @return BetweenFilter @@ -442,13 +442,23 @@ public function previous($shortName): ?Holiday * date. * */ - public function between(\DateTimeInterface $start_date, \DateTimeInterface $end_date, $equals = true): BetweenFilter + public function between(\DateTimeInterface $start_date, \DateTimeInterface $end_date, $equals = null): BetweenFilter { if ($start_date > $end_date) { throw new InvalidArgumentException('Start date must be a date before the end date.'); } - return new BetweenFilter($this->getIterator(), $start_date, $end_date, $equals); + return new BetweenFilter($this->getIterator(), $start_date, $end_date, $equals ?? true); + } + + /** + * Get an iterator for the holidays. + * + * @return ArrayIterator iterator for the holidays of this calendar + */ + public function getIterator(): ArrayIterator + { + return new ArrayIterator($this->getHolidays()); } /** @@ -468,14 +478,4 @@ public function on(\DateTimeInterface $date): OnFilter { return new OnFilter($this->getIterator(), $date); } - - /** - * Get an iterator for the holidays. - * - * @return ArrayIterator iterator for the holidays of this calendar - */ - public function getIterator(): ArrayIterator - { - return new ArrayIterator($this->getHolidays()); - } } diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index 48503902c..782522c2a 100755 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -1,4 +1,4 @@ -year-01-26", new DateTimeZone($this->timezone)); - - $this->calculateHoliday('australiaDay', ['en_AU' => 'Australia Day'], $date); + $newyearsday = new DateTime("$this->year-01-01", new DateTimeZone($this->timezone)); + $this->calculateHoliday('newYearsDay', ['en_AU' => 'New Year\'s Day'], $newyearsday, false, false); + switch ($newyearsday->format('w')) { + case 0: // sunday + $newyearsday->add(new DateInterval('P1D')); + $this->calculateHoliday('newYearsHoliday', ['en_AU' => 'New Year\'s Holiday'], $newyearsday, false, false); + break; + case 6: // saturday + $newyearsday->add(new DateInterval('P2D')); + $this->calculateHoliday('newYearsHoliday', ['en_AU' => 'New Year\'s Holiday'], $newyearsday, false, false); + break; + } } /** * Function to simplify moving holidays to mondays if required * - * @param string $shortName - * @param array $names - * @param DateTime $date - * @param bool $moveFromSaturday - * @param bool $moveFromSunday - * @param string $type + * @param string $shortName + * @param array $names + * @param DateTime $date + * @param bool $moveFromSaturday + * @param bool $moveFromSunday + * @param string $type * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -98,46 +103,41 @@ public function calculateHoliday( string $shortName, array $names = [], $date, - $moveFromSaturday = true, - $moveFromSunday = true, - $type = Holiday::TYPE_OFFICIAL + $moveFromSaturday = null, + $moveFromSunday = null, + $type = null ): void { $day = (int)$date->format('w'); - if ((0 === $day && $moveFromSunday) || (6 === $day && $moveFromSaturday)) { + if ((0 === $day && ($moveFromSunday ?? true)) || (6 === $day && ($moveFromSaturday ?? true))) { $date = $date->add(0 === $day ? new DateInterval('P1D') : new DateInterval('P2D')); } - $this->addHoliday(new Holiday($shortName, $names, $date, $this->locale, $type)); + $this->addHoliday(new Holiday($shortName, $names, $date, $this->locale, $type ?? Holiday::TYPE_OFFICIAL)); } /** - * Holidays associated with the start of the modern Gregorian calendar. + * Australia Day. * - * New Year's Day is on January 1 and is the first day of a new year in the Gregorian calendar, - * which is used in Australia and many other countries. Due to its geographical position close - * to the International Date Line, Australia is one of the first countries in the world to welcome the New Year. - * If it falls on a weekend an additional public holiday is held on the next available weekday. + * Australia Day is the official National Day of Australia. Celebrated annually on 26 January, + * it marks the anniversary of the 1788 arrival of the First Fleet of British Ships at + * Port Jackson, New South Wales, and the raising of the Flag of Great Britain at Sydney Cove + * by Governor Arthur Phillip. In present-day Australia, celebrations reflect the diverse + * society and landscape of the nation, and are marked by community and family events, + * reflections on Australian history, official community awards, and citizenship ceremonies + * welcoming new immigrants into the Australian community. * - * @link https://www.timeanddate.com/holidays/australia/new-year-day + * @link https://en.wikipedia.org/wiki/Waitangi_Day + * @link https://www.timeanddate.com/holidays/australia/australia-day * * @throws \InvalidArgumentException * @throws UnknownLocaleException * @throws \Exception */ - private function calculateNewYearHolidays(): void + private function calculateAustraliaDay(): void { - $newyearsday = new DateTime("$this->year-01-01", new DateTimeZone($this->timezone)); - $this->calculateHoliday('newYearsDay', ['en_AU' => 'New Year\'s Day'], $newyearsday, false, false); - switch ($newyearsday->format('w')) { - case 0: // sunday - $newyearsday->add(new DateInterval('P1D')); - $this->calculateHoliday('newYearsHoliday', ['en_AU' => 'New Year\'s Holiday'], $newyearsday, false, false); - break; - case 6: // saturday - $newyearsday->add(new DateInterval('P2D')); - $this->calculateHoliday('newYearsHoliday', ['en_AU' => 'New Year\'s Holiday'], $newyearsday, false, false); - break; - } + $date = new DateTime("$this->year-01-26", new DateTimeZone($this->timezone)); + + $this->calculateHoliday('australiaDay', ['en_AU' => 'Australia Day'], $date); } /** @@ -192,7 +192,7 @@ private function calculateAnzacDay(): void private function calculateChristmasDay(): void { $christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone)); - $boxingDay = new DateTime("$this->year-12-26", new DateTimeZone($this->timezone)); + $boxingDay = new DateTime("$this->year-12-26", new DateTimeZone($this->timezone)); $this->calculateHoliday('christmasDay', ['en_AU' => 'Christmas Day'], $christmasDay, false, false); $this->calculateHoliday('secondChristmasDay', ['en_AU' => 'Boxing Day'], $boxingDay, false, false); diff --git a/src/Yasumi/Provider/Australia/ACT.php b/src/Yasumi/Provider/Australia/ACT.php index 0899d2d7c..32c660a45 100644 --- a/src/Yasumi/Provider/Australia/ACT.php +++ b/src/Yasumi/Provider/Australia/ACT.php @@ -1,4 +1,4 @@ -year < 2007) { - $date = new DateTime("third monday of march $this->year", new DateTimeZone($this->timezone)); - } else { - $date = new DateTime("second monday of march $this->year", new DateTimeZone($this->timezone)); - } - $this->addHoliday(new Holiday('canberraDay', ['en_AU' => 'Canberra Day'], $date, $this->locale)); - } - - /** - * Reconciliation Day - * - * @throws \Exception - */ - private function calculateReconciliationDay(): void - { - if ($this->year < 2018) { - return; - } - - $date = new DateTime($this->year . '-05-27', new DateTimeZone($this->timezone)); - $day = (int)$date->format('w'); - if (1 !== $day) { - $date = $date->add(0 === $day ? new DateInterval('P1D') : new DateInterval('P' . (8 - $day) . 'D')); - } - $this->addHoliday(new Holiday('reconciliationDay', ['en_AU' => 'Reconciliation Day'], $date, $this->locale)); - } - - /** - * Labour Day - * - * @throws \Exception - */ - private function calculateLabourDay(): void - { - $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); - - $this->addHoliday(new Holiday('labourDay', ['en_AU' => 'Labour Day'], $date, $this->locale)); - } - - /** - * Easter Saturday. + * Easter Sunday. * * Easter is a festival and holiday celebrating the resurrection of Jesus Christ from the dead. Easter is celebrated * on a date based on a certain number of days after March 21st. The date of Easter Day was defined by the Council @@ -107,10 +61,10 @@ private function calculateLabourDay(): void * * @link http://en.wikipedia.org/wiki/Easter * - * @param int $year the year for which Easter Saturday need to be created + * @param int $year the year for which Easter Saturday need to be created * @param string $timezone the timezone in which Easter Saturday is celebrated - * @param string $locale the locale for which Easter Saturday need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which Easter Saturday need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -119,19 +73,19 @@ private function calculateLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday + private function easterSunday($year, $timezone, $locale, $type = null): Holiday { return new Holiday( - 'easterSaturday', - ['en_AU' => 'Easter Saturday'], - $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), + 'easter', + ['en_AU' => 'Easter Sunday'], + $this->calculateEaster($year, $timezone), $locale, - $type + $type ?? Holiday::TYPE_OFFICIAL ); } /** - * Easter Sunday. + * Easter Saturday. * * Easter is a festival and holiday celebrating the resurrection of Jesus Christ from the dead. Easter is celebrated * on a date based on a certain number of days after March 21st. The date of Easter Day was defined by the Council @@ -139,10 +93,10 @@ private function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE * * @link http://en.wikipedia.org/wiki/Easter * - * @param int $year the year for which Easter Saturday need to be created + * @param int $year the year for which Easter Saturday need to be created * @param string $timezone the timezone in which Easter Saturday is celebrated - * @param string $locale the locale for which Easter Saturday need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which Easter Saturday need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -151,14 +105,14 @@ private function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE * @throws \InvalidArgumentException * @throws \Exception */ - private function easterSunday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday + private function easterSaturday($year, $timezone, $locale, $type = null): Holiday { return new Holiday( - 'easter', - ['en_AU' => 'Easter Sunday'], - $this->calculateEaster($year, $timezone), + 'easterSaturday', + ['en_AU' => 'Easter Saturday'], + $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), $locale, - $type + $type ?? Holiday::TYPE_OFFICIAL ); } @@ -187,4 +141,50 @@ private function calculateQueensBirthday(): void false ); } + + /** + * Labour Day + * + * @throws \Exception + */ + private function calculateLabourDay(): void + { + $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday('labourDay', ['en_AU' => 'Labour Day'], $date, $this->locale)); + } + + /** + * Canberra Day + * + * @throws \Exception + */ + private function calculateCanberraDay(): void + { + if ($this->year < 2007) { + $date = new DateTime("third monday of march $this->year", new DateTimeZone($this->timezone)); + } else { + $date = new DateTime("second monday of march $this->year", new DateTimeZone($this->timezone)); + } + $this->addHoliday(new Holiday('canberraDay', ['en_AU' => 'Canberra Day'], $date, $this->locale)); + } + + /** + * Reconciliation Day + * + * @throws \Exception + */ + private function calculateReconciliationDay(): void + { + if ($this->year < 2018) { + return; + } + + $date = new DateTime($this->year . '-05-27', new DateTimeZone($this->timezone)); + $day = (int)$date->format('w'); + if (1 !== $day) { + $date = $date->add(0 === $day ? new DateInterval('P1D') : new DateInterval('P' . (8 - $day) . 'D')); + } + $this->addHoliday(new Holiday('reconciliationDay', ['en_AU' => 'Reconciliation Day'], $date, $this->locale)); + } } diff --git a/src/Yasumi/Provider/Australia/NSW.php b/src/Yasumi/Provider/Australia/NSW.php index 491a49b1c..f6f076493 100644 --- a/src/Yasumi/Provider/Australia/NSW.php +++ b/src/Yasumi/Provider/Australia/NSW.php @@ -1,4 +1,4 @@ -calculateBankHoliday(); } - /** - * Labour Day - * - * @throws \Exception - */ - private function calculateLabourDay(): void - { - $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); - - $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); - } - /** * Easter Saturday. * @@ -72,10 +60,10 @@ private function calculateLabourDay(): void * * @link http://en.wikipedia.org/wiki/Easter * - * @param int $year the year for which Easter Saturday need to be created + * @param int $year the year for which Easter Saturday need to be created * @param string $timezone the timezone in which Easter Saturday is celebrated - * @param string $locale the locale for which Easter Saturday need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which Easter Saturday need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -84,14 +72,14 @@ private function calculateLabourDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday + private function easterSaturday($year, $timezone, $locale, $type = null): Holiday { return new Holiday( 'easterSaturday', ['en_AU' => 'Easter Saturday'], $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), $locale, - $type + $type ?? Holiday::TYPE_OFFICIAL ); } @@ -120,7 +108,19 @@ private function calculateQueensBirthday(): void false ); } - + + /** + * Labour Day + * + * @throws \Exception + */ + private function calculateLabourDay(): void + { + $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); + } + /** * Bank Holiday. * @@ -132,7 +132,7 @@ private function calculateBankHoliday(): void $this->calculateHoliday( 'bankHoliday', ['en_AU' => 'Bank Holiday'], - new DateTime('first monday of august '. $this->year, new DateTimeZone($this->timezone)), + new DateTime('first monday of august ' . $this->year, new DateTimeZone($this->timezone)), false, false, Holiday::TYPE_BANK diff --git a/src/Yasumi/Provider/Australia/NT.php b/src/Yasumi/Provider/Australia/NT.php index 9f9e76f3e..5fb505c05 100644 --- a/src/Yasumi/Provider/Australia/NT.php +++ b/src/Yasumi/Provider/Australia/NT.php @@ -1,4 +1,4 @@ -calculatePicnicDay(); } - /** - * May Day - * - * @throws \Exception - */ - private function calculateMayDay(): void - { - $date = new DateTime("first monday of may $this->year", new DateTimeZone($this->timezone)); - - $this->addHoliday(new Holiday('mayDay', ['en_AU' => 'May Day'], $date, $this->locale)); - } - - /** - * Picnic Day - * - * @link https://en.wikipedia.org/wiki/Picnic_Day_(Australian_holiday) - * - * @throws \InvalidArgumentException - * @throws \Exception - */ - private function calculatePicnicDay(): void - { - $this->calculateHoliday( - 'picnicDay', - ['en_AU' => 'Picnic Day'], - new DateTime('first monday of august '. $this->year, new DateTimeZone($this->timezone)), - false, - false - ); - } - /** * Easter Saturday. * @@ -90,10 +59,10 @@ private function calculatePicnicDay(): void * * @link http://en.wikipedia.org/wiki/Easter * - * @param int $year the year for which Easter Saturday need to be created + * @param int $year the year for which Easter Saturday need to be created * @param string $timezone the timezone in which Easter Saturday is celebrated - * @param string $locale the locale for which Easter Saturday need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which Easter Saturday need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -102,14 +71,14 @@ private function calculatePicnicDay(): void * @throws \InvalidArgumentException * @throws \Exception */ - private function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday + private function easterSaturday($year, $timezone, $locale, $type = null): Holiday { return new Holiday( 'easterSaturday', ['en_AU' => 'Easter Saturday'], $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), $locale, - $type + $type ?? Holiday::TYPE_OFFICIAL ); } @@ -138,4 +107,35 @@ private function calculateQueensBirthday(): void false ); } + + /** + * May Day + * + * @throws \Exception + */ + private function calculateMayDay(): void + { + $date = new DateTime("first monday of may $this->year", new DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday('mayDay', ['en_AU' => 'May Day'], $date, $this->locale)); + } + + /** + * Picnic Day + * + * @link https://en.wikipedia.org/wiki/Picnic_Day_(Australian_holiday) + * + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function calculatePicnicDay(): void + { + $this->calculateHoliday( + 'picnicDay', + ['en_AU' => 'Picnic Day'], + new DateTime('first monday of august ' . $this->year, new DateTimeZone($this->timezone)), + false, + false + ); + } } diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index bd5169f6c..eb740ee94 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -1,4 +1,4 @@ -calculateLabourDay(); } - /** - * Labour Day - * - * @throws \Exception - */ - private function calculateLabourDay(): void - { - if (2013 === $this->year || 2014 === $this->year || 2015 === $this->year) { - $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); - } else { - $date = new DateTime("first monday of may $this->year", new DateTimeZone($this->timezone)); - } - - $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); - } - /** * Queens Birthday. * @@ -98,4 +82,20 @@ private function calculateQueensBirthday(): void ); } } + + /** + * Labour Day + * + * @throws \Exception + */ + private function calculateLabourDay(): void + { + if (2013 === $this->year || 2014 === $this->year || 2015 === $this->year) { + $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); + } else { + $date = new DateTime("first monday of may $this->year", new DateTimeZone($this->timezone)); + } + + $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); + } } diff --git a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php index 9bbcc9ee3..efdccc17a 100644 --- a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php +++ b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php @@ -1,4 +1,4 @@ -calculatePeoplesDay(); } - + /** * Ekka People's Day. * diff --git a/src/Yasumi/Provider/Australia/SA.php b/src/Yasumi/Provider/Australia/SA.php index 94344fcfe..39d684011 100644 --- a/src/Yasumi/Provider/Australia/SA.php +++ b/src/Yasumi/Provider/Australia/SA.php @@ -1,4 +1,4 @@ -calculateQueensBirthday(); $this->calculateLabourDay(); $this->calculateAdelaideCupDay(); - + // South Australia have Proclamation Day instead of Boxing Day, but the date definition is slightly different, // so we have to rework everything here... $this->removeHoliday('christmasDay'); @@ -59,36 +59,61 @@ public function initialize(): void } /** - * Proclamation Day + * Easter Saturday. + * + * Easter is a festival and holiday celebrating the resurrection of Jesus Christ from the dead. Easter is celebrated + * on a date based on a certain number of days after March 21st. The date of Easter Day was defined by the Council + * of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the Spring Equinox. + * + * @link http://en.wikipedia.org/wiki/Easter * + * @param int $year the year for which Easter Saturday need to be created + * @param string $timezone the timezone in which Easter Saturday is celebrated + * @param string $locale the locale for which Easter Saturday need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. + * + * @return Holiday + * + * @throws UnknownLocaleException + * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateProclamationDay(): void + private function easterSaturday($year, $timezone, $locale, $type = null): Holiday { - $christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone)); - $this->calculateHoliday('christmasDay', ['en_AU' => 'Christmas Day'], $christmasDay, false, false); - switch ($christmasDay->format('w')) { - case 0: // sunday - $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('christmasHoliday', ['en_AU' => 'Christmas Holiday'], $christmasDay, false, false); - $proclamationDay = $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('proclamationDay', ['en_AU' => 'Proclamation Day'], $proclamationDay, false, false); - break; - case 5: // friday - $proclamationDay = $christmasDay->add(new DateInterval('P3D')); - $this->calculateHoliday('proclamationDay', ['en_AU' => 'Proclamation Day'], $proclamationDay, false, false); - break; - case 6: // saturday - $christmasDay->add(new DateInterval('P2D')); - $this->calculateHoliday('christmasHoliday', ['en_AU' => 'Christmas Holiday'], $christmasDay, false, false); - $proclamationDay = $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('proclamationDay', ['en_AU' => 'Proclamation Day'], $proclamationDay, false, false); - break; - default: // monday-thursday - $proclamationDay = $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('proclamationDay', ['en_AU' => 'Proclamation Day'], $proclamationDay, false, false); - break; - } + return new Holiday( + 'easterSaturday', + ['en_AU' => 'Easter Saturday'], + $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), + $locale, + $type ?? Holiday::TYPE_OFFICIAL + ); + } + + /** + * Queens Birthday. + * + * The Queen's Birthday is an Australian public holiday but the date varies across + * states and territories. Australia celebrates this holiday because it is a constitutional + * monarchy, with the English monarch as head of state. + * + * Her actual birthday is on April 21, but it's celebrated as a public holiday on the second Monday of June. + * (Except QLD & WA) + * + * @link https://www.timeanddate.com/holidays/australia/queens-birthday + * + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function calculateQueensBirthday(): void + { + $this->calculateHoliday( + 'queensBirthday', + ['en_AU' => "Queen's Birthday"], + new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), + false, + false + ); } /** @@ -133,62 +158,37 @@ private function calculateAdelaideCupDay(): void } } } - - /** - * Easter Saturday. - * - * Easter is a festival and holiday celebrating the resurrection of Jesus Christ from the dead. Easter is celebrated - * on a date based on a certain number of days after March 21st. The date of Easter Day was defined by the Council - * of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the Spring Equinox. - * - * @link http://en.wikipedia.org/wiki/Easter - * - * @param int $year the year for which Easter Saturday need to be created - * @param string $timezone the timezone in which Easter Saturday is celebrated - * @param string $locale the locale for which Easter Saturday need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, - * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. - * - * @return Holiday - * - * @throws UnknownLocaleException - * @throws \InvalidArgumentException - * @throws \Exception - */ - private function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday - { - return new Holiday( - 'easterSaturday', - ['en_AU' => 'Easter Saturday'], - $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), - $locale, - $type - ); - } /** - * Queens Birthday. - * - * The Queen's Birthday is an Australian public holiday but the date varies across - * states and territories. Australia celebrates this holiday because it is a constitutional - * monarchy, with the English monarch as head of state. - * - * Her actual birthday is on April 21, but it's celebrated as a public holiday on the second Monday of June. - * (Except QLD & WA) - * - * @link https://www.timeanddate.com/holidays/australia/queens-birthday + * Proclamation Day * - * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateQueensBirthday(): void + private function calculateProclamationDay(): void { - $this->calculateHoliday( - 'queensBirthday', - ['en_AU' => "Queen's Birthday"], - new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), - false, - false - ); + $christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone)); + $this->calculateHoliday('christmasDay', ['en_AU' => 'Christmas Day'], $christmasDay, false, false); + switch ($christmasDay->format('w')) { + case 0: // sunday + $christmasDay->add(new DateInterval('P1D')); + $this->calculateHoliday('christmasHoliday', ['en_AU' => 'Christmas Holiday'], $christmasDay, false, false); + $proclamationDay = $christmasDay->add(new DateInterval('P1D')); + $this->calculateHoliday('proclamationDay', ['en_AU' => 'Proclamation Day'], $proclamationDay, false, false); + break; + case 5: // friday + $proclamationDay = $christmasDay->add(new DateInterval('P3D')); + $this->calculateHoliday('proclamationDay', ['en_AU' => 'Proclamation Day'], $proclamationDay, false, false); + break; + case 6: // saturday + $christmasDay->add(new DateInterval('P2D')); + $this->calculateHoliday('christmasHoliday', ['en_AU' => 'Christmas Holiday'], $christmasDay, false, false); + $proclamationDay = $christmasDay->add(new DateInterval('P1D')); + $this->calculateHoliday('proclamationDay', ['en_AU' => 'Proclamation Day'], $proclamationDay, false, false); + break; + default: // monday-thursday + $proclamationDay = $christmasDay->add(new DateInterval('P1D')); + $this->calculateHoliday('proclamationDay', ['en_AU' => 'Proclamation Day'], $proclamationDay, false, false); + break; + } } } diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index 401b5b6d3..850cad0e0 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -1,4 +1,4 @@ -addHoliday(new Holiday('eightHourDay', ['en_AU' => 'Eight Hour Day'], $date, $this->locale)); } - + /** * Queens Birthday. * @@ -85,7 +85,7 @@ private function calculateQueensBirthday(): void false ); } - + /** * Recreation Day * diff --git a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php index a69522f3e..164fd339e 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php +++ b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php @@ -1,4 +1,4 @@ -year", new DateTimeZone($this->timezone)); - - $this->addHoliday(new Holiday('labourDay', ['en_AU' => 'Labour Day'], $date, $this->locale)); + return new Holiday( + 'easter', + ['en_AU' => 'Easter Sunday'], + $this->calculateEaster($year, $timezone), + $locale, + $type ?? Holiday::TYPE_OFFICIAL + ); } /** - * Melbourne Cup Day + * Easter Saturday. * + * Easter is a festival and holiday celebrating the resurrection of Jesus Christ from the dead. Easter is celebrated + * on a date based on a certain number of days after March 21st. The date of Easter Day was defined by the Council + * of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the Spring Equinox. + * + * @link http://en.wikipedia.org/wiki/Easter + * + * @param int $year the year for which Easter Saturday need to be created + * @param string $timezone the timezone in which Easter Saturday is celebrated + * @param string $locale the locale for which Easter Saturday need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. + * + * @return Holiday + * + * @throws UnknownLocaleException + * @throws \InvalidArgumentException * @throws \Exception */ - private function calculateMelbourneCupDay(): void + private function easterSaturday($year, $timezone, $locale, $type = null): Holiday { - $date = new DateTime('first Tuesday of November' . " $this->year", new DateTimeZone($this->timezone)); - - $this->addHoliday(new Holiday('melbourneCup', ['en_AU' => 'Melbourne Cup'], $date, $this->locale)); + return new Holiday( + 'easterSaturday', + ['en_AU' => 'Easter Saturday'], + $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), + $locale, + $type ?? Holiday::TYPE_OFFICIAL + ); } /** - * AFL Grand Final Day + * Labour Day * * @throws \Exception */ - private function calculateAFLGrandFinalDay(): void + private function calculateLabourDay(): void { - switch ($this->year) { - case 2015: - $aflGrandFinalFriday = '2015-10-02'; - break; - case 2016: - $aflGrandFinalFriday = '2016-09-30'; - break; - case 2017: - $aflGrandFinalFriday = '2017-09-29'; - break; - case 2018: - $aflGrandFinalFriday = '2018-09-28'; - break; - default: - return; - } - - $date = new DateTime($aflGrandFinalFriday, new DateTimeZone($this->timezone)); + $date = new DateTime("second monday of march $this->year", new DateTimeZone($this->timezone)); - $this->addHoliday(new Holiday( - 'aflGrandFinalFriday', - ['en_AU' => 'AFL Grand Final Friday'], - $date, - $this->locale - )); + $this->addHoliday(new Holiday('labourDay', ['en_AU' => 'Labour Day'], $date, $this->locale)); } /** @@ -137,66 +155,48 @@ private function calculateQueensBirthday(): void } /** - * Easter Saturday. - * - * Easter is a festival and holiday celebrating the resurrection of Jesus Christ from the dead. Easter is celebrated - * on a date based on a certain number of days after March 21st. The date of Easter Day was defined by the Council - * of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the Spring Equinox. - * - * @link http://en.wikipedia.org/wiki/Easter - * - * @param int $year the year for which Easter Saturday need to be created - * @param string $timezone the timezone in which Easter Saturday is celebrated - * @param string $locale the locale for which Easter Saturday need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, - * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. - * - * @return Holiday + * Melbourne Cup Day * - * @throws UnknownLocaleException - * @throws \InvalidArgumentException * @throws \Exception */ - private function easterSaturday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday + private function calculateMelbourneCupDay(): void { - return new Holiday( - 'easterSaturday', - ['en_AU' => 'Easter Saturday'], - $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), - $locale, - $type - ); + $date = new DateTime('first Tuesday of November' . " $this->year", new DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday('melbourneCup', ['en_AU' => 'Melbourne Cup'], $date, $this->locale)); } - + /** - * Easter Sunday. - * - * Easter is a festival and holiday celebrating the resurrection of Jesus Christ from the dead. Easter is celebrated - * on a date based on a certain number of days after March 21st. The date of Easter Day was defined by the Council - * of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the Spring Equinox. - * - * @link http://en.wikipedia.org/wiki/Easter - * - * @param int $year the year for which Easter Saturday need to be created - * @param string $timezone the timezone in which Easter Saturday is celebrated - * @param string $locale the locale for which Easter Saturday need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, - * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. - * - * @return Holiday + * AFL Grand Final Day * - * @throws UnknownLocaleException - * @throws \InvalidArgumentException * @throws \Exception */ - private function easterSunday($year, $timezone, $locale, $type = Holiday::TYPE_OFFICIAL): Holiday + private function calculateAFLGrandFinalDay(): void { - return new Holiday( - 'easter', - ['en_AU' => 'Easter Sunday'], - $this->calculateEaster($year, $timezone), - $locale, - $type - ); + switch ($this->year) { + case 2015: + $aflGrandFinalFriday = '2015-10-02'; + break; + case 2016: + $aflGrandFinalFriday = '2016-09-30'; + break; + case 2017: + $aflGrandFinalFriday = '2017-09-29'; + break; + case 2018: + $aflGrandFinalFriday = '2018-09-28'; + break; + default: + return; + } + + $date = new DateTime($aflGrandFinalFriday, new DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday( + 'aflGrandFinalFriday', + ['en_AU' => 'AFL Grand Final Friday'], + $date, + $this->locale + )); } } diff --git a/src/Yasumi/Provider/Australia/WA.php b/src/Yasumi/Provider/Australia/WA.php index ee7e04516..15191f29a 100644 --- a/src/Yasumi/Provider/Australia/WA.php +++ b/src/Yasumi/Provider/Australia/WA.php @@ -1,4 +1,4 @@ -calculateWesternAustraliaDay(); } - /** - * Labour Day - * - * @throws \Exception - */ - private function calculateLabourDay(): void - { - $date = new DateTime("first monday of march $this->year", new DateTimeZone($this->timezone)); - - $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); - } - - /** - * Western Australia Day - * - * @link https://en.wikipedia.org/wiki/Western_Australia_Day - * - * @throws \InvalidArgumentException - * @throws \Exception - */ - private function calculateWesternAustraliaDay(): void - { - $this->calculateHoliday( - 'westernAustraliaDay', - ['en_AU' => 'Western Australia Day'], - new DateTime('first monday of june ' . $this->year, new DateTimeZone($this->timezone)), - false, - false - ); - } - /** * Queens Birthday. * @@ -122,4 +91,35 @@ private function calculateQueensBirthday(): void ); } } + + /** + * Labour Day + * + * @throws \Exception + */ + private function calculateLabourDay(): void + { + $date = new DateTime("first monday of march $this->year", new DateTimeZone($this->timezone)); + + $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); + } + + /** + * Western Australia Day + * + * @link https://en.wikipedia.org/wiki/Western_Australia_Day + * + * @throws \InvalidArgumentException + * @throws \Exception + */ + private function calculateWesternAustraliaDay(): void + { + $this->calculateHoliday( + 'westernAustraliaDay', + ['en_AU' => 'Western Australia Day'], + new DateTime('first monday of june ' . $this->year, new DateTimeZone($this->timezone)), + false, + false + ); + } } diff --git a/src/Yasumi/Provider/Austria.php b/src/Yasumi/Provider/Austria.php index 80f76503e..57df71a06 100644 --- a/src/Yasumi/Provider/Austria.php +++ b/src/Yasumi/Provider/Austria.php @@ -1,4 +1,4 @@ -calculateEaster($year, $timezone), $locale, $type); } + /** + * Calculates the date for Easter. + * + * Easter is a festival and holiday celebrating the resurrection of Jesus Christ from the dead. Easter is celebrated + * on a date based on a certain number of days after March 21st. + * + * This function uses the standard PHP 'easter_days' function if the calendar extension is enabled. In case the + * calendar function is not enabled, a fallback calculation has been implemented that is based on the same + * 'easter_days' c function. + * + * Note: In calendrical calculations, frequently operations called integer division are used. + * + * @param int $year the year for which Easter needs to be calculated + * @param string $timezone the timezone in which Easter is celebrated + * + * @return DateTime date of Easter + * @throws \Exception + * @see easter_days + * + * @link https://github.com/php/php-src/blob/c8aa6f3a9a3d2c114d0c5e0c9fdd0a465dbb54a5/ext/calendar/easter.c + * @link http://www.gmarts.org/index.php?go=415#EasterMallen + * @link http://www.tondering.dk/claus/cal/easter.php + * + */ + protected function calculateEaster(int $year, string $timezone): DateTime + { + if (\extension_loaded('calendar')) { + $easter_days = \easter_days($year); + } else { + $golden = ($year % 19) + 1; // The Golden Number + + // The Julian calendar applies to the original method from 326AD. The Gregorian calendar was first + // introduced in October 1582 in Italy. Easter algorithms using the Gregorian calendar apply to years + // 1583 AD to 4099 (A day adjustment is required in or shortly after 4100 AD). + // After 1752, most western churches have adopted the current algorithm. + if ($year <= 1752) { + $dom = ($year + (int)($year / 4) + 5) % 7; // The 'Dominical number' - finding a Sunday + if ($dom < 0) { + $dom += 7; + } + + $pfm = (3 - (11 * $golden) - 7) % 30; // Uncorrected date of the Paschal full moon + if ($pfm < 0) { + $pfm += 30; + } + } else { + $dom = ($year + (int)($year / 4) - (int)($year / 100) + (int)($year / 400)) % 7; // The 'Dominical number' - finding a Sunday + if ($dom < 0) { + $dom += 7; + } + + $solar = (int)(($year - 1600) / 100) - (int)(($year - 1600) / 400); // The solar correction + $lunar = (int)(((int)(($year - 1400) / 100) * 8) / 25); // The lunar correction + + $pfm = (3 - (11 * $golden) + $solar - $lunar) % 30; // Uncorrected date of the Paschal full moon + if ($pfm < 0) { + $pfm += 30; + } + } + + // Corrected date of the Paschal full moon, - days after 21st March + if ((29 === $pfm) || (28 === $pfm && $golden > 11)) { + --$pfm; + } + + $tmp = (4 - $pfm - $dom) % 7; + if ($tmp < 0) { + $tmp += 7; + } + + $easter_days = $pfm + $tmp + 1; // Easter as the number of days after 21st March + } + + $easter = new DateTime("$year-3-21", new DateTimeZone($timezone)); + $easter->add(new DateInterval('P' . $easter_days . 'D')); + + return $easter; + } + /** * Easter Monday. * @@ -63,10 +142,10 @@ public function easter(int $year, string $timezone, string $locale, string $type * * @link http://en.wikipedia.org/wiki/Easter * - * @param int $year the year for which Easter Monday need to be created + * @param int $year the year for which Easter Monday need to be created * @param string $timezone the timezone in which Easter Monday is celebrated - * @param string $locale the locale for which Easter Monday need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which Easter Monday need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -100,10 +179,10 @@ public function easterMonday( * * @link http://en.wikipedia.org/wiki/Feast_of_the_Ascension * - * @param int $year the year for which Ascension need to be created + * @param int $year the year for which Ascension need to be created * @param string $timezone the timezone in which Ascension is celebrated - * @param string $locale the locale for which Ascension need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which Ascension need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -134,10 +213,10 @@ public function ascensionDay( * Pentecost a feast commemorating the descent of the Holy Spirit upon the Apostles and other followers of Jesus * Christ. It is celebrated 49 days after Easter and always takes place on Sunday. * - * @param int $year the year for which Pentecost need to be created + * @param int $year the year for which Pentecost need to be created * @param string $timezone the timezone in which Pentecost is celebrated - * @param string $locale the locale for which Pentecost need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which Pentecost need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -168,10 +247,10 @@ public function pentecost( * Pentecost a feast commemorating the descent of the Holy Spirit upon the Apostles and other followers of Jesus * Christ. It is celebrated 49 days after Easter and always takes place on Sunday. * - * @param int $year the year for which Pentecost (Whitmonday) need to be created + * @param int $year the year for which Pentecost (Whitmonday) need to be created * @param string $timezone the timezone in which Pentecost (Whitmonday) is celebrated - * @param string $locale the locale for which Pentecost (Whitmonday) need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which Pentecost (Whitmonday) need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -205,10 +284,10 @@ public function pentecostMonday( * The Most Holy Body and Blood of Christ is not a holy day of obligation, it is assigned to the Sunday after the * Most Holy Trinity as its proper day". This is 60 days after Easter. * - * @param int $year the year for which Corpus Christi need to be created + * @param int $year the year for which Corpus Christi need to be created * @param string $timezone the timezone in which Corpus Christi is celebrated - * @param string $locale the locale for which Corpus Christi need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which Corpus Christi need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default a type of 'other' is considered. * * @return Holiday @@ -243,10 +322,10 @@ public function corpusChristi( * * @link https://en.wikipedia.org/wiki/Christmas_Eve * - * @param int $year the year for which Christmas Eve needs to be created + * @param int $year the year for which Christmas Eve needs to be created * @param string $timezone the timezone in which Christmas Eve is celebrated - * @param string $locale the locale for which Christmas Eve need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which Christmas Eve need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default observance is considered. * * @return Holiday @@ -278,10 +357,10 @@ public function christmasEve( * commemorating the birth of Jesus Christ, observed most commonly on December 25 as a religious and cultural * celebration among billions of people around the world. * - * @param int $year the year for which Christmas Day need to be created + * @param int $year the year for which Christmas Day need to be created * @param string $timezone the timezone in which Christmas Day is celebrated - * @param string $locale the locale for which Christmas Day need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which Christmas Day need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -313,10 +392,10 @@ public function christmasDay( * commemorating the birth of Jesus Christ, observed most commonly on December 25 as a religious and cultural * celebration among billions of people around the world. * - * @param int $year the year for which the Second Christmas Day / Boxing Day need to be created + * @param int $year the year for which the Second Christmas Day / Boxing Day need to be created * @param string $timezone the timezone in which the Second Christmas Day / Boxing Day is celebrated - * @param string $locale the locale for which the Second Christmas Day / Boxing Day need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which the Second Christmas Day / Boxing Day need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -351,10 +430,10 @@ public function secondChristmasDay( * * @link http://en.wikipedia.org/wiki/All_Saints%27_Day * - * @param int $year the year for which All Saints' Day need to be created + * @param int $year the year for which All Saints' Day need to be created * @param string $timezone the timezone in which All Saints' Day is celebrated - * @param string $locale the locale for which All Saints' Day need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which All Saints' Day need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -382,10 +461,10 @@ public function allSaintsDay( * * @link http://en.wikipedia.org/wiki/Assumption_of_Mary * - * @param int $year the year for which the day of the Assumption of Mary need to be created + * @param int $year the year for which the day of the Assumption of Mary need to be created * @param string $timezone the timezone in which the day of the Assumption of Mary is celebrated - * @param string $locale the locale for which the day of the Assumption of Mary need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which the day of the Assumption of Mary need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -417,10 +496,10 @@ public function assumptionOfMary( * Calvary. The holiday is observed during Holy Week as part of the Paschal Triduum on the Friday preceding Easter * Sunday, and may coincide with the Jewish observance of Passover. * - * @param int $year the year for which Good Friday need to be created + * @param int $year the year for which Good Friday need to be created * @param string $timezone the timezone in which Good Friday is celebrated - * @param string $locale the locale for which Good Friday need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which Good Friday need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -456,10 +535,10 @@ public function goodFriday( * * @link http://en.wikipedia.org/wiki/Epiphany_(holiday) * - * @param int $year the year for which Epiphany need to be created + * @param int $year the year for which Epiphany need to be created * @param string $timezone the timezone in which Epiphany is celebrated - * @param string $locale the locale for which Epiphany need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which Epiphany need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -487,10 +566,10 @@ public function epiphany( * * @link http://en.wikipedia.org/wiki/Ash_Wednesday * - * @param int $year the year for which Ash Wednesday need to be created + * @param int $year the year for which Ash Wednesday need to be created * @param string $timezone the timezone in which Ash Wednesday is celebrated - * @param string $locale the locale for which Ash Wednesday need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which Ash Wednesday need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -525,10 +604,10 @@ public function ashWednesday( * * @link http://en.wikipedia.org/wiki/Feast_of_the_Immaculate_Conception * - * @param int $year the year for which Immaculate Conception need to be created + * @param int $year the year for which Immaculate Conception need to be created * @param string $timezone the timezone in which Immaculate Conception is celebrated - * @param string $locale the locale for which Immaculate Conception need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which Immaculate Conception need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -564,10 +643,10 @@ public function immaculateConception( * * @link http://en.wikipedia.org/wiki/St._Stephen%27s_Day * - * @param int $year the year for which St. Stephen's Day need to be created + * @param int $year the year for which St. Stephen's Day need to be created * @param string $timezone the timezone in which St. Stephen's Day is celebrated - * @param string $locale the locale for which St. Stephen's Day need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which St. Stephen's Day need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -603,10 +682,10 @@ public function stStephensDay( * * @link http://en.wikipedia.org/wiki/St_Joseph's_Day * - * @param int $year the year for which St. Joseph's Day need to be created + * @param int $year the year for which St. Joseph's Day need to be created * @param string $timezone the timezone in which St. Joseph's Day is celebrated - * @param string $locale the locale for which St. Joseph's Day need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which St. Joseph's Day need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -635,10 +714,10 @@ public function stJosephsDay( * * @link http://en.wikipedia.org/wiki/Maundy_Thursday * - * @param int $year the year for which Maundy Thursday need to be created + * @param int $year the year for which Maundy Thursday need to be created * @param string $timezone the timezone in which Maundy Thursday is celebrated - * @param string $locale the locale for which Maundy Thursday need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which Maundy Thursday need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -673,10 +752,10 @@ public function maundyThursday( * * @link http://en.wikipedia.org/wiki/St_George%27s_Day * - * @param int $year the year for which St. George's Day need to be created + * @param int $year the year for which St. George's Day need to be created * @param string $timezone the timezone in which St. George's Day is celebrated - * @param string $locale the locale for which St. George's Day need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which St. George's Day need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -706,10 +785,10 @@ public function stGeorgesDay( * * @link https://en.wikipedia.org/wiki/Nativity_of_St_John_the_Baptist * - * @param int $year the year for which St. John's Day need to be created + * @param int $year the year for which St. John's Day need to be created * @param string $timezone the timezone in which St. John's Day is celebrated - * @param string $locale the locale for which St. John's Day need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which St. John's Day need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -739,10 +818,10 @@ public function stJohnsDay( * * @link https://en.wikipedia.org/wiki/Annunciation * - * @param int $year the year for which the Annunciation needs to be created + * @param int $year the year for which the Annunciation needs to be created * @param string $timezone the timezone in which the Annunciation is celebrated - * @param string $locale the locale for which the Annunciation need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which the Annunciation need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -770,7 +849,7 @@ public function annunciation( /** * Calculate the Easter date for Orthodox churches. * - * @param int $year the year for which Easter needs to be calculated + * @param int $year the year for which Easter needs to be calculated * @param string $timezone the timezone in which Easter is celebrated * * @return DateTime date of Orthodox Easter @@ -781,13 +860,13 @@ public function annunciation( */ public function calculateOrthodoxEaster(int $year, string $timezone): DateTime { - $a = $year % 4; - $b = $year % 7; - $c = $year % 19; - $d = (19 * $c + 15) % 30; - $e = (2 * $a + 4 * $b - $d + 34) % 7; + $a = $year % 4; + $b = $year % 7; + $c = $year % 19; + $d = (19 * $c + 15) % 30; + $e = (2 * $a + 4 * $b - $d + 34) % 7; $month = \floor(($d + $e + 114) / 31); - $day = (($d + $e + 114) % 31) + 1; + $day = (($d + $e + 114) % 31) + 1; return (new DateTime("$year-$month-$day", new DateTimeZone($timezone)))->add(new DateInterval('P13D')); } @@ -807,10 +886,10 @@ public function calculateOrthodoxEaster(int $year, string $timezone): DateTime * @link https://en.wikipedia.org/wiki/Reformation_Day * @link https://de.wikipedia.org/wiki/Reformationstag#Ursprung_und_Geschichte * - * @param int $year the year for which St. John's Day need to be created + * @param int $year the year for which St. John's Day need to be created * @param string $timezone the timezone in which St. John's Day is celebrated - * @param string $locale the locale for which St. John's Day need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which St. John's Day need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday @@ -834,83 +913,4 @@ public function reformationDay( $type ); } - - /** - * Calculates the date for Easter. - * - * Easter is a festival and holiday celebrating the resurrection of Jesus Christ from the dead. Easter is celebrated - * on a date based on a certain number of days after March 21st. - * - * This function uses the standard PHP 'easter_days' function if the calendar extension is enabled. In case the - * calendar function is not enabled, a fallback calculation has been implemented that is based on the same - * 'easter_days' c function. - * - * Note: In calendrical calculations, frequently operations called integer division are used. - * - * @param int $year the year for which Easter needs to be calculated - * @param string $timezone the timezone in which Easter is celebrated - * - * @return DateTime date of Easter - * @throws \Exception - * @see easter_days - * - * @link https://github.com/php/php-src/blob/c8aa6f3a9a3d2c114d0c5e0c9fdd0a465dbb54a5/ext/calendar/easter.c - * @link http://www.gmarts.org/index.php?go=415#EasterMallen - * @link http://www.tondering.dk/claus/cal/easter.php - * - */ - protected function calculateEaster(int $year, string $timezone): DateTime - { - if (\extension_loaded('calendar')) { - $easter_days = \easter_days($year); - } else { - $golden = ($year % 19) + 1; // The Golden Number - - // The Julian calendar applies to the original method from 326AD. The Gregorian calendar was first - // introduced in October 1582 in Italy. Easter algorithms using the Gregorian calendar apply to years - // 1583 AD to 4099 (A day adjustment is required in or shortly after 4100 AD). - // After 1752, most western churches have adopted the current algorithm. - if ($year <= 1752) { - $dom = ($year + (int)($year / 4) + 5) % 7; // The 'Dominical number' - finding a Sunday - if ($dom < 0) { - $dom += 7; - } - - $pfm = (3 - (11 * $golden) - 7) % 30; // Uncorrected date of the Paschal full moon - if ($pfm < 0) { - $pfm += 30; - } - } else { - $dom = ($year + (int)($year / 4) - (int)($year / 100) + (int)($year / 400)) % 7; // The 'Dominical number' - finding a Sunday - if ($dom < 0) { - $dom += 7; - } - - $solar = (int)(($year - 1600) / 100) - (int)(($year - 1600) / 400); // The solar correction - $lunar = (int)(((int)(($year - 1400) / 100) * 8) / 25); // The lunar correction - - $pfm = (3 - (11 * $golden) + $solar - $lunar) % 30; // Uncorrected date of the Paschal full moon - if ($pfm < 0) { - $pfm += 30; - } - } - - // Corrected date of the Paschal full moon, - days after 21st March - if ((29 === $pfm) || (28 === $pfm && $golden > 11)) { - --$pfm; - } - - $tmp = (4 - $pfm - $dom) % 7; - if ($tmp < 0) { - $tmp += 7; - } - - $easter_days = $pfm + $tmp + 1; // Easter as the number of days after 21st March - } - - $easter = new DateTime("$year-3-21", new DateTimeZone($timezone)); - $easter->add(new DateInterval('P' . $easter_days . 'D')); - - return $easter; - } } diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index ba770b49d..3902f9491 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -1,4 +1,4 @@ -calculateSummerWinterTime($year, $timezone, true); + + if ($date) { + return new Holiday( + 'summerTime', + [], + $date, + $locale, + $type ?? Holiday::TYPE_SEASON + ); + } + + return null; + } + /** * Calculates daylight saving time transitions. * @@ -447,9 +481,9 @@ public function internationalWomensDay( * On the northern hemisphere, summer time starts around March/April. On the southern hemisphere it happens 6 * months later. * - * @param int $year the year for which Easter needs to be calculated + * @param int $year the year for which Easter needs to be calculated * @param string $timezone the timezone in which Easter is celebrated - * @param bool $summer whether to calculate the start of summer or winter time + * @param bool $summer whether to calculate the start of summer or winter time * * @return DateTime|null A DateTime object representing the summer or winter transition time for the given * timezone. If no transition time is found, a null value is returned. @@ -474,49 +508,15 @@ protected function calculateSummerWinterTime($year, $timezone, $summer): ?DateTi return null; } - /** - * The beginning of summer time. - * - * Summer time is also known as daylight save time. - * - * @param int $year the year for which summer time need to be created - * @param string $timezone the timezone in which summer time transition occurs - * @param string $locale the locale for which summer time need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, - * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. - * - * @return Holiday|null - * - * @throws UnknownLocaleException - * @throws \InvalidArgumentException - * @throws \Exception - */ - public function summerTime($year, $timezone, $locale, $type = Holiday::TYPE_SEASON): ?Holiday - { - $date = $this->calculateSummerWinterTime($year, $timezone, true); - - if ($date) { - return new Holiday( - 'summerTime', - [], - $date, - $locale, - $type - ); - } - - return null; - } - /** * The beginning of winter time. * * Winter time is also known as standard time. * - * @param int $year the year for which summer time need to be created + * @param int $year the year for which summer time need to be created * @param string $timezone the timezone in which summer time transition occurs - * @param string $locale the locale for which summer time need to be displayed in. - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, + * @param string $locale the locale for which summer time need to be displayed in. + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, TYPE_OBSERVANCE, * TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default an official holiday is considered. * * @return Holiday|null @@ -525,7 +525,7 @@ public function summerTime($year, $timezone, $locale, $type = Holiday::TYPE_SEAS * @throws \InvalidArgumentException * @throws \Exception */ - public function winterTime($year, $timezone, $locale, $type = Holiday::TYPE_SEASON): ?Holiday + public function winterTime($year, $timezone, $locale, $type = null): ?Holiday { $date = $this->calculateSummerWinterTime($year, $timezone, false); @@ -535,7 +535,7 @@ public function winterTime($year, $timezone, $locale, $type = Holiday::TYPE_SEAS [], $date, $locale, - $type + $type = Holiday::TYPE_SEASON ); } diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index 0c44c23af..067fde886 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -1,4 +1,4 @@ -year < 1955) { - $this->addHoliday(new Holiday( - 'stJohnsDay', - [], - new DateTime("$this->year-6-24", new DateTimeZone($this->timezone)), - $this->locale - )); - } else { - $this->addHoliday(new Holiday( - 'stJohnsDay', - [], - new DateTime("$this->year-6-20 this saturday", new DateTimeZone($this->timezone)), - $this->locale - )); - } + $stJohnsDay = ($this->year < 1955) ? "$this->year-6-24" : "$this->year-6-20 this saturday"; + + $this->addHoliday(new Holiday( + 'stJohnsDay', + [], + new DateTime($stJohnsDay, new DateTimeZone($this->timezone)), + $this->locale + )); } /** diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php index 496b99cfb..4935c9390 100755 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -1,4 +1,4 @@ -year >=2020) { + if ($this->year >= 2020) { $emperorsBirthday = "$this->year-2-23"; - } elseif ($this->year >= 1989 && $this->year <2019) { + } elseif ($this->year >= 1989 && $this->year < 2019) { $emperorsBirthday = "$this->year-12-23"; - } elseif ($this->year >= 1949 && $this->year <1988) { + } elseif ($this->year >= 1949 && $this->year < 1988) { $emperorsBirthday = "$this->year-4-29"; } @@ -243,42 +244,6 @@ private function calculateEmperorsBirthday(): void } } - /** - * Coronation Day. Coronation Day is The new Emperor Coronation. - * This holiday is only 2019. - * - * @throws \Exception - */ - private function calculateCoronationDay(): void - { - if (2019 === $this->year) { - $this->addHoliday(new Holiday( - 'coronationDay', - ['en_US' => 'Coronation Day', 'ja_JP' => '即位の日'], - new DateTime("$this->year-5-1", new DateTimeZone($this->timezone)), - $this->locale - )); - } - } - - /** - * Enthronement Proclamation Ceremony. Enthronement Proclamation Ceremony is The New Emperor enthronement ceremony. - * This holiday only 2019. - * - * @throws \Exception - */ - private function calculateEnthronementProclamationCeremony(): void - { - if (2019 === $this->year) { - $this->addHoliday(new Holiday( - 'enthronementProclamationCeremony', - ['en_US' => 'Enthronement Proclamation Ceremony', 'ja_JP' => '即位礼正殿の儀'], - new DateTime("$this->year-10-22", new DateTimeZone($this->timezone)), - $this->locale - )); - } - } - /** * Calculate Vernal Equinox Day. * @@ -495,9 +460,9 @@ private function calculateSportsDay(): void $date = new DateTime("$this->year-10-10", new DateTimeZone($this->timezone)); } - $holiday_name =['en_US' => 'Health And Sports Day', 'ja_JP' => '体育の日']; + $holiday_name = ['en_US' => 'Health And Sports Day', 'ja_JP' => '体育の日']; if ($this->year >= 2020) { - $holiday_name =['en_US' => 'Sports Day', 'ja_JP' => 'スポーツの日']; + $holiday_name = ['en_US' => 'Sports Day', 'ja_JP' => 'スポーツの日']; } if ($date instanceof DateTimeInterface) { @@ -595,6 +560,42 @@ private function calculateSubstituteHolidays(): void } } + /** + * Coronation Day. Coronation Day is The new Emperor Coronation. + * This holiday is only 2019. + * + * @throws \Exception + */ + private function calculateCoronationDay(): void + { + if (2019 === $this->year) { + $this->addHoliday(new Holiday( + 'coronationDay', + ['en_US' => 'Coronation Day', 'ja_JP' => '即位の日'], + new DateTime("$this->year-5-1", new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Enthronement Proclamation Ceremony. Enthronement Proclamation Ceremony is The New Emperor enthronement ceremony. + * This holiday only 2019. + * + * @throws \Exception + */ + private function calculateEnthronementProclamationCeremony(): void + { + if (2019 === $this->year) { + $this->addHoliday(new Holiday( + 'enthronementProclamationCeremony', + ['en_US' => 'Enthronement Proclamation Ceremony', 'ja_JP' => '即位礼正殿の儀'], + new DateTime("$this->year-10-22", new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + /** * Calculate public bridge holidays. * @@ -610,7 +611,7 @@ private function calculateBridgeHolidays(): void // Get initial list of holidays and iterator $datesIterator = $this->getIterator(); - $counter=1; + $counter = 1; // Loop through all defined holidays while ($datesIterator->valid()) { $previous = $datesIterator->current(); @@ -626,7 +627,7 @@ private function calculateBridgeHolidays(): void $bridgeDate = clone $previous; $bridgeDate->add(new DateInterval('P1D')); - $this->addHoliday(new Holiday('bridgeDay'.$counter, [ + $this->addHoliday(new Holiday('bridgeDay' . $counter, [ 'en_US' => 'Bridge Public holiday', 'ja_JP' => '国民の休日' ], $bridgeDate, $this->locale)); diff --git a/src/Yasumi/Provider/Latvia.php b/src/Yasumi/Provider/Latvia.php index ae2eec0e7..b722f04a1 100644 --- a/src/Yasumi/Provider/Latvia.php +++ b/src/Yasumi/Provider/Latvia.php @@ -1,4 +1,4 @@ -year >= self::RESTORATION_OF_INDEPENDENCE_YEAR) { $date = new \DateTime("{$this->year}-05-04", new \DateTimeZone($this->timezone)); - if (! $this->isWorkingDay($date)) { + if (!$this->isWorkingDay($date)) { $date->modify('next monday'); } @@ -107,7 +107,7 @@ private function addProclamationDay(): void if ($this->year >= self::PROCLAMATION_OF_INDEPENDENCE_YEAR) { $date = new \DateTime("{$this->year}-11-18", new \DateTimeZone($this->timezone)); - if (! $this->isWorkingDay($date)) { + if (!$this->isWorkingDay($date)) { $date->modify('next monday'); } diff --git a/src/Yasumi/Provider/Lithuania.php b/src/Yasumi/Provider/Lithuania.php index a64a1f109..17169402b 100644 --- a/src/Yasumi/Provider/Lithuania.php +++ b/src/Yasumi/Provider/Lithuania.php @@ -1,4 +1,4 @@ -year >= 1947) { - $this->addHoliday(new Holiday( - 'commemorationDay', - ['en_US' => 'Commemoration Day', 'nl_NL' => 'Dodenherdenking'], - new DateTime("$this->year-5-4", new DateTimeZone($this->timezone)), - $this->locale, - Holiday::TYPE_OBSERVANCE - )); - $this->addHoliday(new Holiday( - 'liberationDay', - ['en_US' => 'Liberation Day', 'nl_NL' => 'Bevrijdingsdag'], - new DateTime("$this->year-5-5", new DateTimeZone($this->timezone)), - $this->locale, - Holiday::TYPE_OFFICIAL - )); - } + $easter = $this->calculateEaster($this->year, $this->timezone); + $carnivalDay1 = clone $easter; + $this->addHoliday(new Holiday( + 'carnivalDay', + ['en_US' => 'Carnival', 'nl_NL' => 'Carnaval'], + $carnivalDay1->sub(new DateInterval('P49D')), + $this->locale, + Holiday::TYPE_OBSERVANCE + )); + + /** + * Second Day of Carnival. + */ + $carnivalDay2 = clone $easter; + $this->addHoliday(new Holiday( + 'secondCarnivalDay', + ['en_US' => 'Carnival', 'nl_NL' => 'Carnaval'], + $carnivalDay2->sub(new DateInterval('P48D')), + $this->locale, + Holiday::TYPE_OBSERVANCE + )); + + /** + * Third Day of Carnival. + */ + $carnivalDay3 = clone $easter; + $this->addHoliday(new Holiday( + 'thirdCarnivalDay', + ['en_US' => 'Carnival', 'nl_NL' => 'Carnaval'], + $carnivalDay3->sub(new DateInterval('P47D')), + $this->locale, + Holiday::TYPE_OBSERVANCE + )); } /** - * Kings Day. + * Winter Time. * - * King's Day is celebrated from 2014 onwards on April 27th. If this happens to be on a Sunday, it will be - * celebrated the day before instead. + * The beginning of winter time. Winter time is also known as standard time. * * @throws \Exception + * @see \Yasumi\Provider\CommonHolidays::winterTime() + * */ - private function calculateKingsday(): void + private function calculateWinterTime(): void { - if ($this->year >= 2014) { - $date = new DateTime("$this->year-4-27", new DateTimeZone($this->timezone)); - - if (0 === (int)$date->format('w')) { - $date->sub(new DateInterval('P1D')); - } - - $this->addHoliday(new Holiday( - 'kingsDay', - ['en_US' => 'Kings Day', 'nl_NL' => 'Koningsdag'], - $date, - $this->locale - )); + $winterTime = $this->winterTime($this->year, $this->timezone, $this->locale); + if ($winterTime instanceof Holiday) { + $this->addHoliday($winterTime); } } /** - * Queen's Day. + * Summer Time. * - * Queen's Day was celebrated between 1891 and 1948 (inclusive) on August 31. Between 1949 and 2013 (inclusive) it - * was celebrated April 30. If these dates are on a Sunday, Queen's Day was celebrated one day later until 1980 - * (on the following Monday), starting 1980 one day earlier (on the preceding Saturday). + * The beginning of summer time. Summer time is also known as day lights saving time. * * @throws \Exception + * @see \Yasumi\Provider\CommonHolidays::summerTime() + * */ - private function calculateQueensday(): void + private function calculateSummerTime(): void { - if ($this->year >= 1891 && $this->year <= 2013) { - $date = new DateTime("$this->year-4-30", new DateTimeZone($this->timezone)); - if ($this->year <= 1948) { - $date = new DateTime("$this->year-8-31", new DateTimeZone($this->timezone)); - } - - // Determine substitution day - if (0 === (int)$date->format('w')) { - ($this->year < 1980) ? $date->add(new DateInterval('P1D')) : $date->sub(new DateInterval('P1D')); - } - - $this->addHoliday(new Holiday( - 'queensDay', - ['en_US' => 'Queen\'s Day', 'nl_NL' => 'Koninginnedag'], - $date, - $this->locale - )); + $summerTime = $this->summerTime($this->year, $this->timezone, $this->locale); + if ($summerTime instanceof Holiday) { + $this->addHoliday($summerTime); } } /** - * Prince's Day. + * St. Nicholas' Day * - * Prinsjesdag (English: Prince's Day) is the day on which the reigning monarch of the Netherlands addresses a joint - * session of the Dutch Senate and House of Representatives. + * The feast of Sinterklaas celebrates the name day of Saint Nicholas on 6 December. + * The feast is celebrated annually with the giving of gifts on St. Nicholas' Eve (5 December) in the Netherlands + * and on the morning of 6 December, Saint Nicholas Day, in Belgium, Luxembourg and northern France + * (French Flanders, Lorraine and Artois). + * + * @link https://en.wikipedia.org/wiki/Sinterklaas * * @throws \Exception */ - private function calculatePrincesDay(): void + private function calculateStNicholasDay(): void { + /** + * St. Nicholas' Day + */ $this->addHoliday(new Holiday( - 'princesDay', - ['en_US' => 'Prince\'s Day', 'nl_NL' => 'Prinsjesdag'], - new DateTime("third tuesday of september $this->year", new DateTimeZone($this->timezone)), + 'stNicholasDay', + ['en_US' => 'St. Nicholas\' Day', 'nl_NL' => 'Sinterklaas'], + new DateTime("$this->year-12-5", new DateTimeZone($this->timezone)), $this->locale, - Holiday::TYPE_OTHER + Holiday::TYPE_OBSERVANCE )); } @@ -214,108 +217,105 @@ private function calculateHalloween(): void } /** - * St. Nicholas' Day - * - * The feast of Sinterklaas celebrates the name day of Saint Nicholas on 6 December. - * The feast is celebrated annually with the giving of gifts on St. Nicholas' Eve (5 December) in the Netherlands - * and on the morning of 6 December, Saint Nicholas Day, in Belgium, Luxembourg and northern France - * (French Flanders, Lorraine and Artois). + * Prince's Day. * - * @link https://en.wikipedia.org/wiki/Sinterklaas + * Prinsjesdag (English: Prince's Day) is the day on which the reigning monarch of the Netherlands addresses a joint + * session of the Dutch Senate and House of Representatives. * * @throws \Exception */ - private function calculateStNicholasDay(): void + private function calculatePrincesDay(): void { - /** - * St. Nicholas' Day - */ $this->addHoliday(new Holiday( - 'stNicholasDay', - ['en_US' => 'St. Nicholas\' Day', 'nl_NL' => 'Sinterklaas'], - new DateTime("$this->year-12-5", new DateTimeZone($this->timezone)), + 'princesDay', + ['en_US' => 'Prince\'s Day', 'nl_NL' => 'Prinsjesdag'], + new DateTime("third tuesday of september $this->year", new DateTimeZone($this->timezone)), $this->locale, - Holiday::TYPE_OBSERVANCE + Holiday::TYPE_OTHER )); } /** - * Summer Time. - * - * The beginning of summer time. Summer time is also known as day lights saving time. + * Queen's Day. * - * @see \Yasumi\Provider\CommonHolidays::summerTime() + * Queen's Day was celebrated between 1891 and 1948 (inclusive) on August 31. Between 1949 and 2013 (inclusive) it + * was celebrated April 30. If these dates are on a Sunday, Queen's Day was celebrated one day later until 1980 + * (on the following Monday), starting 1980 one day earlier (on the preceding Saturday). * * @throws \Exception */ - private function calculateSummerTime(): void + private function calculateQueensday(): void { - $summerTime = $this->summerTime($this->year, $this->timezone, $this->locale); - if ($summerTime instanceof Holiday) { - $this->addHoliday($summerTime); + if ($this->year >= 1891 && $this->year <= 2013) { + $date = new DateTime("$this->year-4-30", new DateTimeZone($this->timezone)); + if ($this->year <= 1948) { + $date = new DateTime("$this->year-8-31", new DateTimeZone($this->timezone)); + } + + // Determine substitution day + if (0 === (int)$date->format('w')) { + ($this->year < 1980) ? $date->add(new DateInterval('P1D')) : $date->sub(new DateInterval('P1D')); + } + + $this->addHoliday(new Holiday( + 'queensDay', + ['en_US' => 'Queen\'s Day', 'nl_NL' => 'Koninginnedag'], + $date, + $this->locale + )); } } /** - * Winter Time. - * - * The beginning of winter time. Winter time is also known as standard time. + * Kings Day. * - * @see \Yasumi\Provider\CommonHolidays::winterTime() + * King's Day is celebrated from 2014 onwards on April 27th. If this happens to be on a Sunday, it will be + * celebrated the day before instead. * * @throws \Exception */ - private function calculateWinterTime(): void + private function calculateKingsday(): void { - $winterTime = $this->winterTime($this->year, $this->timezone, $this->locale); - if ($winterTime instanceof Holiday) { - $this->addHoliday($winterTime); + if ($this->year >= 2014) { + $date = new DateTime("$this->year-4-27", new DateTimeZone($this->timezone)); + + if (0 === (int)$date->format('w')) { + $date->sub(new DateInterval('P1D')); + } + + $this->addHoliday(new Holiday( + 'kingsDay', + ['en_US' => 'Kings Day', 'nl_NL' => 'Koningsdag'], + $date, + $this->locale + )); } } /** - * Carnival. + * Commemoration Day and Liberation Day. * - * Carnival (Dutch: Carnaval) is originally an European Pagan spring festival, with an emphasis on role-reversal - * and suspension of social norms. The feast became assimilated by the Catholic Church and was celebrated in the - * three days preceding Ash Wednesday and Lent. + * Instituted after WWII in 1947. * * @throws \Exception */ - private function calculateCarnival(): void + private function calculateCommemorationLiberationDay(): void { - $easter = $this->calculateEaster($this->year, $this->timezone); - $carnivalDay1 = clone $easter; - $this->addHoliday(new Holiday( - 'carnivalDay', - ['en_US' => 'Carnival', 'nl_NL' => 'Carnaval'], - $carnivalDay1->sub(new DateInterval('P49D')), - $this->locale, - Holiday::TYPE_OBSERVANCE - )); - - /** - * Second Day of Carnival. - */ - $carnivalDay2 = clone $easter; - $this->addHoliday(new Holiday( - 'secondCarnivalDay', - ['en_US' => 'Carnival', 'nl_NL' => 'Carnaval'], - $carnivalDay2->sub(new DateInterval('P48D')), - $this->locale, - Holiday::TYPE_OBSERVANCE - )); - - /** - * Third Day of Carnival. - */ - $carnivalDay3 = clone $easter; - $this->addHoliday(new Holiday( - 'thirdCarnivalDay', - ['en_US' => 'Carnival', 'nl_NL' => 'Carnaval'], - $carnivalDay3->sub(new DateInterval('P47D')), - $this->locale, - Holiday::TYPE_OBSERVANCE - )); + if ($this->year >= 1947) { + $this->addHoliday(new Holiday( + 'commemorationDay', + ['en_US' => 'Commemoration Day', 'nl_NL' => 'Dodenherdenking'], + new DateTime("$this->year-5-4", new DateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OBSERVANCE + )); + $this->addHoliday(new Holiday( + 'liberationDay', + ['en_US' => 'Liberation Day', 'nl_NL' => 'Bevrijdingsdag'], + new DateTime("$this->year-5-5", new DateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_OFFICIAL + )); + } } } diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index 81b016e34..c491b7767 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -1,4 +1,4 @@ -year-01-01", new DateTimeZone($this->timezone)); + $newYearsDay = new DateTime("$this->year-01-01", new DateTimeZone($this->timezone)); $dayAfterNewYearsDay = new DateTime("$this->year-01-02", new DateTimeZone($this->timezone)); switch ($newYearsDay->format('w')) { @@ -121,7 +121,7 @@ private function calculateWaitangiDay(): void $date = new DateTime("$this->year-02-6", new DateTimeZone($this->timezone)); - if ($this->year >= 2015 && ! $this->isWorkingDay($date)) { + if ($this->year >= 2015 && !$this->isWorkingDay($date)) { $date->modify('next monday'); } @@ -151,7 +151,7 @@ private function calculateAnzacDay(): void $date = new DateTime("$this->year-04-25", new DateTimeZone($this->timezone)); - if ($this->year >= 2015 && ! $this->isWorkingDay($date)) { + if ($this->year >= 2015 && !$this->isWorkingDay($date)) { $date->modify('next monday'); } @@ -241,7 +241,7 @@ private function calculateLabourDay(): void private function calculateChristmasHolidays(): void { $christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone)); - $boxingDay = new DateTime("$this->year-12-26", new DateTimeZone($this->timezone)); + $boxingDay = new DateTime("$this->year-12-26", new DateTimeZone($this->timezone)); switch ($christmasDay->format('w')) { case 0: diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index 973d39011..e4e39b290 100644 --- a/src/Yasumi/Provider/Norway.php +++ b/src/Yasumi/Provider/Norway.php @@ -1,4 +1,4 @@ - [ - 1985 => '1985-2-20', 1986 => '1986-2-9', 1987 => '1987-1-29', 1988 => '1988-2-18', 1989 => '1989-2-6', - 1990 => '1990-1-27', 1991 => '1991-2-15', 1992 => '1992-2-4', 1993 => '1993-1-23', 1994 => '1994-2-10', - 1995 => '1995-1-31', 1996 => '1996-2-19', 1997 => '1997-2-8', 1998 => '1998-1-28', 1999 => '1999-2-16', - 2000 => '2000-2-5', 2001 => '2001-1-24', 2002 => '2002-2-12', 2003 => '2003-2-1', 2004 => '2004-1-22', - 2005 => '2005-2-9', 2006 => '2006-1-29', 2007 => '2007-2-18', 2008 => '2008-2-7', 2009 => '2009-1-26', - 2010 => '2010-2-14', 2011 => '2011-2-3', 2012 => '2012-1-23', 2013 => '2013-2-10', 2014 => '2014-1-31', - 2015 => '2015-2-19', 2016 => '2016-2-8', 2017 => '2017-1-28', 2018 => '2018-2-16', 2019 => '2019-2-5', - 2020 => '2020-1-25', 2021 => '2021-2-12', 2022 => '2022-2-1', 2023 => '2023-1-22', 2024 => '2024-2-10', - 2025 => '2025-1-29', 2026 => '2026-2-17', 2027 => '2027-2-7', 2028 => '2028-1-27', 2029 => '2029-2-13', - 2030 => '2030-2-3', 2031 => '2031-1-23', 2032 => '2032-2-11', 2033 => '2033-1-31', 2034 => '2034-2-19', - 2035 => '2035-2-8', 2036 => '2036-1-28', 2037 => '2037-2-15', 2038 => '2038-2-4', 2039 => '2037-1-24', - 2040 => '2040-2-12', 2041 => '2041-2-1', 2042 => '2042-1-22', 2043 => '2043-2-10', 2044 => '2044-1-30', - 2045 => '2045-2-17', 2046 => '2046-2-6', 2047 => '2047-1-26', 2048 => '2048-2-14', 2049 => '2049-2-2', + 1985 => '1985-2-20', 1986 => '1986-2-9', 1987 => '1987-1-29', 1988 => '1988-2-18', 1989 => '1989-2-6', + 1990 => '1990-1-27', 1991 => '1991-2-15', 1992 => '1992-2-4', 1993 => '1993-1-23', 1994 => '1994-2-10', + 1995 => '1995-1-31', 1996 => '1996-2-19', 1997 => '1997-2-8', 1998 => '1998-1-28', 1999 => '1999-2-16', + 2000 => '2000-2-5', 2001 => '2001-1-24', 2002 => '2002-2-12', 2003 => '2003-2-1', 2004 => '2004-1-22', + 2005 => '2005-2-9', 2006 => '2006-1-29', 2007 => '2007-2-18', 2008 => '2008-2-7', 2009 => '2009-1-26', + 2010 => '2010-2-14', 2011 => '2011-2-3', 2012 => '2012-1-23', 2013 => '2013-2-10', 2014 => '2014-1-31', + 2015 => '2015-2-19', 2016 => '2016-2-8', 2017 => '2017-1-28', 2018 => '2018-2-16', 2019 => '2019-2-5', + 2020 => '2020-1-25', 2021 => '2021-2-12', 2022 => '2022-2-1', 2023 => '2023-1-22', 2024 => '2024-2-10', + 2025 => '2025-1-29', 2026 => '2026-2-17', 2027 => '2027-2-7', 2028 => '2028-1-27', 2029 => '2029-2-13', + 2030 => '2030-2-3', 2031 => '2031-1-23', 2032 => '2032-2-11', 2033 => '2033-1-31', 2034 => '2034-2-19', + 2035 => '2035-2-8', 2036 => '2036-1-28', 2037 => '2037-2-15', 2038 => '2038-2-4', 2039 => '2037-1-24', + 2040 => '2040-2-12', 2041 => '2041-2-1', 2042 => '2042-1-22', 2043 => '2043-2-10', 2044 => '2044-1-30', + 2045 => '2045-2-17', 2046 => '2046-2-6', 2047 => '2047-1-26', 2048 => '2048-2-14', 2049 => '2049-2-2', 2050 => '2050-1-23' ], 'buddhasBirthday' => [ - 1975 => '1975-5-18', 1976 => '1976-5-6', 1977 => '1977-5-25', 1978 => '1978-5-14', 1979 => '1979-5-3', - 1980 => '1980-5-21', 1981 => '1981-5-11', 1982 => '1982-5-1', 1983 => '1983-5-20', 1984 => '1984-5-8', - 1985 => '1985-5-27', 1986 => '1986-5-16', 1987 => '1987-5-5', 1988 => '1988-5-23', 1989 => '1989-5-12', - 1990 => '1990-5-2', 1991 => '1991-5-21', 1992 => '1992-5-10', 1993 => '1993-5-28', 1994 => '1994-5-18', - 1995 => '1995-5-7', 1996 => '1996-5-24', 1997 => '1997-5-14', 1998 => '1998-5-3', 1999 => '1999-5-22', - 2000 => '2000-5-11', 2001 => '2001-4-30', 2002 => '2002-5-19', 2003 => '2003-5-8', 2004 => '2004-5-26', - 2005 => '2005-5-15', 2006 => '2006-5-5', 2007 => '2007-5-24', 2008 => '2008-5-12', 2009 => '2009-5-2', + 1975 => '1975-5-18', 1976 => '1976-5-6', 1977 => '1977-5-25', 1978 => '1978-5-14', 1979 => '1979-5-3', + 1980 => '1980-5-21', 1981 => '1981-5-11', 1982 => '1982-5-1', 1983 => '1983-5-20', 1984 => '1984-5-8', + 1985 => '1985-5-27', 1986 => '1986-5-16', 1987 => '1987-5-5', 1988 => '1988-5-23', 1989 => '1989-5-12', + 1990 => '1990-5-2', 1991 => '1991-5-21', 1992 => '1992-5-10', 1993 => '1993-5-28', 1994 => '1994-5-18', + 1995 => '1995-5-7', 1996 => '1996-5-24', 1997 => '1997-5-14', 1998 => '1998-5-3', 1999 => '1999-5-22', + 2000 => '2000-5-11', 2001 => '2001-4-30', 2002 => '2002-5-19', 2003 => '2003-5-8', 2004 => '2004-5-26', + 2005 => '2005-5-15', 2006 => '2006-5-5', 2007 => '2007-5-24', 2008 => '2008-5-12', 2009 => '2009-5-2', 2010 => '2010-5-21', 2011 => '2011-5-10', 2012 => '2012-5-28', 2013 => '2013-5-17', 2014 => '2014-5-6', - 2015 => '2015-5-25', 2016 => '2016-5-14', 2017 => '2017-5-3', 2018 => '2018-5-22', 2019 => '2019-5-12', - 2020 => '2020-4-30', 2021 => '2021-5-19', 2022 => '2022-5-8', 2023 => '2023-5-27', 2024 => '2024-5-15', - 2025 => '2025-5-5', 2026 => '2026-5-24', 2027 => '2027-5-13', 2028 => '2028-5-2', 2029 => '2029-5-20', - 2030 => '2030-5-9', 2031 => '2031-5-28', 2032 => '2032-5-16', 2033 => '2033-5-6', 2034 => '2034-5-25', - 2035 => '2035-5-15', 2036 => '2036-5-3', 2037 => '2037-5-22', 2038 => '2038-5-11', 2039 => '2039-4-30', - 2040 => '2040-5-18', 2041 => '2041-5-7', 2042 => '2042-5-26', 2043 => '2043-5-16', 2044 => '2044-5-5', - 2045 => '2045-5-24', 2046 => '2046-5-13', 2047 => '2047-5-2', 2048 => '2048-5-20', 2049 => '2049-5-9', + 2015 => '2015-5-25', 2016 => '2016-5-14', 2017 => '2017-5-3', 2018 => '2018-5-22', 2019 => '2019-5-12', + 2020 => '2020-4-30', 2021 => '2021-5-19', 2022 => '2022-5-8', 2023 => '2023-5-27', 2024 => '2024-5-15', + 2025 => '2025-5-5', 2026 => '2026-5-24', 2027 => '2027-5-13', 2028 => '2028-5-2', 2029 => '2029-5-20', + 2030 => '2030-5-9', 2031 => '2031-5-28', 2032 => '2032-5-16', 2033 => '2033-5-6', 2034 => '2034-5-25', + 2035 => '2035-5-15', 2036 => '2036-5-3', 2037 => '2037-5-22', 2038 => '2038-5-11', 2039 => '2039-4-30', + 2040 => '2040-5-18', 2041 => '2041-5-7', 2042 => '2042-5-26', 2043 => '2043-5-16', 2044 => '2044-5-5', + 2045 => '2045-5-24', 2046 => '2046-5-13', 2047 => '2047-5-2', 2048 => '2048-5-20', 2049 => '2049-5-9', 2050 => '2050-5-28' ], 'chuseok' => [ 1949 => '1949-10-6', 1950 => '1950-9-26', 1951 => '1951-9-15', 1952 => '1952-10-3', 1953 => '1953-9-22', - 1954 => '1954-9-11', 1955 => '1955-9-30', 1956 => '1956-9-19', 1957 => '1957-9-8', 1958 => '1958-9-27', + 1954 => '1954-9-11', 1955 => '1955-9-30', 1956 => '1956-9-19', 1957 => '1957-9-8', 1958 => '1958-9-27', 1959 => '1959-9-17', 1960 => '1960-10-5', 1961 => '1961-9-24', 1962 => '1962-9-13', 1963 => '1963-10-2', 1964 => '1964-9-20', 1965 => '1965-9-10', 1966 => '1966-9-29', 1967 => '1967-9-18', 1968 => '1968-10-6', 1969 => '1969-9-26', 1970 => '1970-9-15', 1971 => '1971-10-3', 1972 => '1972-9-22', 1973 => '1973-9-11', - 1974 => '1974-9-30', 1975 => '1975-9-20', 1976 => '1976-9-8', 1977 => '1977-9-27', 1978 => '1978-9-17', + 1974 => '1974-9-30', 1975 => '1975-9-20', 1976 => '1976-9-8', 1977 => '1977-9-27', 1978 => '1978-9-17', 1979 => '1979-10-5', 1980 => '1980-9-23', 1981 => '1981-9-12', 1982 => '1982-10-1', 1983 => '1983-9-21', 1984 => '1984-9-10', 1985 => '1985-9-29', 1986 => '1986-9-18', 1987 => '1987-10-7', 1988 => '1988-9-25', 1989 => '1989-9-14', 1990 => '1990-10-3', 1991 => '1991-9-22', 1992 => '1992-9-11', 1993 => '1993-9-30', - 1994 => '1994-9-20', 1995 => '1950-9-9', 1996 => '1996-9-27', 1997 => '1997-9-16', 1998 => '1998-10-5', + 1994 => '1994-9-20', 1995 => '1950-9-9', 1996 => '1996-9-27', 1997 => '1997-9-16', 1998 => '1998-10-5', 1999 => '1999-9-24', 2000 => '2000-9-12', 2001 => '2001-10-1', 2002 => '2002-9-21', 2003 => '2003-9-11', 2004 => '2004-9-28', 2005 => '2005-9-18', 2006 => '2006-10-6', 2007 => '2007-9-25', 2008 => '2008-9-14', 2009 => '2009-10-3', 2010 => '2010-9-22', 2011 => '2011-9-12', 2012 => '2012-9-30', 2013 => '2013-9-19', - 2014 => '2014-9-8', 2015 => '2015-9-27', 2016 => '2016-9-15', 2017 => '2017-10-4', 2018 => '2018-9-24', + 2014 => '2014-9-8', 2015 => '2015-9-27', 2016 => '2016-9-15', 2017 => '2017-10-4', 2018 => '2018-9-24', 2019 => '2019-9-13', 2020 => '2020-10-1', 2021 => '2021-9-21', 2022 => '2022-9-10', 2023 => '2023-9-29', 2024 => '2024-9-17', 2025 => '2025-10-6', 2026 => '2026-9-25', 2027 => '2027-9-15', 2028 => '2028-10-3', 2029 => '2029-9-22', 2030 => '2030-9-12', 2031 => '2031-10-1', 2032 => '2032-9-19', 2033 => '2033-9-8', @@ -218,6 +218,69 @@ public function calculateSeollal(): void } } + /** + * Buddha's Birthday is held on the 8th day of the 4th lunar month and was established since 1975. + * + * @link https://en.wikipedia.org/wiki/Buddha%27s_Birthday + * + * @throws \Exception + */ + public function calculateBuddhasBirthday(): void + { + if ($this->year >= 1975 && isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year])) { + $this->addHoliday(new Holiday( + 'buddhasBirthday', + ['en_US' => 'Buddha\'s Birthday', 'ko_KR' => '부처님오신날'], + new DateTime(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year], new DateTimeZone($this->timezone)), + $this->locale + )); + } + } + + /** + * Chuseok (Korean Thanksgiving Day). + * + * Chuseok, one of the biggest holidays in Korea, is a major harvest festival and a three-day holiday celebrated on + * the 15th day of the 8th month of the lunar calendar on the full moon. + * + * @link https://en.wikipedia.org/wiki/Chuseok + * + * @throws \Exception + */ + public function calculateChuseok(): void + { + if ($this->year >= 1949 && isset(self::LUNAR_HOLIDAY['chuseok'][$this->year])) { + // Chuseok + $chuseok = new Holiday( + 'chuseok', + ['en_US' => 'Chuseok', 'ko_KR' => '추석'], + new DateTime(self::LUNAR_HOLIDAY['chuseok'][$this->year], new DateTimeZone($this->timezone)), + $this->locale + ); + $this->addHoliday($chuseok); + + // Day after Chuseok + if ($this->year >= 1986) { + $this->addHoliday(new Holiday( + 'dayAfterChuseok', + ['en_US' => 'Day after Chuseok', 'ko_KR' => '추석 연휴'], + (clone $chuseok)->add(new DateInterval('P1D')), + $this->locale + )); + } + + // Day before Chuseok + if ($this->year >= 1989) { + $this->addHoliday(new Holiday( + 'dayBeforeChuseok', + ['en_US' => 'Day before Chuseok', 'ko_KR' => '추석 연휴'], + (clone $chuseok)->sub(new DateInterval('P1D')), + $this->locale + )); + } + } + } + /** * Independence Movement Day. Independence Movement Day is held on March 1st and was established from 1949. * @@ -275,25 +338,6 @@ public function calculateChildrensDay(): void } } - /** - * Buddha's Birthday is held on the 8th day of the 4th lunar month and was established since 1975. - * - * @link https://en.wikipedia.org/wiki/Buddha%27s_Birthday - * - * @throws \Exception - */ - public function calculateBuddhasBirthday(): void - { - if ($this->year >= 1975 && isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year])) { - $this->addHoliday(new Holiday( - 'buddhasBirthday', - ['en_US' => 'Buddha\'s Birthday', 'ko_KR' => '부처님오신날'], - new DateTime(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year], new DateTimeZone($this->timezone)), - $this->locale - )); - } - } - /** * Memorial Day. Memorial Day is held on June 6th and established since 1956. * @@ -354,50 +398,6 @@ public function calculateLiberationDay(): void } } - /** - * Chuseok (Korean Thanksgiving Day). - * - * Chuseok, one of the biggest holidays in Korea, is a major harvest festival and a three-day holiday celebrated on - * the 15th day of the 8th month of the lunar calendar on the full moon. - * - * @link https://en.wikipedia.org/wiki/Chuseok - * - * @throws \Exception - */ - public function calculateChuseok(): void - { - if ($this->year >= 1949 && isset(self::LUNAR_HOLIDAY['chuseok'][$this->year])) { - // Chuseok - $chuseok = new Holiday( - 'chuseok', - ['en_US' => 'Chuseok', 'ko_KR' => '추석'], - new DateTime(self::LUNAR_HOLIDAY['chuseok'][$this->year], new DateTimeZone($this->timezone)), - $this->locale - ); - $this->addHoliday($chuseok); - - // Day after Chuseok - if ($this->year >= 1986) { - $this->addHoliday(new Holiday( - 'dayAfterChuseok', - ['en_US' => 'Day after Chuseok', 'ko_KR' => '추석 연휴'], - (clone $chuseok)->add(new DateInterval('P1D')), - $this->locale - )); - } - - // Day before Chuseok - if ($this->year >= 1989) { - $this->addHoliday(new Holiday( - 'dayBeforeChuseok', - ['en_US' => 'Day before Chuseok', 'ko_KR' => '추석 연휴'], - (clone $chuseok)->sub(new DateInterval('P1D')), - $this->locale - )); - } - } - } - /** * Armed Forces Day. Armed Forces Day is held on October 1st and established since 1956. * diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index 21a52f0e6..3a2092854 100755 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -1,4 +1,4 @@ -year >= 1879) { + $date = new DateTime("$this->year-2-22", new DateTimeZone($this->timezone)); + if ($this->year >= 1968) { + $date = new DateTime("third monday of february $this->year", new DateTimeZone($this->timezone)); + } + $this->addHoliday(new Holiday('washingtonsBirthday', [ + 'en_US' => 'Washington\'s Birthday' + ], $date, $this->locale)); + } + } + /** * Memorial Day. * @@ -226,34 +254,6 @@ private function calculateThanksgivingDay(): void } } - /** - * Washington's Birthday. - * - * Washington's Birthday is a United States federal holiday celebrated on the third Monday of February in honor - * of George Washington, the first President of the United States. Colloquially, it is widely known as - * Presidents Day and is often an occasion to remember all the presidents. - * - * Washington's Birthday was first declared a federal holiday by an 1879 act of Congress. The Uniform Holidays - * Act, 1968 shifted the date of the commemoration of Washington's Birthday from February 22 to the third Monday - * in February. - * - * @link http://en.wikipedia.org/wiki/Washington%27s_Birthday - * - * @throws \Exception - */ - private function calculateWashingtonsBirthday(): void - { - if ($this->year >= 1879) { - $date = new DateTime("$this->year-2-22", new DateTimeZone($this->timezone)); - if ($this->year >= 1968) { - $date = new DateTime("third monday of february $this->year", new DateTimeZone($this->timezone)); - } - $this->addHoliday(new Holiday('washingtonsBirthday', [ - 'en_US' => 'Washington\'s Birthday' - ], $date, $this->locale)); - } - } - /** * Calculate substitute holidays. * @@ -267,7 +267,7 @@ private function calculateWashingtonsBirthday(): void */ private function calculateSubstituteHolidays(): void { - $datesIterator = $this->getIterator(); + $datesIterator = $this->getIterator(); $substituteHoliday = null; // Loop through all defined holidays diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index ab68655ab..fd50dbe39 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -1,4 +1,4 @@ -year-12-25", new DateTimeZone($this->timezone)); - $boxingDay = new DateTime("$this->year-12-26", new DateTimeZone($this->timezone)); + $boxingDay = new DateTime("$this->year-12-26", new DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('christmasDay', [], $christmasDay, $this->locale)); $this->addHoliday(new Holiday('secondChristmasDay', [], $boxingDay, $this->locale, Holiday::TYPE_BANK)); $substituteChristmasDay = clone $christmasDay; - $substituteBoxingDay = clone $boxingDay; + $substituteBoxingDay = clone $boxingDay; if (\in_array((int)$christmasDay->format('w'), [0, 6], true)) { $substituteChristmasDay->add(new DateInterval('P2D')); diff --git a/src/Yasumi/ProviderInterface.php b/src/Yasumi/ProviderInterface.php index 3cfd4625c..9c52175f3 100755 --- a/src/Yasumi/ProviderInterface.php +++ b/src/Yasumi/ProviderInterface.php @@ -1,4 +1,4 @@ - 0) { $date = $date->add(new \DateInterval('P1D')); - if (! $provider || $provider->getYear() !== \getdate()['year']) { + if (!$provider || $provider->getYear() !== \getdate()['year']) { $provider = self::create($class, (int)$date->format('Y')); } if ($provider->isWorkingDay($date)) { @@ -111,18 +111,18 @@ public static function nextWorkingDay( * already with Yasumi, or your own provider by giving the name of your class in the first parameter. Your provider * class needs to implement the 'ProviderInterface' class. * - * @param string $class holiday provider name - * @param int $year year for which the country provider needs to be created. Year needs to be a valid integer + * @param string $class holiday provider name + * @param int $year year for which the country provider needs to be created. Year needs to be a valid integer * between 1000 and 9999. * @param string $locale The locale to use. If empty we'll use the default locale (en_US) * - * @throws \ReflectionException + * @return AbstractProvider An instance of class $class is created and returned * @throws RuntimeException If no such holiday provider is found * @throws InvalidYearException if the year parameter is not between 1000 and 9999 * @throws UnknownLocaleException if the locale parameter is invalid * @throws ProviderNotFoundException if the holiday provider for the given country does not exist * - * @return AbstractProvider An instance of class $class is created and returned + * @throws \ReflectionException */ public static function create(string $class, int $year = 0, string $locale = self::DEFAULT_LOCALE): ProviderInterface { @@ -154,7 +154,7 @@ public static function create(string $class, int $year = 0, string $locale = sel } // Assert locale input - if (! \in_array($locale, self::$locales, true)) { + if (!\in_array($locale, self::$locales, true)) { throw new UnknownLocaleException(\sprintf('Locale "%s" is not a valid locale.', $locale)); } @@ -179,17 +179,17 @@ public static function getAvailableLocales(): array * your class in the first parameter. Your provider class needs to implement the 'ProviderInterface' class. * * @param string $iso3166_2 ISO3166-2 Coded region, holiday provider will be searched for - * @param int $year year for which the country provider needs to be created. Year needs to be a valid + * @param int $year year for which the country provider needs to be created. Year needs to be a valid * integer between 1000 and 9999. - * @param string $locale The locale to use. If empty we'll use the default locale (en_US) + * @param string $locale The locale to use. If empty we'll use the default locale (en_US) * - * @throws \ReflectionException + * @return AbstractProvider An instance of class $class is created and returned * @throws RuntimeException If no such holiday provider is found * @throws InvalidArgumentException if the year parameter is not between 1000 and 9999 * @throws UnknownLocaleException if the locale parameter is invalid * @throws ProviderNotFoundException if the holiday provider for the given ISO3166-2 code does not exist * - * @return AbstractProvider An instance of class $class is created and returned + * @throws \ReflectionException */ public static function createByISO3166_2( string $iso3166_2, @@ -223,7 +223,7 @@ public static function getProviders(): array return $providers; } - $providers = []; + $providers = []; $filesIterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator( __DIR__ . DIRECTORY_SEPARATOR . 'Provider', FilesystemIterator::SKIP_DOTS @@ -259,9 +259,9 @@ public static function getProviders(): array * by this Holiday Provider. The workingDays parameter can be used how far back (in days) the previous working day * must be searched for. * - * @param string $class Holiday Provider name - * @param \DateTimeInterface $startDate Start date, defaults to today - * @param int $workingDays Number of days to look back for the (first) previous working day + * @param string $class Holiday Provider name + * @param \DateTimeInterface $startDate Start date, defaults to today + * @param int $workingDays Number of days to look back for the (first) previous working day * * @return \DateTimeInterface * @@ -288,7 +288,7 @@ public static function prevWorkingDay( while ($workingDays > 0) { $date = $date->sub(new \DateInterval('P1D')); - if (! $provider || $provider->getYear() !== \getdate()['year']) { + if (!$provider || $provider->getYear() !== \getdate()['year']) { $provider = self::create($class, (int)$date->format('Y')); } if ($provider->isWorkingDay($date)) { diff --git a/src/Yasumi/data/locales.php b/src/Yasumi/data/locales.php index f965b114f..6fa1c48a7 100644 --- a/src/Yasumi/data/locales.php +++ b/src/Yasumi/data/locales.php @@ -1,4 +1,4 @@ - Date: Sun, 8 Sep 2019 20:18:12 +0900 Subject: [PATCH 096/133] Updated the Changelog with the latest changes. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index caa51a6b5..ba5e3b795 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Updated the translation for the Victory in Europe holiday for the 'fr_FR' locale [\#153](https://github.com/azuyalabs/yasumi/pull/153) ([pioc92](https://github.com/pioc92)) - Updated the translation for the Assumption of Mary holiday for the 'fr_FR' locale [\#155](https://github.com/azuyalabs/yasumi/pull/155) ([pioc92](https://github.com/pioc92)) - Updated the translation for Christmas Day for the 'nl_NL' locale [\#160](https://github.com/azuyalabs/yasumi/pull/160) ([pioc92](https://github.com/pioc92)) +- Reordered arguments to Yoda style. - Replaced null checks by appropriate instance / type checks. - Moved default method values to method body as parameters should be nullable. - Applying the use of strict types. Strict typing allows for improved readability, maintainability, and less prone to bugs and security vulnerabilities. @@ -38,10 +39,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Typos in Easter Monday and Republic Day for the 'it_IT' locale [\#171](https://github.com/azuyalabs/yasumi/pull/171) ([c960657](https://github.com/c960657)) - Corrected the name of the Emperors Birthday function and variable. - ### Removed - Unused constants. + ## [2.1.0] - 2019-03-29 ### Added From 782fdf239ebb8275980d13824ae10b002689b953 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 9 Sep 2019 00:32:05 +0900 Subject: [PATCH 097/133] Removed unused constant. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Japan.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 1cda2d1bf..98b5daf6f 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -54,11 +54,6 @@ class Japan extends AbstractProvider */ private const VERNAL_EQUINOX_PARAM_2150 = 21.8510; - /** - * The initial parameter of the approximate expression to calculate autumnal equinox day from 1851 to 1899. - */ - private const AUTUMNAL_EQUINOX_PARAM_1899 = 22.2588; - /** * The initial parameter of the approximate expression to calculate autumnal equinox day from 1900 to 1979. */ From 7e2a8d14f94381b37219fcb7e98a9b91d983df1d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 9 Sep 2019 00:32:37 +0900 Subject: [PATCH 098/133] Reference classes by their class names rather than magic constants. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 5fb341014..09a2675f1 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -155,7 +155,7 @@ public function addHoliday(Holiday $holiday) } $this->holidays[$holiday->shortName] = $holiday; - \uasort($this->holidays, [__CLASS__, 'compareDates']); + \uasort($this->holidays, [AbstractProvider::class, 'compareDates']); } From da6be35afb81b2ccde4080cd6934cbc7e7bba444 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 9 Sep 2019 00:42:56 +0900 Subject: [PATCH 099/133] Removed unnecessary parenthesis. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Netherlands.php | 2 +- src/Yasumi/Provider/NewZealand.php | 2 +- src/Yasumi/Provider/USA.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index 0e80ed30f..bc244a67d 100755 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -254,7 +254,7 @@ private function calculateQueensday(): void // Determine substitution day if (0 === (int)$date->format('w')) { - ($this->year < 1980) ? $date->add(new DateInterval('P1D')) : $date->sub(new DateInterval('P1D')); + $this->year < 1980 ? $date->add(new DateInterval('P1D')) : $date->sub(new DateInterval('P1D')); } $this->addHoliday(new Holiday( diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index c491b7767..5f409a011 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -216,7 +216,7 @@ private function calculateLabourDay(): void } $date = new DateTime( - (($this->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", new DateTimeZone($this->timezone) ); diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 7f9b5d2ba..538842607 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -220,7 +220,7 @@ private function calculateColumbusDay(): void private function calculateVeteransDay(): void { if ($this->year >= 1919) { - $name = ($this->year < 1954) ? 'Armistice Day' : 'Veterans Day'; + $name = $this->year < 1954 ? 'Armistice Day' : 'Veterans Day'; $this->addHoliday(new Holiday('veteransDay', [ 'en_US' => $name From 58760899ab94ea050613fd8531c11ea1b622cc6a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 9 Sep 2019 00:43:15 +0900 Subject: [PATCH 100/133] Added missing null return type. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 09a2675f1..e8d788d67 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -101,7 +101,7 @@ abstract class AbstractProvider implements ProviderInterface, Countable, Iterato * Creates a new holiday provider (i.e. country/state). * * @param int $year the year for which to provide holidays - * @param string $locale the locale/language in which holidays need to be + * @param string $locale |null the locale/language in which holidays need to be * represented * @param TranslationsInterface|null $globalTranslations global translations */ From 567828f2c32ed7b04fc5d7b447e5b38e1bc222b9 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 9 Sep 2019 00:44:31 +0900 Subject: [PATCH 101/133] Aligned inline documentation with actual return type. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/OnFilter.php | 2 +- src/Yasumi/Filters/OtherHolidaysFilter.php | 2 +- src/Yasumi/Filters/SeasonalHolidaysFilter.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Yasumi/Filters/OnFilter.php b/src/Yasumi/Filters/OnFilter.php index 9245d5def..98d326e24 100644 --- a/src/Yasumi/Filters/OnFilter.php +++ b/src/Yasumi/Filters/OnFilter.php @@ -59,7 +59,7 @@ public function accept(): bool } /** - * @return integer Returns the number of holidays that happen on the specified date + * @return int Returns the number of holidays that happen on the specified date */ public function count(): int { diff --git a/src/Yasumi/Filters/OtherHolidaysFilter.php b/src/Yasumi/Filters/OtherHolidaysFilter.php index 8fcd42cd6..06d4d31cb 100644 --- a/src/Yasumi/Filters/OtherHolidaysFilter.php +++ b/src/Yasumi/Filters/OtherHolidaysFilter.php @@ -39,7 +39,7 @@ public function accept(): bool } /** - * @return integer Returns the number of filtered holidays. + * @return int Returns the number of filtered holidays. */ public function count(): int { diff --git a/src/Yasumi/Filters/SeasonalHolidaysFilter.php b/src/Yasumi/Filters/SeasonalHolidaysFilter.php index 9b162074f..367c80365 100644 --- a/src/Yasumi/Filters/SeasonalHolidaysFilter.php +++ b/src/Yasumi/Filters/SeasonalHolidaysFilter.php @@ -39,7 +39,7 @@ public function accept(): bool } /** - * @return integer Returns the number of filtered holidays. + * @return int Returns the number of filtered holidays. */ public function count(): int { From 0eef6b14f01cd5a1084b3ab7c1802ece962ce18d Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 9 Sep 2019 00:48:29 +0900 Subject: [PATCH 102/133] Cleanup / formatting. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/Bosnia.php | 1 - src/Yasumi/Yasumi.php | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Yasumi/Provider/Bosnia.php b/src/Yasumi/Provider/Bosnia.php index 04cf0fd17..dabc956b4 100644 --- a/src/Yasumi/Provider/Bosnia.php +++ b/src/Yasumi/Provider/Bosnia.php @@ -61,7 +61,6 @@ public function initialize(): void 'bs_Latn_BA' => 'Pravoslavni Božić' ], new DateTime("{$this->year}-01-07", new DateTimeZone($this->timezone)))); - /** * Independence Day */ diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 9eeb40029..0524519dd 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -117,11 +117,11 @@ public static function nextWorkingDay( * @param string $locale The locale to use. If empty we'll use the default locale (en_US) * * @return AbstractProvider An instance of class $class is created and returned + * * @throws RuntimeException If no such holiday provider is found * @throws InvalidYearException if the year parameter is not between 1000 and 9999 * @throws UnknownLocaleException if the locale parameter is invalid * @throws ProviderNotFoundException if the holiday provider for the given country does not exist - * * @throws \ReflectionException */ public static function create(string $class, int $year = 0, string $locale = self::DEFAULT_LOCALE): ProviderInterface @@ -184,11 +184,11 @@ public static function getAvailableLocales(): array * @param string $locale The locale to use. If empty we'll use the default locale (en_US) * * @return AbstractProvider An instance of class $class is created and returned + * * @throws RuntimeException If no such holiday provider is found * @throws InvalidArgumentException if the year parameter is not between 1000 and 9999 * @throws UnknownLocaleException if the locale parameter is invalid * @throws ProviderNotFoundException if the holiday provider for the given ISO3166-2 code does not exist - * * @throws \ReflectionException */ public static function createByISO3166_2( @@ -273,7 +273,6 @@ public static function getProviders(): array * @throws InvalidDateException * * @TODO we should accept a timezone so we can accept int/string for $startDate - * */ public static function prevWorkingDay( string $class, From 54410e3e82551b8db70d7114fbad360ad05d0281 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 9 Sep 2019 00:52:21 +0900 Subject: [PATCH 103/133] Aligned inline documentation with actual return type. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/BetweenFilter.php | 2 +- src/Yasumi/Filters/ObservedHolidaysFilter.php | 2 +- src/Yasumi/Filters/OfficialHolidaysFilter.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index 66c1fec31..da6c5592c 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -80,7 +80,7 @@ public function accept(): bool } /** - * @return integer Returns the number of holidays between the given start and end date. + * @return int Returns the number of holidays between the given start and end date. */ public function count(): int { diff --git a/src/Yasumi/Filters/ObservedHolidaysFilter.php b/src/Yasumi/Filters/ObservedHolidaysFilter.php index e15e828dd..3e579288e 100644 --- a/src/Yasumi/Filters/ObservedHolidaysFilter.php +++ b/src/Yasumi/Filters/ObservedHolidaysFilter.php @@ -39,7 +39,7 @@ public function accept(): bool } /** - * @return integer Returns the number of filtered holidays. + * @return int Returns the number of filtered holidays. */ public function count(): int { diff --git a/src/Yasumi/Filters/OfficialHolidaysFilter.php b/src/Yasumi/Filters/OfficialHolidaysFilter.php index c58c39102..b0e68c439 100644 --- a/src/Yasumi/Filters/OfficialHolidaysFilter.php +++ b/src/Yasumi/Filters/OfficialHolidaysFilter.php @@ -39,7 +39,7 @@ public function accept(): bool } /** - * @return integer Returns the number of filtered holidays. + * @return int Returns the number of filtered holidays. */ public function count(): int { From 63eb9d5afac57fd8b2eb59800e4ebd73ef43eb93 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Mon, 9 Sep 2019 01:53:33 +0200 Subject: [PATCH 104/133] Good Friday is not an official holiday in Brazil (#174) --- CHANGELOG.md | 1 + src/Yasumi/Provider/Brazil.php | 2 +- tests/Brazil/BrazilTest.php | 2 +- tests/Brazil/GoodFridayTest.php | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba5e3b795..a59f9241e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Liberation Day is official in the Netherlands [\#169](https://github.com/azuyalabs/yasumi/pull/169) ([c960657](https://github.com/c960657)) - Typos in Easter Monday and Republic Day for the 'it_IT' locale [\#171](https://github.com/azuyalabs/yasumi/pull/171) ([c960657](https://github.com/c960657)) - Corrected the name of the Emperors Birthday function and variable. +- Good Friday is not official in Brazil [\#174](https://github.com/azuyalabs/yasumi/pull/174) ([c960657](https://github.com/c960657)) ### Removed - Unused constants. diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index 395d53bf9..b769484eb 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -52,7 +52,7 @@ public function initialize(): void $this->addHoliday($this->christmasDay($this->year, $this->timezone, $this->locale)); $this->addHoliday($this->easter($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE)); $this->addHoliday($this->corpusChristi($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE)); - $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale)); + $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE)); $this->addHoliday($this->ashWednesday($this->year, $this->timezone, $this->locale, Holiday::TYPE_OBSERVANCE)); /** diff --git a/tests/Brazil/BrazilTest.php b/tests/Brazil/BrazilTest.php index 87639488d..3dbbc32d8 100644 --- a/tests/Brazil/BrazilTest.php +++ b/tests/Brazil/BrazilTest.php @@ -33,7 +33,6 @@ public function testOfficialHolidays(): void { $this->assertDefinedHolidays([ 'newYearsDay', - 'goodFriday', 'tiradentesDay', 'internationalWorkersDay', 'independenceDay', @@ -53,6 +52,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'carnavalMonday', 'carnavalTuesday', + 'goodFriday', 'easter', 'corpusChristi', 'ashWednesday' diff --git a/tests/Brazil/GoodFridayTest.php b/tests/Brazil/GoodFridayTest.php index 439e16fc0..cb4c299b4 100644 --- a/tests/Brazil/GoodFridayTest.php +++ b/tests/Brazil/GoodFridayTest.php @@ -68,6 +68,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_OBSERVANCE); } } From 759d401a832c55d06670e6b9d7f57045b4121bbe Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 9 Sep 2019 21:34:04 +0900 Subject: [PATCH 105/133] Correction of nullable parameter. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/CommonHolidays.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index 3902f9491..a417c6ab6 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -535,7 +535,7 @@ public function winterTime($year, $timezone, $locale, $type = null): ?Holiday [], $date, $locale, - $type = Holiday::TYPE_SEASON + $type ?? Holiday::TYPE_SEASON ); } From 671fa1743bfd5997d7a4c3962d4b6d082cb63816 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 9 Sep 2019 21:49:20 +0900 Subject: [PATCH 106/133] Revert reference to classes using magic constants. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index e8d788d67..177e96d2d 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -155,7 +155,7 @@ public function addHoliday(Holiday $holiday) } $this->holidays[$holiday->shortName] = $holiday; - \uasort($this->holidays, [AbstractProvider::class, 'compareDates']); + \uasort($this->holidays, [__CLASS__, 'compareDates']); } From 003d100d36ae5cc45693da4361db985a00143212 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Thu, 12 Sep 2019 13:49:46 +0200 Subject: [PATCH 107/133] Add SubstituteHoliday (#162) --- CHANGELOG.md | 1 + src/Yasumi/Filters/AbstractFilter.php | 47 +++++ src/Yasumi/Filters/BankHolidaysFilter.php | 18 +- src/Yasumi/Filters/BetweenFilter.php | 17 +- src/Yasumi/Filters/ObservedHolidaysFilter.php | 18 +- src/Yasumi/Filters/OfficialHolidaysFilter.php | 18 +- src/Yasumi/Filters/OnFilter.php | 17 +- src/Yasumi/Filters/OtherHolidaysFilter.php | 18 +- src/Yasumi/Filters/SeasonalHolidaysFilter.php | 18 +- src/Yasumi/Holiday.php | 4 +- src/Yasumi/Provider/Ireland.php | 61 +++--- src/Yasumi/Provider/Japan.php | 31 +-- src/Yasumi/Provider/SouthAfrica.php | 32 +-- src/Yasumi/Provider/SouthKorea.php | 33 +-- src/Yasumi/Provider/USA.php | 33 +-- src/Yasumi/Provider/UnitedKingdom.php | 32 +-- src/Yasumi/SubstituteHoliday.php | 112 ++++++++++ .../data/translations/substituteHoliday.php | 22 ++ tests/Base/SubstituteHolidayTest.php | 194 ++++++++++++++++++ 19 files changed, 501 insertions(+), 225 deletions(-) create mode 100644 src/Yasumi/Filters/AbstractFilter.php create mode 100755 src/Yasumi/SubstituteHoliday.php create mode 100755 src/Yasumi/data/translations/substituteHoliday.php create mode 100644 tests/Base/SubstituteHolidayTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index a59f9241e..fe1929ada 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Observance holidays for Sweden [\#172](https://github.com/azuyalabs/yasumi/pull/172) ([c960657](https://github.com/c960657)) - Added additional code style fixers and aligning StyleCI settings with PHP-CS. - Included extra requirement for some PHP Extensions in the composer file. +- Special subclass of Holiday for substitute holidays [\#162](https://github.com/azuyalabs/yasumi/pull/162) ([c960657](https://github.com/c960657)) ### Changed - Updated the translation for the All Saints holiday for the 'fr_FR' locale [\#152](https://github.com/azuyalabs/yasumi/pull/152) ([pioc92](https://github.com/pioc92)) diff --git a/src/Yasumi/Filters/AbstractFilter.php b/src/Yasumi/Filters/AbstractFilter.php new file mode 100644 index 000000000..21daa2158 --- /dev/null +++ b/src/Yasumi/Filters/AbstractFilter.php @@ -0,0 +1,47 @@ + + */ + +namespace Yasumi\Filters; + +use Countable; +use FilterIterator; +use Iterator; +use Yasumi\SubstituteHoliday; + +/** + * AbstractFilter. + * + * @package Yasumi\Filters + */ +abstract class AbstractFilter extends FilterIterator implements Countable +{ + /** + * Returns the number of holidays returned by this iterator. + * + * In case a holiday is substituted (e.g. observed), the holiday is only counted once. + * + * @return int Number of unique holidays. + */ + public function count(): int + { + $names = \array_map(static function (&$holiday) { + if ($holiday instanceof SubstituteHoliday) { + return $holiday->substitutedHoliday->shortName; + } else { + return $holiday->shortName; + } + }, \iterator_to_array($this)); + + return \count(\array_unique($names)); + } +} diff --git a/src/Yasumi/Filters/BankHolidaysFilter.php b/src/Yasumi/Filters/BankHolidaysFilter.php index be649aad8..abcee3e70 100644 --- a/src/Yasumi/Filters/BankHolidaysFilter.php +++ b/src/Yasumi/Filters/BankHolidaysFilter.php @@ -12,8 +12,6 @@ namespace Yasumi\Filters; -use Countable; -use FilterIterator; use Yasumi\Holiday; /** @@ -26,7 +24,7 @@ * $holidays = Yasumi::create('Netherlands', 2015); * $bank = new BankHolidaysFilter($holidays->getIterator()); */ -class BankHolidaysFilter extends FilterIterator implements Countable +class BankHolidaysFilter extends AbstractFilter { /** * Checks whether the current element of the iterator is an observed holiday. @@ -37,18 +35,4 @@ public function accept(): bool { return $this->getInnerIterator()->current()->getType() === Holiday::TYPE_BANK; } - - /** - * @return integer Returns the number of filtered holidays. - */ - public function count(): int - { - $days = \array_keys(\iterator_to_array($this)); - - \array_walk($days, static function (&$day) { - $day = \str_replace('substituteHoliday:', '', $day); - }); - - return \count(\array_unique($days)); - } } diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index da6c5592c..5e59c4a1b 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -13,7 +13,6 @@ namespace Yasumi\Filters; -use Countable; use FilterIterator; use Iterator; @@ -27,7 +26,7 @@ * * @package Yasumi\Filters */ -class BetweenFilter extends FilterIterator implements Countable +class BetweenFilter extends AbstractFilter { /** * @var string start date of the time frame to check against @@ -78,18 +77,4 @@ public function accept(): bool return $holiday > $this->start_date && $holiday < $this->end_date; } - - /** - * @return int Returns the number of holidays between the given start and end date. - */ - public function count(): int - { - $days = \array_keys(\iterator_to_array($this)); - - \array_walk($days, static function (&$day) { - $day = \str_replace('substituteHoliday:', '', $day); - }); - - return \count(\array_unique($days)); - } } diff --git a/src/Yasumi/Filters/ObservedHolidaysFilter.php b/src/Yasumi/Filters/ObservedHolidaysFilter.php index 3e579288e..4d5bbd23c 100644 --- a/src/Yasumi/Filters/ObservedHolidaysFilter.php +++ b/src/Yasumi/Filters/ObservedHolidaysFilter.php @@ -12,8 +12,6 @@ namespace Yasumi\Filters; -use Countable; -use FilterIterator; use Yasumi\Holiday; /** @@ -26,7 +24,7 @@ * $holidays = Yasumi::create('Netherlands', 2015); * $observed = new ObservedHolidaysFilter($holidays->getIterator()); */ -class ObservedHolidaysFilter extends FilterIterator implements Countable +class ObservedHolidaysFilter extends AbstractFilter { /** * Checks whether the current element of the iterator is an observed holiday. @@ -37,18 +35,4 @@ public function accept(): bool { return $this->getInnerIterator()->current()->getType() === Holiday::TYPE_OBSERVANCE; } - - /** - * @return int Returns the number of filtered holidays. - */ - public function count(): int - { - $days = \array_keys(\iterator_to_array($this)); - - \array_walk($days, static function (&$day) { - $day = \str_replace('substituteHoliday:', '', $day); - }); - - return \count(\array_unique($days)); - } } diff --git a/src/Yasumi/Filters/OfficialHolidaysFilter.php b/src/Yasumi/Filters/OfficialHolidaysFilter.php index b0e68c439..7fe421018 100644 --- a/src/Yasumi/Filters/OfficialHolidaysFilter.php +++ b/src/Yasumi/Filters/OfficialHolidaysFilter.php @@ -12,8 +12,6 @@ namespace Yasumi\Filters; -use Countable; -use FilterIterator; use Yasumi\Holiday; /** @@ -26,7 +24,7 @@ * $holidays = Yasumi::create('Netherlands', 2015); * $official = new OfficialHolidaysFilter($holidays->getIterator()); */ -class OfficialHolidaysFilter extends FilterIterator implements Countable +class OfficialHolidaysFilter extends AbstractFilter { /** * Checks whether the current element of the iterator is an official holiday. @@ -37,18 +35,4 @@ public function accept(): bool { return $this->getInnerIterator()->current()->getType() === Holiday::TYPE_OFFICIAL; } - - /** - * @return int Returns the number of filtered holidays. - */ - public function count(): int - { - $days = \array_keys(\iterator_to_array($this)); - - \array_walk($days, static function (&$day) { - $day = \str_replace('substituteHoliday:', '', $day); - }); - - return \count(\array_unique($days)); - } } diff --git a/src/Yasumi/Filters/OnFilter.php b/src/Yasumi/Filters/OnFilter.php index 98d326e24..020c9bf7a 100644 --- a/src/Yasumi/Filters/OnFilter.php +++ b/src/Yasumi/Filters/OnFilter.php @@ -13,7 +13,6 @@ namespace Yasumi\Filters; -use Countable; use FilterIterator; use Iterator; @@ -26,7 +25,7 @@ * * @package Yasumi\Filters */ -class OnFilter extends FilterIterator implements Countable +class OnFilter extends AbstractFilter { /** * @var string date to check for holidays @@ -57,18 +56,4 @@ public function accept(): bool $holiday = $this->getInnerIterator()->current()->format('Y-m-d'); return $holiday === $this->date; } - - /** - * @return int Returns the number of holidays that happen on the specified date - */ - public function count(): int - { - $days = \array_keys(\iterator_to_array($this)); - - \array_walk($days, static function (&$day) { - $day = \str_replace('substituteHoliday:', '', $day); - }); - - return \count(\array_unique($days)); - } } diff --git a/src/Yasumi/Filters/OtherHolidaysFilter.php b/src/Yasumi/Filters/OtherHolidaysFilter.php index 06d4d31cb..bd141ec12 100644 --- a/src/Yasumi/Filters/OtherHolidaysFilter.php +++ b/src/Yasumi/Filters/OtherHolidaysFilter.php @@ -12,8 +12,6 @@ namespace Yasumi\Filters; -use Countable; -use FilterIterator; use Yasumi\Holiday; /** @@ -26,7 +24,7 @@ * $holidays = Yasumi::create('Netherlands', 2015); * $other = new OtherHolidaysFilter($holidays->getIterator()); */ -class OtherHolidaysFilter extends FilterIterator implements Countable +class OtherHolidaysFilter extends AbstractFilter { /** * Checks whether the current element of the iterator is an other type of holiday. @@ -37,18 +35,4 @@ public function accept(): bool { return $this->getInnerIterator()->current()->getType() === Holiday::TYPE_OTHER; } - - /** - * @return int Returns the number of filtered holidays. - */ - public function count(): int - { - $days = \array_keys(\iterator_to_array($this)); - - \array_walk($days, static function (&$day) { - $day = \str_replace('substituteHoliday:', '', $day); - }); - - return \count(\array_unique($days)); - } } diff --git a/src/Yasumi/Filters/SeasonalHolidaysFilter.php b/src/Yasumi/Filters/SeasonalHolidaysFilter.php index 367c80365..a98566de3 100644 --- a/src/Yasumi/Filters/SeasonalHolidaysFilter.php +++ b/src/Yasumi/Filters/SeasonalHolidaysFilter.php @@ -12,8 +12,6 @@ namespace Yasumi\Filters; -use Countable; -use FilterIterator; use Yasumi\Holiday; /** @@ -26,7 +24,7 @@ * $holidays = Yasumi::create('Netherlands', 2015); * $seasonal = new SeasonalHolidaysFilter($holidays->getIterator()); */ -class SeasonalHolidaysFilter extends FilterIterator implements Countable +class SeasonalHolidaysFilter extends AbstractFilter { /** * Checks whether the current element of the iterator is a seasonal holiday. @@ -37,18 +35,4 @@ public function accept(): bool { return $this->getInnerIterator()->current()->getType() === Holiday::TYPE_SEASON; } - - /** - * @return int Returns the number of filtered holidays. - */ - public function count(): int - { - $days = \array_keys(\iterator_to_array($this)); - - \array_walk($days, static function (&$day) { - $day = \str_replace('substituteHoliday:', '', $day); - }); - - return \count(\array_unique($days)); - } } diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 103d711bc..9408f77a6 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -71,12 +71,12 @@ class Holiday extends DateTime implements JsonSerializable /** * @var string identifies the type of holiday */ - private $type; + protected $type; /** * @var string Locale (i.e. language) in which the holiday information needs to be displayed in. (Default 'en_US') */ - private $displayLocale; + protected $displayLocale; /** * Creates a new Holiday. diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index 3a154c301..1e4aa8ef6 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -18,6 +18,7 @@ use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; +use Yasumi\SubstituteHoliday; /** * Provider for all holidays in Ireland. @@ -104,12 +105,15 @@ private function calculateNewYearsDay(): void // Substitute holiday is on the next available weekday if a holiday falls on a Sunday. if (0 === (int)$holiday->format('w')) { - $substituteHoliday = clone $holiday; - $substituteHoliday->modify('next monday'); - - $this->addHoliday(new Holiday('substituteHoliday:' . $substituteHoliday->shortName, [ - 'en_IE' => $substituteHoliday->getName() . ' observed' - ], $substituteHoliday, $this->locale)); + $date = clone $holiday; + $date->modify('next monday'); + + $this->addHoliday(new SubstituteHoliday( + $holiday, + [], + $date, + $this->locale + )); } } @@ -162,12 +166,15 @@ private function calculateChristmasDay(): void // Whenever Christmas Day does not fall on a weekday, the Tuesday following on it shall be a public holiday. if (\in_array((int)$holiday->format('w'), [0, 6], true)) { - $substituteHoliday = clone $holiday; - $substituteHoliday->modify('next tuesday'); - - $this->addHoliday(new Holiday('substituteHoliday:' . $substituteHoliday->shortName, [ - 'en_IE' => $substituteHoliday->getName() . ' observed' - ], $substituteHoliday, $this->locale)); + $date = clone $holiday; + $date->modify('next tuesday'); + + $this->addHoliday(new SubstituteHoliday( + $holiday, + [], + $date, + $this->locale + )); } } @@ -199,12 +206,15 @@ private function calculateStStephensDay(): void // Whenever St. Stephens Day does not fall on a weekday, the Monday following on it shall be a public holiday. if (\in_array((int)$holiday->format('w'), [0, 6], true)) { - $substituteHoliday = clone $holiday; - $substituteHoliday->modify('next monday'); - - $this->addHoliday(new Holiday('substituteHoliday:' . $substituteHoliday->shortName, [ - 'en_IE' => $substituteHoliday->getName() . ' observed' - ], $substituteHoliday, $this->locale)); + $date = clone $holiday; + $date->modify('next monday'); + + $this->addHoliday(new SubstituteHoliday( + $holiday, + [], + $date, + $this->locale + )); } } @@ -241,12 +251,15 @@ private function calculateStPatricksDay(): void // Substitute holiday is on the next available weekday if a holiday falls on a Saturday or Sunday if (\in_array((int)$holiday->format('w'), [0, 6], true)) { - $substituteHoliday = clone $holiday; - $substituteHoliday->modify('next monday'); - - $this->addHoliday(new Holiday('substituteHoliday:' . $substituteHoliday->shortName, [ - 'en_IE' => $substituteHoliday->getName() . ' observed' - ], $substituteHoliday, $this->locale)); + $date = clone $holiday; + $date->modify('next monday'); + + $this->addHoliday(new SubstituteHoliday( + $holiday, + [], + $date, + $this->locale + )); } } diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 98b5daf6f..99eb596a0 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -20,6 +20,7 @@ use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; +use Yasumi\SubstituteHoliday; /** * Provider for all holidays in the Japan. @@ -524,20 +525,20 @@ private function calculateSubstituteHolidays(): void $dates = $this->getHolidayDates(); // Loop through all holidays - foreach ($this->getHolidays() as $shortName => $date) { - $substituteDay = clone $date; + foreach ($this->getHolidays() as $shortName => $holiday) { + $date = clone $holiday; // If holidays falls on a Sunday - if (0 === (int)$date->format('w')) { + if (0 === (int)$holiday->format('w')) { if ($this->year >= 2007) { // Find next week day (not being another holiday) - while (\in_array($substituteDay, $dates, false)) { - $substituteDay->add(new DateInterval('P1D')); + while (\in_array($date, $dates, false)) { + $date->add(new DateInterval('P1D')); continue; } - } elseif ($date >= '1973-04-12') { - $substituteDay->add(new DateInterval('P1D')); - if (\in_array($substituteDay, $dates, false)) { + } elseif ($holiday >= '1973-04-12') { + $date->add(new DateInterval('P1D')); + if (\in_array($date, $dates, false)) { continue; // @codeCoverageIgnore } } else { @@ -545,12 +546,14 @@ private function calculateSubstituteHolidays(): void } // Add a new holiday that is substituting the original holiday - $substituteHoliday = new Holiday('substituteHoliday:' . $shortName, [ - 'en_US' => $date->translations['en_US'] . ' Observed', - 'ja_JP' => '振替休日 (' . $date->translations['ja_JP'] . ')' - ], $substituteDay, $this->locale); - - $this->addHoliday($substituteHoliday); + $substitute = new SubstituteHoliday( + $holiday, + [], + $date, + $this->locale + ); + + $this->addHoliday($substitute); } } } diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index 371fdd49c..c749942fd 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -19,6 +19,7 @@ use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; +use Yasumi\SubstituteHoliday; /** * Provider for all holidays in South Africa. @@ -323,31 +324,20 @@ private function calculateSubstituteDayOfGoodwill(): void */ private function calculateSubstituteHolidays(): void { - $datesIterator = $this->getIterator(); - // Loop through all defined holidays - while ($datesIterator->valid()) { - - // Exclude Good Friday, Family Day, 2016 Municipal Elections Day as these don't fall in the weekend - if (\in_array( - $datesIterator->current()->shortName, - ['goodFriday', 'familyDay', '2016MunicipalElectionsDay'], - true - )) { - $datesIterator->next(); - } - + foreach ($this->getHolidays() as $holiday) { // Substitute holiday is on a Monday in case the holiday falls on a Sunday - if (0 === (int)$datesIterator->current()->format('w')) { - $substituteHoliday = clone $datesIterator->current(); - $substituteHoliday->add(new DateInterval('P1D')); + if (0 === (int)$holiday->format('w')) { + $date = clone $holiday; + $date->add(new DateInterval('P1D')); - $this->addHoliday(new Holiday('substituteHoliday:' . $substituteHoliday->shortName, [ - 'en_ZA' => $substituteHoliday->getName() . ' observed' - ], $substituteHoliday, $this->locale)); + $this->addHoliday(new SubstituteHoliday( + $holiday, + [], + $date, + $this->locale + )); } - - $datesIterator->next(); } } } diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 839807188..7216adfe3 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -19,6 +19,7 @@ use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; +use Yasumi\SubstituteHoliday; /** * Provider for all holidays in the South Korea except for election day and temporary public holiday. @@ -478,7 +479,7 @@ public function calculateSubstituteHolidays(): void ]; // Loop through all holidays - foreach ($holidays as $shortName => $date) { + foreach ($holidays as $shortName => $holiday) { // Get list of holiday dates except this $holidayDates = \array_map(static function ($holiday) use ($shortName) { return $holiday->shortName === $shortName ? false : (string)$holiday; @@ -487,32 +488,34 @@ public function calculateSubstituteHolidays(): void // Only process accepted holidays and conditions if (\in_array($shortName, $acceptedHolidays, true) && ( - 0 === (int)$date->format('w') - || \in_array($date, $holidayDates, false) - || (6 === (int)$date->format('w') && 'childrensDay' === $shortName) + 0 === (int)$holiday->format('w') + || \in_array($holiday, $holidayDates, false) + || (6 === (int)$holiday->format('w') && 'childrensDay' === $shortName) ) ) { - $substitute = clone $date; + $date = clone $holiday; // Find next week day (not being another holiday) - while (0 === (int)$substitute->format('w') - || (6 === (int)$substitute->format('w') && 'childrensDay' === $shortName) - || \in_array($substitute, $holidayDates, false)) { - $substitute->add(new DateInterval('P1D')); + while (0 === (int)$date->format('w') + || (6 === (int)$date->format('w') && 'childrensDay' === $shortName) + || \in_array($date, $holidayDates, false)) { + $date->add(new DateInterval('P1D')); continue; } // Add a new holiday that is substituting the original holiday - $holiday = new Holiday("substituteHoliday:$substitute->shortName", [ - 'en_US' => $substitute->translations['en_US'] . ' Observed', - 'ko_KR' => '대체공휴일' - ], $substitute, $this->locale); + $substitute = new SubstituteHoliday( + $holiday, + [], + $date, + $this->locale + ); // Add a new holiday that is substituting the original holiday - $this->addHoliday($holiday); + $this->addHoliday($substitute); // Add substitute holiday to the list - $holidays[] = $holiday; + $holidays[] = $substitute; } } } diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 538842607..c7cbb07f1 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -18,6 +18,7 @@ use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; +use Yasumi\SubstituteHoliday; /** * Provider for all holidays in the USA. @@ -267,31 +268,31 @@ private function calculateThanksgivingDay(): void */ private function calculateSubstituteHolidays(): void { - $datesIterator = $this->getIterator(); - $substituteHoliday = null; - // Loop through all defined holidays - while ($datesIterator->valid()) { + foreach ($this->getHolidays() as $holiday) { + $date = null; + // Substitute holiday is on a Monday in case the holiday falls on a Sunday - if (0 === (int)$datesIterator->current()->format('w')) { - $substituteHoliday = clone $datesIterator->current(); - $substituteHoliday->add(new DateInterval('P1D')); + if (0 === (int)$holiday->format('w')) { + $date = clone $holiday; + $date->add(new DateInterval('P1D')); } // Substitute holiday is on a Friday in case the holiday falls on a Saturday - if (6 === (int)$datesIterator->current()->format('w')) { - $substituteHoliday = clone $datesIterator->current(); - $substituteHoliday->sub(new DateInterval('P1D')); + if (6 === (int)$holiday->format('w')) { + $date = clone $holiday; + $date->sub(new DateInterval('P1D')); } // Add substitute holiday - if ($substituteHoliday instanceof Holiday) { - $this->addHoliday(new Holiday('substituteHoliday:' . $substituteHoliday->shortName, [ - 'en_US' => $substituteHoliday->getName() . ' observed' - ], $substituteHoliday, $this->locale)); + if ($date instanceof Holiday) { + $this->addHoliday(new SubstituteHoliday( + $holiday, + [], + $date, + $this->locale + )); } - - $datesIterator->next(); } } } diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 4e4994ba7..4bdb861dc 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -18,6 +18,7 @@ use Yasumi\Exception\InvalidDateException; use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; +use Yasumi\SubstituteHoliday; /** * Provider for all holidays in the United Kingdom. Local holidays/observances (e.g. Wales, England, Guernsey, etc.) @@ -270,32 +271,31 @@ private function calculateSummerBankHoliday(): void */ private function calculateChristmasHolidays(): void { - $christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone)); - $boxingDay = new DateTime("$this->year-12-26", new DateTimeZone($this->timezone)); + $christmasDay = $this->christmasDay($this->year, $this->timezone, $this->locale); + $secondChristmasDay = $this->secondChristmasDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK); - $this->addHoliday(new Holiday('christmasDay', [], $christmasDay, $this->locale)); - $this->addHoliday(new Holiday('secondChristmasDay', [], $boxingDay, $this->locale, Holiday::TYPE_BANK)); - - $substituteChristmasDay = clone $christmasDay; - $substituteBoxingDay = clone $boxingDay; + $this->addHoliday($christmasDay); + $this->addHoliday($secondChristmasDay); if (\in_array((int)$christmasDay->format('w'), [0, 6], true)) { - $substituteChristmasDay->add(new DateInterval('P2D')); - $this->addHoliday(new Holiday( - 'substituteHoliday:christmasDay', + $date = clone $christmasDay; + $date->add(new DateInterval('P2D')); + $this->addHoliday(new SubstituteHoliday( + $christmasDay, [], - $substituteChristmasDay, + $date, $this->locale, Holiday::TYPE_BANK )); } - if (\in_array((int)$boxingDay->format('w'), [0, 6], true)) { - $substituteBoxingDay->add(new DateInterval('P2D')); - $this->addHoliday(new Holiday( - 'substituteHoliday:secondChristmasDay', + if (\in_array((int)$secondChristmasDay->format('w'), [0, 6], true)) { + $date = clone $secondChristmasDay; + $date->add(new DateInterval('P2D')); + $this->addHoliday(new SubstituteHoliday( + $secondChristmasDay, [], - $substituteBoxingDay, + $date, $this->locale, Holiday::TYPE_BANK )); diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php new file mode 100755 index 000000000..4a079ca58 --- /dev/null +++ b/src/Yasumi/SubstituteHoliday.php @@ -0,0 +1,112 @@ + + */ + +namespace Yasumi; + +use Yasumi\Exception\UnknownLocaleException; + +/** + * Class SubstituteHoliday. + * + * A substitute holiday is a holiday given in lieu of another holiday, if that day falls in a weekend or + * overlaps with other holidays, so that people do not "lose" a day off in these years. + * + * @link https://en.wikipedia.org/wiki/Substitute_holiday + */ +class SubstituteHoliday extends Holiday +{ + /** + * @var Holiday + */ + public $substitutedHoliday; + + /** + * @var array list of translations of the "{0} observed" pattern + */ + public $substituteHolidayTranslations; + + /** + * Creates a new SubstituteHoliday. + * + * If a holiday date needs to be defined for a specific timezone, make sure that the date instance + * (DateTimeInterface) has the correct timezone set. Otherwise the default system timezone is used. + * + * @param Holiday $substitutedHoliday The holiday being substituted + * @param array $names An array containing the name/description of this holiday + * in various languages. Overrides global translations + * @param \DateTimeInterface $date A DateTimeInterface instance representing the date of the holiday + * @param string $displayLocale Locale (i.e. language) in which the holiday information needs to + * be displayed in. (Default 'en_US') + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, + * TYPE_OBSERVANCE, TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default + * an official holiday is considered. + * + * @throws \Yasumi\Exception\InvalidDateException + * @throws UnknownLocaleException + * @throws \InvalidArgumentException + * @throws \Exception + */ + public function __construct( + Holiday $substitutedHoliday, + array $names, + \DateTimeInterface $date, + string $displayLocale = self::DEFAULT_LOCALE, + string $type = self::TYPE_OFFICIAL + ) { + $this->substitutedHoliday = $substitutedHoliday; + + $shortName = 'substituteHoliday:' . $substitutedHoliday->shortName; + + if ($date == $substitutedHoliday) { + throw new \InvalidArgumentException('Date must differ from the substituted holiday'); + } + + // Construct instance + parent::__construct($shortName, $names, $date, $displayLocale, $type); + } + + /** + * Returns the name of this holiday. + * + * The name of this holiday is returned translated in the given locale. If for the given locale no translation is + * defined, the name in the default locale ('en_US') is returned. In case there is no translation at all, the short + * internal name is returned. + */ + public function getName(): string + { + $name = parent::getName(); + + if ($name === $this->shortName) { + $pattern = $this->substituteHolidayTranslations[$this->displayLocale] + ?? $this->substituteHolidayTranslations[self::DEFAULT_LOCALE] + ?? $this->shortName; + + $name = \str_replace('{0}', $this->substitutedHoliday->getName(), $pattern); + } + + return $name; + } + + /** + * Merges local translations (preferred) with global translations. + * + * @param TranslationsInterface $globalTranslations global translations + */ + public function mergeGlobalTranslations(TranslationsInterface $globalTranslations) + { + $this->substituteHolidayTranslations = $globalTranslations->getTranslations('substituteHoliday'); + + parent::mergeGlobalTranslations($globalTranslations); + + $this->substitutedHoliday->mergeGlobalTranslations($globalTranslations); + } +} diff --git a/src/Yasumi/data/translations/substituteHoliday.php b/src/Yasumi/data/translations/substituteHoliday.php new file mode 100755 index 000000000..7dda2b9a4 --- /dev/null +++ b/src/Yasumi/data/translations/substituteHoliday.php @@ -0,0 +1,22 @@ + + */ + +// Translation pattern for substitute holidays. +return [ + 'da_DK' => '{0} (erstatning)', + 'en_GB' => '{0} (substitute day)', + 'en_IE' => '{0} observed', + 'en_US' => '{0} observed', + 'en_ZA' => '{0} observed', + 'ja_JP' => '振替休日 ({0})', + 'ko_KR' => '대체공휴일', +]; diff --git a/tests/Base/SubstituteHolidayTest.php b/tests/Base/SubstituteHolidayTest.php new file mode 100644 index 000000000..54f1741ad --- /dev/null +++ b/tests/Base/SubstituteHolidayTest.php @@ -0,0 +1,194 @@ + + */ + +namespace Yasumi\tests\Base; + +use DateTime; +use InvalidArgumentException; +use PHPUnit\Framework\TestCase; +use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; +use Yasumi\SubstituteHoliday; +use Yasumi\tests\YasumiBase; +use Yasumi\TranslationsInterface; + +/** + * Class SubstituteHolidayTest. + * + * Contains tests for testing the SubstituteHoliday class + */ +class SubstituteHolidayTest extends TestCase +{ + use YasumiBase; + + /** + * Tests that an UnknownLocaleException is thrown in case an invalid locale is given. + * + * @throws \Exception + */ + public function testCreateSubstituteHolidayUnknownLocaleException(): void + { + $holiday = new Holiday('testHoliday', [], new DateTime()); + + $this->expectException(UnknownLocaleException::class); + + new SubstituteHoliday($holiday, [], new DateTime(), 'wx-YZ'); + } + + /** + * Tests that an InvalidArgumentException is thrown in case the substitute is on the same date as the substituted. + * @throws \Exception + */ + public function testCreateSubstituteHolidaySameDate(): void + { + $holiday = new Holiday('testHoliday', [], new DateTime('2019-01-01')); + + $this->expectException(InvalidArgumentException::class); + + new SubstituteHoliday($holiday, [], new DateTime('2019-01-01')); + } + + /** + * Tests the constructor. + * + * @throws \Exception + */ + public function testConstructor(): void + { + $holiday = new Holiday('testHoliday', [], new DateTime('2019-01-01'), 'en_US', Holiday::TYPE_BANK); + $substitute = new SubstituteHoliday($holiday, [], new DateTime('2019-01-02'), 'en_US', Holiday::TYPE_SEASON); + + $this->assertSame($holiday, $substitute->substitutedHoliday); + $this->assertEquals('substituteHoliday:testHoliday', $substitute->shortName); + $this->assertEquals(Holiday::TYPE_SEASON, $substitute->getType()); + $this->assertEquals(new DateTime('2019-01-02'), $substitute); + } + + /** + * Tests that a Yasumi holiday instance can be serialized to a JSON object. + * @throws \Exception + */ + public function testSubstituteHolidayIsJsonSerializable(): void + { + $holiday = new Holiday('testHoliday', [], new DateTime('2019-01-01'), 'en_US'); + $substitute = new SubstituteHoliday($holiday, [], new DateTime('2019-01-02'), 'en_US'); + $json = \json_encode($substitute); + $instance = \json_decode($json, true); + + $this->assertIsArray($instance); + $this->assertNotNull($instance); + $this->assertArrayHasKey('shortName', $instance); + $this->assertArrayHasKey('substitutedHoliday', $instance); + } + + /** + * Tests that a Yasumi holiday instance can be created using an object that implements the DateTimeInterface (e.g. + * DateTime or DateTimeImmutable) + * @throws \Exception + */ + public function testSubstituteHolidayWithDateTimeInterface(): void + { + // Assert with DateTime instance + $holiday = new Holiday('testHoliday', [], new DateTime('2019-01-01'), 'en_US'); + $substitute = new SubstituteHoliday($holiday, [], new DateTime('2019-01-02'), 'en_US'); + $this->assertNotNull($holiday); + $this->assertInstanceOf(SubstituteHoliday::class, $substitute); + + // Assert with DateTimeImmutable instance + $substitute = new SubstituteHoliday($holiday, [], new \DateTimeImmutable(), 'en_US'); + $this->assertNotNull($holiday); + $this->assertInstanceOf(SubstituteHoliday::class, $substitute); + } + + /** + * Tests the getName function of the SubstituteHoliday object with no translations for the name given. + * @throws \Exception + */ + public function testSubstituteHolidayGetNameWithNoTranslations(): void + { + $name = 'testHoliday'; + $holiday = new Holiday($name, [], new DateTime('2019-01-01')); + $substitute = new SubstituteHoliday($holiday, [], new DateTime('2019-01-02'), 'en_US'); + + $this->assertIsString($substitute->getName()); + $this->assertEquals('substituteHoliday:' . $name, $substitute->getName()); + } + + /** + * Tests the getName function of the SubstituteHoliday object when it has a custom translation. + * @throws \Exception + */ + public function testSubstituteHolidayGetNameWithCustomSubstituteTranslation(): void + { + $name = 'testHoliday'; + $translation = 'My Holiday'; + $locale = 'en_US'; + $holiday = new Holiday($name, [$locale => 'foo'], new DateTime('2019-01-01'), $locale); + $substitute = new SubstituteHoliday($holiday, [$locale => $translation], new DateTime('2019-01-02'), $locale); + + $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); + $translationsStub->expects($this->at(0))->method('getTranslations')->with($this->equalTo('substituteHoliday'))->willReturn([$locale => 'foo']); + $translationsStub->expects($this->at(1))->method('getTranslations')->with($this->equalTo('substituteHoliday:testHoliday'))->willReturn([$locale => 'foo']); + $translationsStub->expects($this->at(2))->method('getTranslations')->with($this->equalTo('testHoliday'))->willReturn([$locale => 'foo']); + + $substitute->mergeGlobalTranslations($translationsStub); + + $this->assertIsString($substitute->getName()); + $this->assertEquals($translation, $substitute->getName()); + } + + /** + * Tests the getName function of the SubstituteHoliday object when it has a global translation. + * @throws \Exception + */ + public function testSubstituteHolidayGetNameWithGlobalSubstituteTranslation(): void + { + $name = 'testHoliday'; + $translation = 'My Substitute'; + $locale = 'en_US'; + $holiday = new Holiday($name, [$locale => 'foo'], new DateTime('2019-01-01'), $locale); + $substitute = new SubstituteHoliday($holiday, [$locale => $translation], new DateTime('2019-01-02'), $locale); + + $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); + $translationsStub->expects($this->at(0))->method('getTranslations')->with($this->equalTo('substituteHoliday'))->willReturn([$locale => '{0} observed']); + $translationsStub->expects($this->at(1))->method('getTranslations')->with($this->equalTo('substituteHoliday:testHoliday'))->willReturn([$locale => $translation]); + $translationsStub->expects($this->at(2))->method('getTranslations')->with($this->equalTo('testHoliday'))->willReturn([$locale => 'foo']); + + $substitute->mergeGlobalTranslations($translationsStub); + + $this->assertIsString($substitute->getName()); + $this->assertEquals($translation, $substitute->getName()); + } + + /** + * Tests the getName function of the SubstituteHoliday object when only the substituted holiday has a translation. + * @throws \Exception + */ + public function testSubstituteHolidayGetNameWithSubstitutedTranslation(): void + { + $name = 'testHoliday'; + $translation = 'My Holiday'; + $locale = 'en_US'; + $holiday = new Holiday($name, [$locale => $translation], new DateTime('2019-01-01'), $locale); + $substitute = new SubstituteHoliday($holiday, [], new DateTime('2019-01-02'), $locale); + + $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); + $translationsStub->expects($this->at(0))->method('getTranslations')->with($this->equalTo('substituteHoliday'))->willReturn([$locale => '{0} observed']); + $translationsStub->expects($this->at(1))->method('getTranslations')->with($this->equalTo('substituteHoliday:testHoliday'))->willReturn([]); + $translationsStub->expects($this->at(2))->method('getTranslations')->with($this->equalTo('testHoliday'))->willReturn([$locale => $translation]); + + $substitute->mergeGlobalTranslations($translationsStub); + + $this->assertIsString($substitute->getName()); + $this->assertEquals('My Holiday observed', $substitute->getName()); + } +} From f5cb7bdc18412be1f73e6ed9839d9ee4ebfe5497 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 14 Sep 2019 15:43:04 +0900 Subject: [PATCH 108/133] Applying the use of strict types. Signed-off-by: Sacha Telgenhof --- src/Yasumi/SubstituteHoliday.php | 5 +++-- src/Yasumi/data/translations/substituteHoliday.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index 4a079ca58..cb132bd0f 100755 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -1,4 +1,4 @@ - Date: Sat, 14 Sep 2019 15:43:28 +0900 Subject: [PATCH 109/133] Removed unused imports. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Filters/AbstractFilter.php | 5 ++--- src/Yasumi/Filters/BetweenFilter.php | 1 - src/Yasumi/Filters/OnFilter.php | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Yasumi/Filters/AbstractFilter.php b/src/Yasumi/Filters/AbstractFilter.php index 21daa2158..a82353db5 100644 --- a/src/Yasumi/Filters/AbstractFilter.php +++ b/src/Yasumi/Filters/AbstractFilter.php @@ -15,7 +15,6 @@ use Countable; use FilterIterator; -use Iterator; use Yasumi\SubstituteHoliday; /** @@ -37,9 +36,9 @@ public function count(): int $names = \array_map(static function (&$holiday) { if ($holiday instanceof SubstituteHoliday) { return $holiday->substitutedHoliday->shortName; - } else { - return $holiday->shortName; } + + return $holiday->shortName; }, \iterator_to_array($this)); return \count(\array_unique($names)); diff --git a/src/Yasumi/Filters/BetweenFilter.php b/src/Yasumi/Filters/BetweenFilter.php index 5e59c4a1b..73d556d64 100644 --- a/src/Yasumi/Filters/BetweenFilter.php +++ b/src/Yasumi/Filters/BetweenFilter.php @@ -13,7 +13,6 @@ namespace Yasumi\Filters; -use FilterIterator; use Iterator; /** diff --git a/src/Yasumi/Filters/OnFilter.php b/src/Yasumi/Filters/OnFilter.php index 020c9bf7a..f32b10554 100644 --- a/src/Yasumi/Filters/OnFilter.php +++ b/src/Yasumi/Filters/OnFilter.php @@ -13,7 +13,6 @@ namespace Yasumi\Filters; -use FilterIterator; use Iterator; /** From 68d4b1e97eaa57a904dab2313cdff056205b3f4f Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 14 Sep 2019 15:46:50 +0900 Subject: [PATCH 110/133] Applying the use of strict types. Signed-off-by: Sacha Telgenhof --- .php_cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.php_cs b/.php_cs index 5265511d1..c145f4e81 100644 --- a/.php_cs +++ b/.php_cs @@ -1,4 +1,4 @@ - Date: Sat, 14 Sep 2019 15:47:05 +0900 Subject: [PATCH 111/133] Removed unused library. Signed-off-by: Sacha Telgenhof --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index b3aec3538..7dce24c30 100755 --- a/composer.json +++ b/composer.json @@ -27,7 +27,6 @@ "friendsofphp/php-cs-fixer": "^2.14", "fzaninotto/faker": "~1.8", "mikey179/vfsstream": "~1.6", - "phan/phan": "^2.2", "phpunit/phpunit": "~8.3" }, "autoload": { From dbe4c5fe72235f8f325fc26977fc90337d4dc841 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 14 Sep 2019 16:18:17 +0900 Subject: [PATCH 112/133] Added unit tests for the createByISO3166-2 method. Signed-off-by: Sacha Telgenhof --- tests/Base/YasumiTest.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index 335accb5c..f791a1217 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -25,6 +25,7 @@ use Yasumi\Exception\InvalidYearException; use Yasumi\Exception\ProviderNotFoundException; use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Provider\AbstractProvider; use Yasumi\tests\YasumiBase; use Yasumi\Yasumi; @@ -558,4 +559,39 @@ public function testRemoveHoliday(): void $this->assertArrayNotHasKey('augustHoliday', $holidaysAfterRemoval); $this->assertArrayNotHasKey('octoberHoliday', $holidaysAfterRemoval); } + + /** + * Tests that a holiday provider instance can be created by using the ISO3166-2 + * country/region code. (Using the Yasumi::createByISO3166_2 method) + * + * @throws ReflectionException + */ + public function testCreateByISO3166_2(): void + { + $year = Factory::create()->numberBetween( + self::YEAR_LOWER_BOUND, + self::YEAR_UPPER_BOUND + ); + + $provider = Yasumi::createByISO3166_2( + 'JP', + $year + ); + + $this->assertInstanceOf(AbstractProvider::class, $provider); + $this->assertEquals($year, $provider->getYear()); + } + + /** + * Tests that a ProviderNotFoundException is thrown when providing a invalid + * ISO3166-2 code when using the Yasumi::createByISO3166_2 method. + * + * @throws ReflectionException + */ + public function testCreateByISO3166_2WithInvalidCode(): void + { + $this->expectException(ProviderNotFoundException::class); + + Yasumi::createByISO3166_2('XX', 2019); + } } From 3af5c4e45f7841f25838ef13b13a5ce0516ccbfd Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 14 Sep 2019 20:12:53 +0900 Subject: [PATCH 113/133] Added unit tests that asserts the working of adding a holiday instance to a provider. Signed-off-by: Sacha Telgenhof --- tests/Base/YasumiTest.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/Base/YasumiTest.php b/tests/Base/YasumiTest.php index f791a1217..f65159114 100644 --- a/tests/Base/YasumiTest.php +++ b/tests/Base/YasumiTest.php @@ -25,6 +25,7 @@ use Yasumi\Exception\InvalidYearException; use Yasumi\Exception\ProviderNotFoundException; use Yasumi\Exception\UnknownLocaleException; +use Yasumi\Holiday; use Yasumi\Provider\AbstractProvider; use Yasumi\tests\YasumiBase; use Yasumi\Yasumi; @@ -594,4 +595,35 @@ public function testCreateByISO3166_2WithInvalidCode(): void Yasumi::createByISO3166_2('XX', 2019); } + + /** + * Tests that a holiday can be added to a provider. In addition, it + * tests that the same holiday instance isn't added twice. + * + * @throws ReflectionException + * @throws Exception + */ + public function testAddExistingHoliday(): void + { + $provider = Yasumi::createByISO3166_2('NL', 2019); + $holidayName = 'testHoliday'; + + $holiday = new Holiday($holidayName, [], new DateTime()); + $originalHolidays = $provider->getHolidayNames(); + + // Add a new holiday + $provider->addHoliday($holiday); + $newHolidays = $provider->getHolidayNames(); + $this->assertContains($holidayName, $provider->getHolidayNames()); + $this->assertNotSameSize($originalHolidays, $newHolidays); + $this->assertNotEquals($newHolidays, $originalHolidays); + + // Add same holiday again + $provider->addHoliday($holiday); + $this->assertContains($holidayName, $provider->getHolidayNames()); + $this->assertSameSize($newHolidays, $provider->getHolidayNames()); + $this->assertNotSameSize($originalHolidays, $provider->getHolidayNames()); + $this->assertEquals($newHolidays, $provider->getHolidayNames()); + $this->assertNotEquals($originalHolidays, $provider->getHolidayNames()); + } } From ded7c3068712eb686e155dca79c527390e16f5a7 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Thu, 19 Sep 2019 16:29:20 +0900 Subject: [PATCH 114/133] Refactored the count method to use the new SubstituteHoliday class. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 1 + src/Yasumi/Provider/AbstractProvider.php | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe1929ada..24c7ea362 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Code using class imports rather than Fully Qualified Class names. - Upgraded to PHPUnit 8. - Replaced the standard 'InvalidArgumentException' when an invalid year or holiday provider are given by a new exception for each of these two situations separately ('InvalidYearException' and 'ProviderNotFoundException'). This allows you to better distinguish which exception may occur when instantiating the Yasumi class. [\#95](https://github.com/azuyalabs/yasumi/pull/95) ([qneyrat](https://github.com/qneyrat)) +- Refactored the AbstractProvider::count method to use the newly added SubstituteHoliday class. ### Fixed - Late Summer Bank Holiday in 1968 and 1969 in United Kingdom [\#161](https://github.com/azuyalabs/yasumi/pull/161) ([c960657](https://github.com/c960657)) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 177e96d2d..3b81a5999 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -22,6 +22,7 @@ use Yasumi\Filters\OnFilter; use Yasumi\Holiday; use Yasumi\ProviderInterface; +use Yasumi\SubstituteHoliday; use Yasumi\TranslationsInterface; use Yasumi\Yasumi; @@ -302,13 +303,15 @@ public function whatWeekDayIs($shortName): int */ public function count(): int { - $list = $this->getHolidayNames(); + $names = \array_map(static function (&$holiday) { + if ($holiday instanceof SubstituteHoliday) { + return $holiday->substitutedHoliday->shortName; + } - \array_walk($list, static function (&$holiday) { - $holiday = \str_replace('substituteHoliday:', '', $holiday); - }); + return $holiday->shortName; + }, $this->getHolidays()); - return \count(\array_unique($list)); + return \count(\array_unique($names)); } /** From c0057a69f3863d907848f46da72054a938252903 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Fri, 20 Sep 2019 01:52:25 +0200 Subject: [PATCH 115/133] Add England, Wales, Scotland, Northern Ireland (#166) --- CHANGELOG.md | 1 + src/Yasumi/Provider/Romania.php | 10 +- src/Yasumi/Provider/UnitedKingdom.php | 19 +- src/Yasumi/Provider/UnitedKingdom/England.php | 34 +++ .../UnitedKingdom/NorthernIreland.php | 149 +++++++++++++ .../Provider/UnitedKingdom/Scotland.php | 203 ++++++++++++++++++ src/Yasumi/Provider/UnitedKingdom/Wales.php | 34 +++ .../data/translations/secondNewYearsDay.php | 17 ++ src/Yasumi/data/translations/stAndrewsDay.php | 18 ++ tests/Romania/RomaniaTest.php | 2 +- ...AndrewDayTest.php => StAndrewsDayTest.php} | 4 +- tests/UnitedKingdom/England/BoxingDayTest.php | 96 +++++++++ .../England/ChristmasDayTest.php | 96 +++++++++ .../England/EasterMondayTest.php | 95 ++++++++ .../England/EnglandBaseTestCase.php | 44 ++++ tests/UnitedKingdom/England/EnglandTest.php | 88 ++++++++ .../UnitedKingdom/England/GoodFridayTest.php | 68 ++++++ .../England/MayDayBankHolidayTest.php | 112 ++++++++++ .../UnitedKingdom/England/NewYearsDayTest.php | 126 +++++++++++ .../England/SpringBankHolidayTest.php | 112 ++++++++++ .../England/SummerBankHolidayTest.php | 150 +++++++++++++ .../NorthernIreland/BattleOfTheBoyneTest.php | 117 ++++++++++ .../NorthernIreland/BoxingDayTest.php | 96 +++++++++ .../NorthernIreland/ChristmasDayTest.php | 96 +++++++++ .../NorthernIreland/EasterMondayTest.php | 95 ++++++++ .../NorthernIreland/GoodFridayTest.php | 68 ++++++ .../NorthernIreland/MayDayBankHolidayTest.php | 112 ++++++++++ .../NorthernIreland/NewYearsDayTest.php | 126 +++++++++++ .../NorthernIrelandBaseTestCase.php | 44 ++++ .../NorthernIreland/NorthernIrelandTest.php | 89 ++++++++ .../NorthernIreland/SpringBankHolidayTest.php | 91 ++++++++ .../NorthernIreland/StPatricksDayTest.php | 117 ++++++++++ .../NorthernIreland/SummerBankHolidayTest.php | 150 +++++++++++++ .../UnitedKingdom/Scotland/BoxingDayTest.php | 96 +++++++++ .../Scotland/ChristmasDayTest.php | 96 +++++++++ .../UnitedKingdom/Scotland/GoodFridayTest.php | 68 ++++++ .../Scotland/MayDayBankHolidayTest.php | 112 ++++++++++ .../Scotland/NewYearsDayTest.php | 136 ++++++++++++ .../Scotland/ScotlandBaseTestCase.php | 44 ++++ tests/UnitedKingdom/Scotland/ScotlandTest.php | 87 ++++++++ .../Scotland/SecondNewYearsDayTest.php | 136 ++++++++++++ .../Scotland/SpringBankHolidayTest.php | 91 ++++++++ .../Scotland/StAndrewsDayTest.php | 104 +++++++++ .../Scotland/SummerBankHolidayTest.php | 91 ++++++++ tests/UnitedKingdom/SummerBankHolidayTest.php | 9 +- tests/UnitedKingdom/Wales/BoxingDayTest.php | 96 +++++++++ .../UnitedKingdom/Wales/ChristmasDayTest.php | 96 +++++++++ .../UnitedKingdom/Wales/EasterMondayTest.php | 95 ++++++++ tests/UnitedKingdom/Wales/GoodFridayTest.php | 68 ++++++ .../Wales/MayDayBankHolidayTest.php | 112 ++++++++++ tests/UnitedKingdom/Wales/NewYearsDayTest.php | 126 +++++++++++ .../Wales/SpringBankHolidayTest.php | 112 ++++++++++ .../Wales/SummerBankHolidayTest.php | 150 +++++++++++++ .../UnitedKingdom/Wales/WalesBaseTestCase.php | 44 ++++ tests/UnitedKingdom/Wales/WalesTest.php | 88 ++++++++ 55 files changed, 4719 insertions(+), 17 deletions(-) create mode 100644 src/Yasumi/Provider/UnitedKingdom/England.php create mode 100644 src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php create mode 100644 src/Yasumi/Provider/UnitedKingdom/Scotland.php create mode 100644 src/Yasumi/Provider/UnitedKingdom/Wales.php create mode 100755 src/Yasumi/data/translations/secondNewYearsDay.php create mode 100644 src/Yasumi/data/translations/stAndrewsDay.php rename tests/Romania/{StAndrewDayTest.php => StAndrewsDayTest.php} (94%) create mode 100644 tests/UnitedKingdom/England/BoxingDayTest.php create mode 100644 tests/UnitedKingdom/England/ChristmasDayTest.php create mode 100644 tests/UnitedKingdom/England/EasterMondayTest.php create mode 100644 tests/UnitedKingdom/England/EnglandBaseTestCase.php create mode 100644 tests/UnitedKingdom/England/EnglandTest.php create mode 100644 tests/UnitedKingdom/England/GoodFridayTest.php create mode 100644 tests/UnitedKingdom/England/MayDayBankHolidayTest.php create mode 100644 tests/UnitedKingdom/England/NewYearsDayTest.php create mode 100644 tests/UnitedKingdom/England/SpringBankHolidayTest.php create mode 100644 tests/UnitedKingdom/England/SummerBankHolidayTest.php create mode 100644 tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php create mode 100644 tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php create mode 100644 tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php create mode 100644 tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php create mode 100644 tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php create mode 100644 tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php create mode 100644 tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php create mode 100644 tests/UnitedKingdom/NorthernIreland/NorthernIrelandBaseTestCase.php create mode 100644 tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php create mode 100644 tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php create mode 100644 tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php create mode 100644 tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php create mode 100644 tests/UnitedKingdom/Scotland/BoxingDayTest.php create mode 100644 tests/UnitedKingdom/Scotland/ChristmasDayTest.php create mode 100644 tests/UnitedKingdom/Scotland/GoodFridayTest.php create mode 100644 tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php create mode 100644 tests/UnitedKingdom/Scotland/NewYearsDayTest.php create mode 100644 tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php create mode 100644 tests/UnitedKingdom/Scotland/ScotlandTest.php create mode 100644 tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php create mode 100644 tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php create mode 100644 tests/UnitedKingdom/Scotland/StAndrewsDayTest.php create mode 100644 tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php create mode 100644 tests/UnitedKingdom/Wales/BoxingDayTest.php create mode 100644 tests/UnitedKingdom/Wales/ChristmasDayTest.php create mode 100644 tests/UnitedKingdom/Wales/EasterMondayTest.php create mode 100644 tests/UnitedKingdom/Wales/GoodFridayTest.php create mode 100644 tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php create mode 100644 tests/UnitedKingdom/Wales/NewYearsDayTest.php create mode 100644 tests/UnitedKingdom/Wales/SpringBankHolidayTest.php create mode 100644 tests/UnitedKingdom/Wales/SummerBankHolidayTest.php create mode 100644 tests/UnitedKingdom/Wales/WalesBaseTestCase.php create mode 100644 tests/UnitedKingdom/Wales/WalesTest.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 24c7ea362..9874d78e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Added additional code style fixers and aligning StyleCI settings with PHP-CS. - Included extra requirement for some PHP Extensions in the composer file. - Special subclass of Holiday for substitute holidays [\#162](https://github.com/azuyalabs/yasumi/pull/162) ([c960657](https://github.com/c960657)) +- Holiday providers for England, Wales, Scotland and Northern Ireland [\#166](https://github.com/azuyalabs/yasumi/pull/166) ([c960657](https://github.com/c960657)) ### Changed - Updated the translation for the All Saints holiday for the 'fr_FR' locale [\#152](https://github.com/azuyalabs/yasumi/pull/152) ([pioc92](https://github.com/pioc92)) diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index 3e526c3cf..29eff5c2f 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -135,10 +135,12 @@ private function calculateUnitedPrincipalitiesDay(): void private function calculateStAndrewDay(): void { if ($this->year >= 2012) { - $this->addHoliday(new Holiday('stAndrewDay', [ - 'en_US' => 'Saint Andrew\'s Day', - 'ro_RO' => 'Sfântul Andrei' - ], new DateTime($this->year . '-11-30', new DateTimeZone($this->timezone)), $this->locale)); + $this->addHoliday(new Holiday( + 'stAndrewsDay', + [], + new DateTime($this->year . '-11-30', new DateTimeZone($this->timezone)), + $this->locale + )); } } diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 4bdb861dc..9bb37c925 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -34,6 +34,8 @@ class UnitedKingdom extends AbstractProvider */ public const ID = 'GB'; + public $timezone = 'Europe/London'; + /** * Initialize holidays for the United Kingdom. * @@ -44,8 +46,6 @@ class UnitedKingdom extends AbstractProvider */ public function initialize(): void { - $this->timezone = 'Europe/London'; - // Add common holidays $this->calculateNewYearsDay(); $this->calculateMayDayBankHoliday(); @@ -75,7 +75,7 @@ public function initialize(): 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) { @@ -114,7 +114,7 @@ private function calculateNewYearsDay(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateMayDayBankHoliday(): void + protected function calculateMayDayBankHoliday(): void { // From 1978, by Royal Proclamation annually if ($this->year < 1978) { @@ -159,7 +159,7 @@ private function calculateMayDayBankHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSpringBankHoliday(): void + protected function calculateSpringBankHoliday(): void { // Statutory bank holiday from 1971, following a trial period from 1965 to 1970. if ($this->year < 1965) { @@ -205,7 +205,7 @@ private function calculateSpringBankHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateSummerBankHoliday(): void + protected function calculateSummerBankHoliday(): void { if ($this->year < 1871) { return; @@ -269,14 +269,17 @@ private function calculateSummerBankHoliday(): void * @throws UnknownLocaleException * @throws \Exception */ - private function calculateChristmasHolidays(): void + protected function calculateChristmasHolidays($type = Holiday::TYPE_OFFICIAL): void { - $christmasDay = $this->christmasDay($this->year, $this->timezone, $this->locale); + $christmasDay = $this->christmasDay($this->year, $this->timezone, $this->locale, $type); $secondChristmasDay = $this->secondChristmasDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK); $this->addHoliday($christmasDay); $this->addHoliday($secondChristmasDay); + $substituteChristmasDay = clone $christmasDay; + $substituteSecondChristmasDay = clone $secondChristmasDay; + if (\in_array((int)$christmasDay->format('w'), [0, 6], true)) { $date = clone $christmasDay; $date->add(new DateInterval('P2D')); diff --git a/src/Yasumi/Provider/UnitedKingdom/England.php b/src/Yasumi/Provider/UnitedKingdom/England.php new file mode 100644 index 000000000..5c242d86f --- /dev/null +++ b/src/Yasumi/Provider/UnitedKingdom/England.php @@ -0,0 +1,34 @@ + + */ + +namespace Yasumi\Provider\UnitedKingdom; + +use Yasumi\Holiday; +use Yasumi\Provider\UnitedKingdom; + +/** + * Provider for all holidays in England (United Kingdom). + * + * England is a country that is part of the United Kingdom. It covers an area of 130,279 square kilometres + * (50,301 sq mi), and has a population of 5,619,400. London, England's capital, is also the capital of + * and the largest city in the United Kingdom. + * + * @link https://en.wikipedia.org/wiki/England + */ +class England extends UnitedKingdom +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'GB-ENG'; +} diff --git a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php new file mode 100644 index 000000000..aff00e5e3 --- /dev/null +++ b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php @@ -0,0 +1,149 @@ + + */ + +namespace Yasumi\Provider\UnitedKingdom; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\Provider\UnitedKingdom; +use Yasumi\SubstituteHoliday; + +/** + * Provider for all holidays in Northern Ireland (United Kingdom). + * + * Northern Ireland is a country that is part of the United Kingdom. It covers an area of 14,130 square kilometres + * (5,460 sq mi), and has a population of 1,885,400. Belfast, Northern Ireland's capital and largest city, + * is the 12th largest city in the United Kingdom. + * + * @link https://en.wikipedia.org/wiki/Northern_Ireland + */ +class NorthernIreland extends UnitedKingdom +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'GB-NIR'; + + public $timezone = 'Europe/Belfast'; + + /** + * Initialize holidays for Northern Ireland (United Kingdom). + * + * @throws \Yasumi\Exception\InvalidDateException + * @throws \InvalidArgumentException + * @throws \Yasumi\Exception\UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + parent::initialize(); + + $this->calculateStPatricksDay(); + $this->calculateBattleOfTheBoyne(); + } + + /** + * St. Patrick's Day. + * + * Saint Patrick's Day, or the Feast of Saint Patrick (Irish: Lá Fhéile Pádraig, "the Day of the Festival of + * Patrick"), is a cultural and religious celebration held on 17 March, the traditional death date of Saint Patrick + * (c. AD 385–461), the foremost patron saint of Ireland. Saint Patrick's Day is a public holiday in the Republic + * of Ireland, Northern Ireland, the Canadian province of Newfoundland and Labrador, and the British Overseas + * Territory of Montserrat. + * + * @link https://en.wikipedia.org/wiki/Saint_Patrick%27s_Day + * + * @throws \Yasumi\Exception\InvalidDateException + * @throws \InvalidArgumentException + * @throws \Yasumi\Exception\UnknownLocaleException + * @throws \Exception + * @throws \Exception + */ + private function calculateStPatricksDay(): void + { + if ($this->year < 1971) { + return; + } + + $holiday = new Holiday( + 'stPatricksDay', + ['en_GB' => 'St. Patrick\'s Day'], + new DateTime($this->year . '-3-17', new DateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_BANK + ); + + $this->addHoliday($holiday); + + // Substitute holiday is on the next available weekday if a holiday falls on a Saturday or Sunday + if (\in_array((int)$holiday->format('w'), [0, 6], true)) { + $date = clone $holiday; + $date->modify('next monday'); + + $this->addHoliday(new SubstituteHoliday( + $holiday, + [], + $date, + $this->locale, + Holiday::TYPE_BANK + )); + } + } + + /** + * Battle of the Boyne. + * + * Orangemen's Day, also called The Twelfth or Glorious Twelfth) celebrates the Glorious Revolution (1688) + * and victory of Protestant King William of Orange over Catholic king James II at the Battle of the + * Boyne (1690), which began the Protestant Ascendancy in Ireland. + * + * @link https://en.wikipedia.org/wiki/The_Twelfth + * + * @throws \Yasumi\Exception\InvalidDateException + * @throws \InvalidArgumentException + * @throws \Yasumi\Exception\UnknownLocaleException + * @throws \Exception + * @throws \Exception + */ + private function calculateBattleOfTheBoyne(): void + { + if ($this->year < 1926) { + return; + } + + $holiday = new Holiday( + 'battleOfTheBoyne', + ['en_GB' => 'Battle of the Boyne'], + new DateTime($this->year . '-7-12', new DateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_BANK + ); + + $this->addHoliday($holiday); + + // Substitute holiday is on the next available weekday if a holiday falls on a Saturday or Sunday + if (\in_array((int)$holiday->format('w'), [0, 6], true)) { + $date = clone $holiday; + $date->modify('next monday'); + + $this->addHoliday(new SubstituteHoliday( + $holiday, + [], + $date, + $this->locale, + Holiday::TYPE_BANK + )); + } + } +} diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php new file mode 100644 index 000000000..d0736b8f2 --- /dev/null +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -0,0 +1,203 @@ + + */ + +namespace Yasumi\Provider\UnitedKingdom; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\Provider\UnitedKingdom; +use Yasumi\SubstituteHoliday; + +/** + * Provider for all holidays in Scotland (United Kingdom). + * + * Scotland is a country that is part of the United Kingdom. It covers an area of 77,933 square kilometres + * (30,090 sq mi), and has a population of 5,424,800. The capital is Edinburgh. Glasgow, Scotland's + * largest city, is the fifth largest city in the United Kingdom. + * + * Bank and public holidays in Scotland are determined under the Banking and Financial Dealings Act 1971 + * and the St Andrew's Day Bank Holiday (Scotland) Act 2007. Unlike the rest of United Kingdom, most bank + * holidays are not recognised as statutory public holidays in Scotland, as most public holidays are + * determined by local authorities across Scotland. + * + * @link https://en.wikipedia.org/wiki/Scotland + */ +class Scotland extends UnitedKingdom +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'GB-SCT'; + + public $timezone = 'Europe/London'; + + /** + * Initialize holidays for the United Kingdom. + * + * @throws \Yasumi\Exception\InvalidDateException + * @throws \InvalidArgumentException + * @throws \Yasumi\Exception\UnknownLocaleException + * @throws \Exception + */ + public function initialize(): void + { + // Add common holidays + $this->calculateNewYearsHolidays(); + $this->calculateMayDayBankHoliday(); + $this->calculateSpringBankHoliday(); + $this->calculateSummerBankHoliday(); + + // Add common Christian holidays + $this->addHoliday($this->goodFriday($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK)); + $this->calculateStAndrewsDay(); + $this->calculateChristmasHolidays(Holiday::TYPE_BANK); + } + + /** + * New Year's Day is a public holiday in the United Kingdom on January 1 each year. It marks + * the start of the New Year in the Gregorian calendar. For many people have a quiet day on + * January 1, which marks the end of the Christmas break before they return to work. + * + * In Scotland, January 2 is also a bank holiday. If January 2 falls on a Saturday, the following Monday is a bank holiday. + * If New Years Day falls on a Saturday, the following Monday and Tuesday are bank holidays. + * + * @link https://en.wikipedia.org/wiki/Public_holidays_in_Scotland + * @link http://www.timeanddate.com/holidays/uk/new-year-day + * + * @throws \Yasumi\Exception\InvalidDateException + * @throws \InvalidArgumentException + * @throws \Yasumi\Exception\UnknownLocaleException + * @throws \Exception + */ + protected function calculateNewYearsHolidays(): void + { + // Before 1871 it was not an observed or statutory holiday + if ($this->year < 1871) { + return; + } + + if ($this->year <= 1974) { + $type = Holiday::TYPE_OBSERVANCE; + } else { + $type = Holiday::TYPE_BANK; + } + + $newYearsDay = $this->newYearsDay($this->year, $this->timezone, $this->locale, $type); + $secondNewYearsDay = new Holiday( + 'secondNewYearsDay', + [], + new DateTime("$this->year-1-2", new DateTimeZone($this->timezone)), + $this->locale, + $type + ); + + $this->addHoliday($newYearsDay); + $this->addHoliday($secondNewYearsDay); + + if (\in_array((int)$newYearsDay->format('w'), [0, 6], true)) { + $date = clone $newYearsDay; + $date->add(new DateInterval('P2D')); + $this->addHoliday(new SubstituteHoliday( + $newYearsDay, + [], + $date, + $this->locale, + $type + )); + } + + if (\in_array((int)$secondNewYearsDay->format('w'), [0, 6], true)) { + $date = clone $secondNewYearsDay; + $date->add(new DateInterval('P2D')); + $this->addHoliday(new SubstituteHoliday( + $secondNewYearsDay, + [], + $date, + $this->locale, + $type + )); + } + } + + /** + * The Summer Bank holiday, also known as the Late Summer bank holiday, is a time for people in the United Kingdom + * to have a day off work or school. In Scotland it falls on the first Monday of August. + * + * @link https://www.timeanddate.com/holidays/uk/summer-bank-holiday + * @link https://en.wikipedia.org/wiki/Public_holidays_in_Scotland + * + * @throws \Yasumi\Exception\InvalidDateException + * @throws \InvalidArgumentException + * @throws \Yasumi\Exception\UnknownLocaleException + * @throws \Exception + */ + protected function calculateSummerBankHoliday(): void + { + if ($this->year < 1871) { + return; + } + + $this->addHoliday(new Holiday( + 'summerBankHoliday', + ['en_GB' => 'August Bank Holiday'], + new DateTime("first monday of august $this->year", new DateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_BANK + )); + } + + /** + * St. Andrew's Day. + * + * Saint Andrew's Day is Scotland's national day, celebrated on 30 November. + * + * @link https://en.wikipedia.org/wiki/Saint_Andrew%27s_Day + * + * @throws \Yasumi\Exception\InvalidDateException + * @throws \InvalidArgumentException + * @throws \Yasumi\Exception\UnknownLocaleException + * @throws \Exception + * @throws \Exception + */ + private function calculateStAndrewsDay(): void + { + if ($this->year < 2007) { + return; + } + $holiday = new Holiday( + 'stAndrewsDay', + [], + new DateTime($this->year . '-11-30', new DateTimeZone($this->timezone)), + $this->locale, + Holiday::TYPE_BANK + ); + + $this->addHoliday($holiday); + + // Substitute holiday is on the next available weekday if a holiday falls on a Saturday or Sunday + if (\in_array((int)$holiday->format('w'), [0, 6], true)) { + $date = clone $holiday; + $date->modify('next monday'); + + $this->addHoliday(new SubstituteHoliday( + $holiday, + [], + $date, + $this->locale, + Holiday::TYPE_BANK + )); + } + } +} diff --git a/src/Yasumi/Provider/UnitedKingdom/Wales.php b/src/Yasumi/Provider/UnitedKingdom/Wales.php new file mode 100644 index 000000000..297359a5d --- /dev/null +++ b/src/Yasumi/Provider/UnitedKingdom/Wales.php @@ -0,0 +1,34 @@ + + */ + +namespace Yasumi\Provider\UnitedKingdom; + +use Yasumi\Holiday; +use Yasumi\Provider\UnitedKingdom; + +/** + * Provider for all holidays in Wales (United Kingdom). + * + * Wales is a country that is part of the United Kingdom. It covers an area of 20,779 square kilometres + * (8,023 sq mi), and has a population of 3,125,000. Cardiff, Wales's capital and largest city, is the + * eleventh largest city in the United Kingdom. + * + * @link https://en.wikipedia.org/wiki/Wales + */ +class Wales extends UnitedKingdom +{ + /** + * Code to identify this Holiday Provider. Typically this is the ISO3166 code corresponding to the respective + * country or sub-region. + */ + public const ID = 'GB-WLS'; +} diff --git a/src/Yasumi/data/translations/secondNewYearsDay.php b/src/Yasumi/data/translations/secondNewYearsDay.php new file mode 100755 index 000000000..944e93ce2 --- /dev/null +++ b/src/Yasumi/data/translations/secondNewYearsDay.php @@ -0,0 +1,17 @@ + + */ + +// Translations for New Year's Day +return [ + 'da_DK' => '2. nytårsdag', + 'en_GB' => '2nd January', +]; diff --git a/src/Yasumi/data/translations/stAndrewsDay.php b/src/Yasumi/data/translations/stAndrewsDay.php new file mode 100644 index 000000000..70a03e4d4 --- /dev/null +++ b/src/Yasumi/data/translations/stAndrewsDay.php @@ -0,0 +1,18 @@ + + */ + +// Translations for St. Andrew's Day +return [ + 'en_US' => 'St. Andrew\'s Day', + 'en_GB' => 'St. Andrew\'s Day', + 'ro_RO' => 'Sfântul Andrei', +]; diff --git a/tests/Romania/RomaniaTest.php b/tests/Romania/RomaniaTest.php index fb9b999f3..d01fb9f46 100755 --- a/tests/Romania/RomaniaTest.php +++ b/tests/Romania/RomaniaTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'pentecost', 'pentecostMonday', 'assumptionOfMary', - 'stAndrewDay', + 'stAndrewsDay', 'nationalDay', 'christmasDay', 'secondChristmasDay' diff --git a/tests/Romania/StAndrewDayTest.php b/tests/Romania/StAndrewsDayTest.php similarity index 94% rename from tests/Romania/StAndrewDayTest.php rename to tests/Romania/StAndrewsDayTest.php index 7f9f0ffd6..fcb748e1d 100644 --- a/tests/Romania/StAndrewDayTest.php +++ b/tests/Romania/StAndrewsDayTest.php @@ -22,12 +22,12 @@ /** * Class for testing Saint Andrew Day in Romania. */ -class StAndrewDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface +class StAndrewsDayTest extends RomaniaBaseTestCase implements YasumiTestCaseInterface { /** * The name of the holiday to be tested */ - public const HOLIDAY = 'stAndrewDay'; + public const HOLIDAY = 'stAndrewsDay'; /** * The year in which the holiday was first established diff --git a/tests/UnitedKingdom/England/BoxingDayTest.php b/tests/UnitedKingdom/England/BoxingDayTest.php new file mode 100644 index 000000000..974e074b8 --- /dev/null +++ b/tests/UnitedKingdom/England/BoxingDayTest.php @@ -0,0 +1,96 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\England; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Boxing Day in England. + */ +class BoxingDayTest extends EnglandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'secondChristmasDay'; + + /** + * 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 string $expected the expected date + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHoliday($year, $expected) + { + $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + + if (\in_array((int)$date->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); + } + } + + /** + * Returns a list of test dates + * + * @return array list of test dates for the holiday defined in this test + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + $year = $this->generateRandomYear(); + $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); + + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Boxing Day'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + } +} diff --git a/tests/UnitedKingdom/England/ChristmasDayTest.php b/tests/UnitedKingdom/England/ChristmasDayTest.php new file mode 100644 index 000000000..a886da153 --- /dev/null +++ b/tests/UnitedKingdom/England/ChristmasDayTest.php @@ -0,0 +1,96 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\England; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Christmas Day in England. + */ +class ChristmasDayTest extends EnglandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'christmasDay'; + + /** + * 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 string $expected the expected date + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHoliday($year, $expected) + { + $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + + if (\in_array((int)$date->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); + } + } + + /** + * Returns a list of test dates + * + * @return array list of test dates for the holiday defined in this test + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + $year = $this->generateRandomYear(); + $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); + + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Christmas Day'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/UnitedKingdom/England/EasterMondayTest.php b/tests/UnitedKingdom/England/EasterMondayTest.php new file mode 100644 index 000000000..8916970d7 --- /dev/null +++ b/tests/UnitedKingdom/England/EasterMondayTest.php @@ -0,0 +1,95 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\England; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Easter Monday in England. + */ +class EasterMondayTest extends EnglandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'easterMonday'; + + /** + * Tests Easter Monday + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param string $expected the expected date + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHoliday($year, $expected) + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Returns a list of test dates + * + * @return array list of test dates for the holiday defined in this test + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + $data = []; + + for ($y = 0; $y < 50; $y++) { + $year = $this->generateRandomYear(); + $date = $this->calculateEaster($year, self::TIMEZONE); + $date->add(new DateInterval('P1D')); + + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Easter Monday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + } +} diff --git a/tests/UnitedKingdom/England/EnglandBaseTestCase.php b/tests/UnitedKingdom/England/EnglandBaseTestCase.php new file mode 100644 index 000000000..dc15050f8 --- /dev/null +++ b/tests/UnitedKingdom/England/EnglandBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\England; + +use Yasumi\tests\UnitedKingdom\UnitedKingdomBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the England holiday provider. + */ +abstract class EnglandBaseTestCase extends UnitedKingdomBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'UnitedKingdom\England'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'Europe/London'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_GB'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/UnitedKingdom/England/EnglandTest.php b/tests/UnitedKingdom/England/EnglandTest.php new file mode 100644 index 000000000..ae52b9ddc --- /dev/null +++ b/tests/UnitedKingdom/England/EnglandTest.php @@ -0,0 +1,88 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\England; + +use Yasumi\Holiday; + +/** + * Class for testing holidays in England. + */ +class EnglandTest extends EnglandBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in England are defined by the provider class + * @throws \ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'christmasDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in England are defined by the provider class + * @throws \ReflectionException + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in England are defined by the provider class + * @throws \ReflectionException + */ + public function testSeasonalHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_SEASON); + } + + /** + * Tests if all bank holidays in England are defined by the provider class + * @throws \ReflectionException + */ + public function testBankHolidays(): void + { + $this->assertDefinedHolidays([ + 'newYearsDay', + 'easterMonday', + 'mayDayBankHoliday', + 'springBankHoliday', + 'secondChristmasDay' + ], self::REGION, $this->year, Holiday::TYPE_BANK); + } + + /** + * Tests if all other holidays in England are defined by the provider class + * @throws \ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * Initial setup of this Test Case + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(1978); + } +} diff --git a/tests/UnitedKingdom/England/GoodFridayTest.php b/tests/UnitedKingdom/England/GoodFridayTest.php new file mode 100644 index 000000000..981b4a16a --- /dev/null +++ b/tests/UnitedKingdom/England/GoodFridayTest.php @@ -0,0 +1,68 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\England; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class containing tests for Good Friday in England. + */ +class GoodFridayTest extends EnglandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'goodFriday'; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = 1866; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-3-30", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Good Friday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php new file mode 100644 index 000000000..c208665eb --- /dev/null +++ b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php @@ -0,0 +1,112 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\England; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the May Day Bank Holiday in England. + */ +class MayDayBankHolidayTest extends EnglandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'mayDayBankHoliday'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1978; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = 2101; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-5-2", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday exception in 1995 and 2020. + * @throws \ReflectionException + */ + public function testHolidayExceptions() + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1995, + new DateTime('1995-5-8', new DateTimeZone(self::TIMEZONE)) + ); + + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 2020, + new DateTime('2020-5-8', new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'May Day Bank Holiday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/England/NewYearsDayTest.php b/tests/UnitedKingdom/England/NewYearsDayTest.php new file mode 100644 index 000000000..58af35594 --- /dev/null +++ b/tests/UnitedKingdom/England/NewYearsDayTest.php @@ -0,0 +1,126 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\England; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing New Years Day in England. + */ +class NewYearsDayTest extends EnglandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1871; + + /** + * The year in which the holiday was adjusted + */ + public const ADJUSTMENT_YEAR = 1974; + + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'newYearsDay'; + + /** + * Tests the holiday defined in this test on or after establishment. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param string $expected the expected date + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHolidayOnAfterEstablishment($year, $expected) + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. + * @throws \ReflectionException + */ + public function testHolidayIsObservedTypeBeforeChange() + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), + Holiday::TYPE_OBSERVANCE + ); + } + + /** + * 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->generateRandomDatesWithHolidayMovedToMonday(01, 01, self::TIMEZONE, 10, self::ESTABLISHMENT_YEAR); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'New Year\'s Day'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ADJUSTMENT_YEAR + 1), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/England/SpringBankHolidayTest.php b/tests/UnitedKingdom/England/SpringBankHolidayTest.php new file mode 100644 index 000000000..3d6bdbd67 --- /dev/null +++ b/tests/UnitedKingdom/England/SpringBankHolidayTest.php @@ -0,0 +1,112 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\England; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the Spring Bank Holiday in England. + */ +class SpringBankHolidayTest extends EnglandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'springBankHoliday'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1965; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = 1988; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday exceptions in 2002 and 2012. + * @throws \ReflectionException + */ + public function testHolidayException() + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 2002, + new DateTime('2002-6-4', new DateTimeZone(self::TIMEZONE)) + ); + + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 2012, + new DateTime('2012-6-4', new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Spring Bank Holiday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/England/SummerBankHolidayTest.php b/tests/UnitedKingdom/England/SummerBankHolidayTest.php new file mode 100644 index 000000000..b9b4e99a4 --- /dev/null +++ b/tests/UnitedKingdom/England/SummerBankHolidayTest.php @@ -0,0 +1,150 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\England; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the Summer Bank Holiday England. + */ +class SummerBankHolidayTest extends EnglandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'summerBankHoliday'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1871; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(1970); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("last monday of august $year", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday exception in 2020. + * @throws \ReflectionException + */ + public function testHolidayBefore1965() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1964); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("first monday of august $year", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday during trial period in 1965-1970. + * @throws \ReflectionException + */ + public function testHolidayTrialPeriod() + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1965, + new DateTime('1965-8-30', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1966, + new DateTime('1966-8-29', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1967, + new DateTime('1967-8-28', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1968, + new DateTime('1968-9-2', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1969, + new DateTime('1969-9-1', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1970, + new DateTime('1970-8-31', new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Summer Bank Holiday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php new file mode 100644 index 000000000..af04e4884 --- /dev/null +++ b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php @@ -0,0 +1,117 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\NorthernIreland; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Batthe of the Boyne in Northern Ireland. + */ +class BattleOfTheBoyneTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'battleOfTheBoyne'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1926; + + /** + * 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 + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHoliday($year, $expected) + { + $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + + if (\in_array((int)$date->format('w'), [0, 6], true)) { + $date->modify('next monday'); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + } + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * 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 + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-7-12", new DateTimeZone(self::TIMEZONE)); + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Battle of the Boyne'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php new file mode 100644 index 000000000..35b6a82cb --- /dev/null +++ b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php @@ -0,0 +1,96 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\NorthernIreland; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Boxing Day in Northern Ireland. + */ +class BoxingDayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'secondChristmasDay'; + + /** + * 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 string $expected the expected date + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHoliday($year, $expected) + { + $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + + if (\in_array((int)$date->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); + } + } + + /** + * Returns a list of test dates + * + * @return array list of test dates for the holiday defined in this test + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + $year = $this->generateRandomYear(); + $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); + + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Boxing Day'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + } +} diff --git a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php new file mode 100644 index 000000000..d9e361dc8 --- /dev/null +++ b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php @@ -0,0 +1,96 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\NorthernIreland; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Christmas Day in Northern Ireland. + */ +class ChristmasDayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'christmasDay'; + + /** + * 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 string $expected the expected date + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHoliday($year, $expected) + { + $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + + if (\in_array((int)$date->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); + } + } + + /** + * Returns a list of test dates + * + * @return array list of test dates for the holiday defined in this test + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + $year = $this->generateRandomYear(); + $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); + + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Christmas Day'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php new file mode 100644 index 000000000..2c38e39ee --- /dev/null +++ b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php @@ -0,0 +1,95 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\NorthernIreland; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Easter Monday in Northern Ireland. + */ +class EasterMondayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'easterMonday'; + + /** + * Tests Easter Monday + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param string $expected the expected date + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHoliday($year, $expected) + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Returns a list of test dates + * + * @return array list of test dates for the holiday defined in this test + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + $data = []; + + for ($y = 0; $y < 50; $y++) { + $year = $this->generateRandomYear(); + $date = $this->calculateEaster($year, self::TIMEZONE); + $date->add(new DateInterval('P1D')); + + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Easter Monday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + } +} diff --git a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php new file mode 100644 index 000000000..d7994f752 --- /dev/null +++ b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php @@ -0,0 +1,68 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\NorthernIreland; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class containing tests for Good Friday in Northern Ireland. + */ +class GoodFridayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'goodFriday'; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = 1866; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-3-30", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Good Friday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php new file mode 100644 index 000000000..97b4fcccf --- /dev/null +++ b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php @@ -0,0 +1,112 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\NorthernIreland; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the May Day Bank Holiday in Northern Ireland. + */ +class MayDayBankHolidayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'mayDayBankHoliday'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1978; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = 2101; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-5-2", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday exception in 1995 and 2020. + * @throws \ReflectionException + */ + public function testHolidayExceptions() + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1995, + new DateTime('1995-5-8', new DateTimeZone(self::TIMEZONE)) + ); + + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 2020, + new DateTime('2020-5-8', new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'May Day Bank Holiday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php new file mode 100644 index 000000000..adda5dae2 --- /dev/null +++ b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php @@ -0,0 +1,126 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\NorthernIreland; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing New Years Day in Northern Ireland. + */ +class NewYearsDayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1871; + + /** + * The year in which the holiday was adjusted + */ + public const ADJUSTMENT_YEAR = 1974; + + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'newYearsDay'; + + /** + * Tests the holiday defined in this test on or after establishment. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param string $expected the expected date + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHolidayOnAfterEstablishment($year, $expected) + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. + * @throws \ReflectionException + */ + public function testHolidayIsObservedTypeBeforeChange() + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), + Holiday::TYPE_OBSERVANCE + ); + } + + /** + * 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->generateRandomDatesWithHolidayMovedToMonday(01, 01, self::TIMEZONE, 10, self::ESTABLISHMENT_YEAR); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'New Year\'s Day'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ADJUSTMENT_YEAR + 1), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandBaseTestCase.php b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandBaseTestCase.php new file mode 100644 index 000000000..a7ae4f760 --- /dev/null +++ b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\NorthernIreland; + +use Yasumi\tests\UnitedKingdom\UnitedKingdomBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Northern Ireland holiday provider. + */ +abstract class NorthernIrelandBaseTestCase extends UnitedKingdomBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'UnitedKingdom\NorthernIreland'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'Europe/Belfast'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_GB'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php new file mode 100644 index 000000000..754004a01 --- /dev/null +++ b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php @@ -0,0 +1,89 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\NorthernIreland; + +use Yasumi\Holiday; + +/** + * Class for testing holidays in Northern Ireland. + */ +class NorthernIrelandTest extends NorthernIrelandBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in Northern Ireland are defined by the provider class + * @throws \ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'christmasDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Northern Ireland are defined by the provider class + * @throws \ReflectionException + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in Northern Ireland are defined by the provider class + * @throws \ReflectionException + */ + public function testSeasonalHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_SEASON); + } + + /** + * Tests if all bank holidays in Northern Ireland are defined by the provider class + * @throws \ReflectionException + */ + public function testBankHolidays(): void + { + $this->assertDefinedHolidays([ + 'newYearsDay', + 'easterMonday', + 'mayDayBankHoliday', + 'springBankHoliday', + 'battleOfTheBoyne', + 'secondChristmasDay' + ], self::REGION, $this->year, Holiday::TYPE_BANK); + } + + /** + * Tests if all other holidays in Northern Ireland are defined by the provider class + * @throws \ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * Initial setup of this Test Case + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(1978); + } +} diff --git a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php new file mode 100644 index 000000000..1f0716803 --- /dev/null +++ b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php @@ -0,0 +1,91 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\NorthernIreland; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the Spring Bank Holiday in Northern Ireland. + */ +class SpringBankHolidayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'springBankHoliday'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1965; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = 1988; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Spring Bank Holiday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php new file mode 100644 index 000000000..8bbb106a6 --- /dev/null +++ b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php @@ -0,0 +1,117 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\NorthernIreland; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing St. Patrick's Day in Northern Ireland. + */ +class StPatricksDayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'stPatricksDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1971; + + /** + * 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 + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHoliday($year, $expected) + { + $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + + if (\in_array((int)$date->format('w'), [0, 6], true)) { + $date->modify('next monday'); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + } + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * 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 + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-3-17", new DateTimeZone(self::TIMEZONE)); + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'St. Patrick\'s Day'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php new file mode 100644 index 000000000..74e54b07b --- /dev/null +++ b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php @@ -0,0 +1,150 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\NorthernIreland; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the Summer Bank Holiday in Northern Ireland. + */ +class SummerBankHolidayTest extends NorthernIrelandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'summerBankHoliday'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1871; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(1970); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("last monday of august $year", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday exception in 2020. + * @throws \ReflectionException + */ + public function testHolidayBefore1965() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1964); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("first monday of august $year", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday during trial period in 1965-1970. + * @throws \ReflectionException + */ + public function testHolidayTrialPeriod() + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1965, + new DateTime('1965-8-30', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1966, + new DateTime('1966-8-29', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1967, + new DateTime('1967-8-28', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1968, + new DateTime('1968-9-2', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1969, + new DateTime('1969-9-1', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1970, + new DateTime('1970-8-31', new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Summer Bank Holiday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/Scotland/BoxingDayTest.php b/tests/UnitedKingdom/Scotland/BoxingDayTest.php new file mode 100644 index 000000000..8de2e2df9 --- /dev/null +++ b/tests/UnitedKingdom/Scotland/BoxingDayTest.php @@ -0,0 +1,96 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Scotland; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Boxing Day in Scotland. + */ +class BoxingDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'secondChristmasDay'; + + /** + * 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 string $expected the expected date + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHoliday($year, $expected) + { + $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + + if (\in_array((int)$date->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); + } + } + + /** + * Returns a list of test dates + * + * @return array list of test dates for the holiday defined in this test + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + $year = $this->generateRandomYear(); + $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); + + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Boxing Day'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + } +} diff --git a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php new file mode 100644 index 000000000..16e572800 --- /dev/null +++ b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php @@ -0,0 +1,96 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Scotland; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Christmas Day in Scotland. + */ +class ChristmasDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'christmasDay'; + + /** + * 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 string $expected the expected date + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHoliday($year, $expected) + { + $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + + if (\in_array((int)$date->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); + } + } + + /** + * Returns a list of test dates + * + * @return array list of test dates for the holiday defined in this test + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + $year = $this->generateRandomYear(); + $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); + + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Christmas Day'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + } +} diff --git a/tests/UnitedKingdom/Scotland/GoodFridayTest.php b/tests/UnitedKingdom/Scotland/GoodFridayTest.php new file mode 100644 index 000000000..8e5ddb7be --- /dev/null +++ b/tests/UnitedKingdom/Scotland/GoodFridayTest.php @@ -0,0 +1,68 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Scotland; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class containing tests for Good Friday in Scotland. + */ +class GoodFridayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'goodFriday'; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = 1866; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-3-30", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Good Friday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + } +} diff --git a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php new file mode 100644 index 000000000..8f40d8fa0 --- /dev/null +++ b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php @@ -0,0 +1,112 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Scotland; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the May Day Bank Holiday in Scotland. + */ +class MayDayBankHolidayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'mayDayBankHoliday'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1978; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = 2101; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-5-2", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday exception in 1995 and 2020. + * @throws \ReflectionException + */ + public function testHolidayExceptions() + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1995, + new DateTime('1995-5-8', new DateTimeZone(self::TIMEZONE)) + ); + + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 2020, + new DateTime('2020-5-8', new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'May Day Bank Holiday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php new file mode 100644 index 000000000..7570b4c8c --- /dev/null +++ b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php @@ -0,0 +1,136 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Scotland; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing New Years Day in Scotland. + */ +class NewYearsDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1871; + + /** + * The year in which the holiday was adjusted + */ + public const ADJUSTMENT_YEAR = 1974; + + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'newYearsDay'; + + /** + * Tests the holiday defined in this test on or after establishment. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param string $expected the expected date + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHolidayOnAfterEstablishment($year, $expected) + { + $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + + if (\in_array((int)$date->format('w'), [0, 6], true)) { + $date->add(new DateInterval('P2D')); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + } + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. + * @throws \ReflectionException + */ + public function testHolidayIsObservedTypeBeforeChange() + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), + Holiday::TYPE_OBSERVANCE + ); + } + + /** + * 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 + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-1-1", new DateTimeZone(self::TIMEZONE)); + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'New Year\'s Day'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ADJUSTMENT_YEAR + 1), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php b/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php new file mode 100644 index 000000000..558519a89 --- /dev/null +++ b/tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Scotland; + +use Yasumi\tests\UnitedKingdom\UnitedKingdomBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Scotland holiday provider. + */ +abstract class ScotlandBaseTestCase extends UnitedKingdomBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'UnitedKingdom\Scotland'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'Europe/London'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_GB'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/UnitedKingdom/Scotland/ScotlandTest.php b/tests/UnitedKingdom/Scotland/ScotlandTest.php new file mode 100644 index 000000000..732e60c21 --- /dev/null +++ b/tests/UnitedKingdom/Scotland/ScotlandTest.php @@ -0,0 +1,87 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Scotland; + +use Yasumi\Holiday; + +/** + * Class for testing holidays in Scotland. + */ +class ScotlandTest extends ScotlandBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in Scotland are defined by the provider class + * @throws \ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Scotland are defined by the provider class + * @throws \ReflectionException + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in Scotland are defined by the provider class + * @throws \ReflectionException + */ + public function testSeasonalHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_SEASON); + } + + /** + * Tests if all bank holidays in Scotland are defined by the provider class + * @throws \ReflectionException + */ + public function testBankHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'mayDayBankHoliday', + 'springBankHoliday', + 'christmasDay', + 'secondChristmasDay', + 'newYearsDay', + ], self::REGION, $this->year, Holiday::TYPE_BANK); + } + + /** + * Tests if all other holidays in Scotland are defined by the provider class + * @throws \ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * Initial setup of this Test Case + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(1978); + } +} diff --git a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php new file mode 100644 index 000000000..41419ee0b --- /dev/null +++ b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php @@ -0,0 +1,136 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Scotland; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing New Years Day in Scotland. + */ +class SecondNewYearsDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1871; + + /** + * The year in which the holiday was adjusted + */ + public const ADJUSTMENT_YEAR = 1974; + + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'secondNewYearsDay'; + + /** + * Tests the holiday defined in this test on or after establishment. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param string $expected the expected date + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHolidayOnAfterEstablishment($year, $expected) + { + $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + + if (\in_array((int)$date->format('w'), [0, 6], true)) { + $date->add(new DateInterval('P2D')); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + } + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. + * @throws \ReflectionException + */ + public function testHolidayIsObservedTypeBeforeChange() + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), + Holiday::TYPE_OBSERVANCE + ); + } + + /** + * 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 + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-1-2", new DateTimeZone(self::TIMEZONE)); + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => '2nd January'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ADJUSTMENT_YEAR + 1), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php new file mode 100644 index 000000000..de4f09303 --- /dev/null +++ b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php @@ -0,0 +1,91 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Scotland; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the Spring Bank Holiday in Scotland. + */ +class SpringBankHolidayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'springBankHoliday'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1965; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = 1988; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Spring Bank Holiday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php new file mode 100644 index 000000000..559269c42 --- /dev/null +++ b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php @@ -0,0 +1,104 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Scotland; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing St. Patrick's Day in Scotland. + */ +class StAndrewsDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'stAndrewsDay'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 2007; + + /** + * 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 + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHoliday($year, $expected) + { + $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + + if (\in_array((int)$date->format('w'), [0, 6], true)) { + $date->modify('next monday'); + $this->assertHoliday(self::REGION, 'substituteHoliday:' . self::HOLIDAY, $year, $date); + } + } + + /** + * 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 + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR); + $date = new DateTime("$year-11-30", new DateTimeZone(self::TIMEZONE)); + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'St. Andrew\'s Day'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php new file mode 100644 index 000000000..7fcbd04ad --- /dev/null +++ b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php @@ -0,0 +1,91 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Scotland; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the August Bank Holiday in Scotland. + */ +class SummerBankHolidayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'summerBankHoliday'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1871; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(1970); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("first monday of august $year", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'August Bank Holiday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/SummerBankHolidayTest.php b/tests/UnitedKingdom/SummerBankHolidayTest.php index cd45ecf8f..adac910fb 100644 --- a/tests/UnitedKingdom/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/SummerBankHolidayTest.php @@ -34,6 +34,11 @@ class SummerBankHolidayTest extends UnitedKingdomBaseTestCase implements YasumiT */ public const ESTABLISHMENT_YEAR = 1871; + /** + * The year in which the holiday was renamed from August Bank Holiday to Summer Bank Holiday. + */ + public const RENAME_YEAR = 1965; + /** * Tests the holiday defined in this test. * @throws Exception @@ -57,7 +62,7 @@ public function testHoliday() */ public function testHolidayBefore1965() { - $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1967); + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1964); $this->assertHoliday( self::REGION, self::HOLIDAY, @@ -138,7 +143,7 @@ public function testTranslation(): void $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + $this->generateRandomYear(self::RENAME_YEAR), [self::LOCALE => 'Summer Bank Holiday'] ); } diff --git a/tests/UnitedKingdom/Wales/BoxingDayTest.php b/tests/UnitedKingdom/Wales/BoxingDayTest.php new file mode 100644 index 000000000..86943d80f --- /dev/null +++ b/tests/UnitedKingdom/Wales/BoxingDayTest.php @@ -0,0 +1,96 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Wales; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Boxing Day in Wales. + */ +class BoxingDayTest extends WalesBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'secondChristmasDay'; + + /** + * 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 string $expected the expected date + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHoliday($year, $expected) + { + $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + + if (\in_array((int)$date->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); + } + } + + /** + * Returns a list of test dates + * + * @return array list of test dates for the holiday defined in this test + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + $year = $this->generateRandomYear(); + $date = new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE)); + + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Boxing Day'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + } +} diff --git a/tests/UnitedKingdom/Wales/ChristmasDayTest.php b/tests/UnitedKingdom/Wales/ChristmasDayTest.php new file mode 100644 index 000000000..d219917f2 --- /dev/null +++ b/tests/UnitedKingdom/Wales/ChristmasDayTest.php @@ -0,0 +1,96 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Wales; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Christmas Day in Wales. + */ +class ChristmasDayTest extends WalesBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'christmasDay'; + + /** + * 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 string $expected the expected date + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHoliday($year, $expected) + { + $date = new DateTime($expected, new DateTimeZone(self::TIMEZONE)); + $this->assertHoliday(self::REGION, self::HOLIDAY, $year, $date); + + if (\in_array((int)$date->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); + } + } + + /** + * Returns a list of test dates + * + * @return array list of test dates for the holiday defined in this test + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + $data = []; + + for ($y = 0; $y < self::TEST_ITERATIONS; $y++) { + $year = $this->generateRandomYear(); + $date = new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE)); + + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Christmas Day'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/UnitedKingdom/Wales/EasterMondayTest.php b/tests/UnitedKingdom/Wales/EasterMondayTest.php new file mode 100644 index 000000000..3578cd7b0 --- /dev/null +++ b/tests/UnitedKingdom/Wales/EasterMondayTest.php @@ -0,0 +1,95 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Wales; + +use DateInterval; +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing Easter Monday in Wales. + */ +class EasterMondayTest extends WalesBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'easterMonday'; + + /** + * Tests Easter Monday + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param string $expected the expected date + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHoliday($year, $expected) + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Returns a list of test dates + * + * @return array list of test dates for the holiday defined in this test + * @throws \Exception + */ + public function HolidayDataProvider(): array + { + $data = []; + + for ($y = 0; $y < 50; $y++) { + $year = $this->generateRandomYear(); + $date = $this->calculateEaster($year, self::TIMEZONE); + $date->add(new DateInterval('P1D')); + + $data[] = [$year, $date->format('Y-m-d')]; + } + + return $data; + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Easter Monday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_BANK); + } +} diff --git a/tests/UnitedKingdom/Wales/GoodFridayTest.php b/tests/UnitedKingdom/Wales/GoodFridayTest.php new file mode 100644 index 000000000..d328fa14a --- /dev/null +++ b/tests/UnitedKingdom/Wales/GoodFridayTest.php @@ -0,0 +1,68 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Wales; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class containing tests for Good Friday in Wales. + */ +class GoodFridayTest extends WalesBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'goodFriday'; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = 1866; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-3-30", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(), + [self::LOCALE => 'Good Friday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType(self::REGION, self::HOLIDAY, $this->generateRandomYear(), Holiday::TYPE_OFFICIAL); + } +} diff --git a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php new file mode 100644 index 000000000..ba9d11074 --- /dev/null +++ b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php @@ -0,0 +1,112 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Wales; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the May Day Bank Holiday in Wales. + */ +class MayDayBankHolidayTest extends WalesBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'mayDayBankHoliday'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1978; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = 2101; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-5-2", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday exception in 1995 and 2020. + * @throws \ReflectionException + */ + public function testHolidayExceptions() + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1995, + new DateTime('1995-5-8', new DateTimeZone(self::TIMEZONE)) + ); + + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 2020, + new DateTime('2020-5-8', new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'May Day Bank Holiday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/Wales/NewYearsDayTest.php b/tests/UnitedKingdom/Wales/NewYearsDayTest.php new file mode 100644 index 000000000..ec9b11d2c --- /dev/null +++ b/tests/UnitedKingdom/Wales/NewYearsDayTest.php @@ -0,0 +1,126 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Wales; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing New Years Day in Wales. + */ +class NewYearsDayTest extends WalesBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1871; + + /** + * The year in which the holiday was adjusted + */ + public const ADJUSTMENT_YEAR = 1974; + + /** + * The name of the holiday to be tested + */ + public const HOLIDAY = 'newYearsDay'; + + /** + * Tests the holiday defined in this test on or after establishment. + * + * @dataProvider HolidayDataProvider + * + * @param int $year the year for which the holiday defined in this test needs to be tested + * @param string $expected the expected date + * + * @throws \ReflectionException + * @throws \Exception + */ + public function testHolidayOnAfterEstablishment($year, $expected) + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime($expected, new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. + * @throws \ReflectionException + */ + public function testHolidayIsObservedTypeBeforeChange() + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::ADJUSTMENT_YEAR - 1), + Holiday::TYPE_OBSERVANCE + ); + } + + /** + * 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->generateRandomDatesWithHolidayMovedToMonday(01, 01, self::TIMEZONE, 10, self::ESTABLISHMENT_YEAR); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'New Year\'s Day'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ADJUSTMENT_YEAR + 1), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php new file mode 100644 index 000000000..68ca360b4 --- /dev/null +++ b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php @@ -0,0 +1,112 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Wales; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the Spring Bank Holiday in Wales. + */ +class SpringBankHolidayTest extends WalesBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'springBankHoliday'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1965; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = 1988; + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("$year-5-30", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday exceptions in 2002 and 2012. + * @throws \ReflectionException + */ + public function testHolidayException() + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 2002, + new DateTime('2002-6-4', new DateTimeZone(self::TIMEZONE)) + ); + + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 2012, + new DateTime('2012-6-4', new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Spring Bank Holiday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php new file mode 100644 index 000000000..b215e9757 --- /dev/null +++ b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php @@ -0,0 +1,150 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Wales; + +use DateTime; +use DateTimeZone; +use Yasumi\Holiday; +use Yasumi\tests\YasumiTestCaseInterface; + +/** + * Class for testing the Summer Bank Holiday in Wales. + */ +class SummerBankHolidayTest extends WalesBaseTestCase implements YasumiTestCaseInterface +{ + /** + * The name of the holiday + */ + public const HOLIDAY = 'summerBankHoliday'; + + /** + * The year in which the holiday was first established + */ + public const ESTABLISHMENT_YEAR = 1871; + + /** + * Tests the holiday defined in this test. + * @throws \Exception + * @throws \ReflectionException + */ + public function testHoliday() + { + $year = $this->generateRandomYear(1970); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("last monday of august $year", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday exception in 2020. + * @throws \ReflectionException + */ + public function testHolidayBefore1965() + { + $year = $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 1964); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + $year, + new DateTime("first monday of august $year", new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday during trial period in 1965-1970. + * @throws \ReflectionException + */ + public function testHolidayTrialPeriod() + { + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1965, + new DateTime('1965-8-30', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1966, + new DateTime('1966-8-29', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1967, + new DateTime('1967-8-28', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1968, + new DateTime('1968-9-2', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1969, + new DateTime('1969-9-1', new DateTimeZone(self::TIMEZONE)) + ); + $this->assertHoliday( + self::REGION, + self::HOLIDAY, + 1970, + new DateTime('1970-8-31', new DateTimeZone(self::TIMEZONE)) + ); + } + + /** + * Tests the holiday defined in this test before establishment. + * @throws \ReflectionException + */ + public function testHolidayBeforeEstablishment() + { + $this->assertNotHoliday( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(1000, self::ESTABLISHMENT_YEAR - 1) + ); + } + + /** + * Tests the translated name of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testTranslation(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + [self::LOCALE => 'Summer Bank Holiday'] + ); + } + + /** + * Tests type of the holiday defined in this test. + * @throws \ReflectionException + */ + public function testHolidayType(): void + { + $this->assertHolidayType( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + Holiday::TYPE_BANK + ); + } +} diff --git a/tests/UnitedKingdom/Wales/WalesBaseTestCase.php b/tests/UnitedKingdom/Wales/WalesBaseTestCase.php new file mode 100644 index 000000000..921871ccc --- /dev/null +++ b/tests/UnitedKingdom/Wales/WalesBaseTestCase.php @@ -0,0 +1,44 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Wales; + +use Yasumi\tests\UnitedKingdom\UnitedKingdomBaseTestCase; +use Yasumi\tests\YasumiBase; + +/** + * Base class for test cases of the Wales holiday provider. + */ +abstract class WalesBaseTestCase extends UnitedKingdomBaseTestCase +{ + use YasumiBase; + + /** + * Name of the region (e.g. country / state) to be tested + */ + public const REGION = 'UnitedKingdom\Wales'; + + /** + * Timezone in which this provider has holidays defined + */ + public const TIMEZONE = 'Europe/London'; + + /** + * Locale that is considered common for this provider + */ + public const LOCALE = 'en_GB'; + + /** + * Number of iterations to be used for the various unit tests of this provider + */ + public const TEST_ITERATIONS = 50; +} diff --git a/tests/UnitedKingdom/Wales/WalesTest.php b/tests/UnitedKingdom/Wales/WalesTest.php new file mode 100644 index 000000000..3db7fe00e --- /dev/null +++ b/tests/UnitedKingdom/Wales/WalesTest.php @@ -0,0 +1,88 @@ + + */ + +namespace Yasumi\tests\UnitedKingdom\Wales; + +use Yasumi\Holiday; + +/** + * Class for testing holidays in Wales. + */ +class WalesTest extends WalesBaseTestCase +{ + /** + * @var int year random year number used for all tests in this Test Case + */ + protected $year; + + /** + * Tests if all official holidays in Wales are defined by the provider class + * @throws \ReflectionException + */ + public function testOfficialHolidays(): void + { + $this->assertDefinedHolidays([ + 'goodFriday', + 'christmasDay', + ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); + } + + /** + * Tests if all observed holidays in Wales are defined by the provider class + * @throws \ReflectionException + */ + public function testObservedHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); + } + + /** + * Tests if all seasonal holidays in Wales are defined by the provider class + * @throws \ReflectionException + */ + public function testSeasonalHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_SEASON); + } + + /** + * Tests if all bank holidays in Wales are defined by the provider class + * @throws \ReflectionException + */ + public function testBankHolidays(): void + { + $this->assertDefinedHolidays([ + 'newYearsDay', + 'easterMonday', + 'mayDayBankHoliday', + 'springBankHoliday', + 'secondChristmasDay' + ], self::REGION, $this->year, Holiday::TYPE_BANK); + } + + /** + * Tests if all other holidays in Wales are defined by the provider class + * @throws \ReflectionException + */ + public function testOtherHolidays(): void + { + $this->assertDefinedHolidays([], self::REGION, $this->year, Holiday::TYPE_OTHER); + } + + /** + * Initial setup of this Test Case + */ + protected function setUp(): void + { + $this->year = $this->generateRandomYear(1978); + } +} From 4b4e1727f122a150647faebedab66db071c08448 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Sun, 29 Sep 2019 16:29:44 +0200 Subject: [PATCH 116/133] Locale fallback (#176) --- CHANGELOG.md | 1 + src/Yasumi/Holiday.php | 15 +- src/Yasumi/Provider/Australia.php | 24 +-- src/Yasumi/Provider/Australia/ACT.php | 12 +- src/Yasumi/Provider/Australia/NSW.php | 8 +- src/Yasumi/Provider/Australia/NT.php | 8 +- src/Yasumi/Provider/Australia/Queensland.php | 4 +- .../Australia/Queensland/Brisbane.php | 2 +- src/Yasumi/Provider/Australia/SA.php | 24 +-- 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 +- src/Yasumi/Provider/Australia/WA.php | 8 +- src/Yasumi/Provider/Austria.php | 2 +- src/Yasumi/Provider/Belgium.php | 8 +- src/Yasumi/Provider/Bosnia.php | 20 +- src/Yasumi/Provider/Brazil.php | 14 +- src/Yasumi/Provider/Croatia.php | 16 +- src/Yasumi/Provider/CzechRepublic.php | 25 ++- src/Yasumi/Provider/Denmark.php | 4 +- src/Yasumi/Provider/Estonia.php | 12 +- src/Yasumi/Provider/Finland.php | 2 +- src/Yasumi/Provider/France.php | 4 +- src/Yasumi/Provider/Germany.php | 2 +- src/Yasumi/Provider/Germany/Saxony.php | 2 +- src/Yasumi/Provider/Greece.php | 10 +- src/Yasumi/Provider/Hungary.php | 12 +- src/Yasumi/Provider/Ireland.php | 12 +- src/Yasumi/Provider/Italy.php | 4 +- src/Yasumi/Provider/Japan.php | 52 +++-- src/Yasumi/Provider/Latvia.php | 12 +- src/Yasumi/Provider/Lithuania.php | 12 +- src/Yasumi/Provider/Netherlands.php | 20 +- src/Yasumi/Provider/NewZealand.php | 2 +- src/Yasumi/Provider/Norway.php | 2 +- src/Yasumi/Provider/Poland.php | 8 +- src/Yasumi/Provider/Portugal.php | 8 +- src/Yasumi/Provider/Romania.php | 30 +-- src/Yasumi/Provider/Russia.php | 28 +-- src/Yasumi/Provider/Slovakia.php | 28 +-- src/Yasumi/Provider/SouthAfrica.php | 18 +- src/Yasumi/Provider/SouthKorea.php | 34 +-- 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 | 6 +- src/Yasumi/Provider/Spain/LaRioja.php | 2 +- src/Yasumi/Provider/Spain/RegionOfMurcia.php | 2 +- .../Provider/Spain/ValencianCommunity.php | 2 +- src/Yasumi/Provider/Sweden.php | 2 +- src/Yasumi/Provider/Switzerland.php | 30 +-- src/Yasumi/Provider/Switzerland/Geneva.php | 9 +- src/Yasumi/Provider/Switzerland/Glarus.php | 3 +- src/Yasumi/Provider/Switzerland/Jura.php | 3 +- src/Yasumi/Provider/Switzerland/Neuchatel.php | 3 +- src/Yasumi/Provider/Switzerland/Obwalden.php | 6 +- src/Yasumi/Provider/Switzerland/Ticino.php | 11 +- src/Yasumi/Provider/USA.php | 16 +- src/Yasumi/Provider/Ukraine.php | 12 +- src/Yasumi/Provider/UnitedKingdom.php | 14 +- .../UnitedKingdom/NorthernIreland.php | 4 +- .../Provider/UnitedKingdom/Scotland.php | 2 +- src/Yasumi/data/locales.php | 202 ++++++++++++++++++ src/Yasumi/data/translations/allSaintsDay.php | 36 ++-- src/Yasumi/data/translations/allSaintsEve.php | 6 +- src/Yasumi/data/translations/annunciation.php | 7 +- src/Yasumi/data/translations/anzacDay.php | 4 +- src/Yasumi/data/translations/armisticeDay.php | 8 +- src/Yasumi/data/translations/ascensionDay.php | 24 +-- src/Yasumi/data/translations/ashWednesday.php | 16 +- .../data/translations/assumptionOfMary.php | 31 ++- src/Yasumi/data/translations/australiaDay.php | 3 +- .../translations/carnationRevolutionDay.php | 4 +- src/Yasumi/data/translations/christmasDay.php | 59 +++-- src/Yasumi/data/translations/christmasEve.php | 31 ++- .../data/translations/corpusChristi.php | 17 +- .../data/translations/dayAfterNewYearsDay.php | 6 +- .../data/translations/dayOfReformation.php | 4 +- src/Yasumi/data/translations/easter.php | 53 ++--- src/Yasumi/data/translations/easterMonday.php | 50 ++--- src/Yasumi/data/translations/epiphany.php | 29 ++- src/Yasumi/data/translations/epiphanyEve.php | 6 +- src/Yasumi/data/translations/fathersDay.php | 20 +- src/Yasumi/data/translations/goodFriday.php | 51 ++--- .../translations/immaculateConception.php | 17 +- .../translations/internationalWomensDay.php | 11 +- .../translations/internationalWorkersDay.php | 54 +++-- src/Yasumi/data/translations/labourDay.php | 13 +- .../data/translations/maundyThursday.php | 10 +- src/Yasumi/data/translations/mothersDay.php | 20 +- src/Yasumi/data/translations/newYearsDay.php | 66 +++--- src/Yasumi/data/translations/newYearsEve.php | 10 +- src/Yasumi/data/translations/pentecost.php | 38 ++-- .../data/translations/pentecostMonday.php | 27 +-- src/Yasumi/data/translations/portugalDay.php | 4 +- .../translations/portugueseRepublicDay.php | 4 +- .../data/translations/reformationDay.php | 4 +- .../translations/restorationOfIndepence.php | 4 +- .../data/translations/secondChristmasDay.php | 37 ++-- .../data/translations/secondNewYearsDay.php | 4 +- src/Yasumi/data/translations/stAndrewsDay.php | 5 +- src/Yasumi/data/translations/stDavidsDay.php | 5 +- src/Yasumi/data/translations/stGeorgesDay.php | 6 +- src/Yasumi/data/translations/stJohnsDay.php | 18 +- src/Yasumi/data/translations/stJohnsEve.php | 6 +- src/Yasumi/data/translations/stJosephsDay.php | 10 +- src/Yasumi/data/translations/stMartinsDay.php | 5 +- .../data/translations/stStephensDay.php | 19 +- .../data/translations/substituteHoliday.php | 11 +- src/Yasumi/data/translations/summerTime.php | 8 +- .../data/translations/valentinesDay.php | 24 +-- .../data/translations/victoryInEuropeDay.php | 8 +- src/Yasumi/data/translations/waitangiDay.php | 3 +- src/Yasumi/data/translations/walpurgisEve.php | 4 +- src/Yasumi/data/translations/winterTime.php | 6 +- .../data/translations/worldAnimalDay.php | 5 +- tests/Base/HolidayTest.php | 40 ++++ tests/Estonia/IndependenceDayTest.php | 2 +- .../RestorationOfIndependenceDayTest.php | 2 +- tests/Estonia/VictoryDayTest.php | 2 +- tests/Latvia/MidsummerEveDayTest.php | 2 +- tests/Latvia/NewYearsEveDayTest.php | 2 +- ...oclamationOfTheRepublicOfLatviaDayTest.php | 2 +- .../RestorationOfIndependenceDayTest.php | 2 +- ...rationOfIndependenceOfLithuaniaDayTest.php | 2 +- ...estorationOfTheStateOfLithuaniaDayTest.php | 2 +- tests/Lithuania/StatehoodDayTest.php | 2 +- .../Russia/DefenceOfTheFatherlandDayTest.php | 2 +- tests/Russia/RussiaDayTest.php | 2 +- tests/Russia/UnityDayTest.php | 2 +- tests/YasumiBase.php | 18 +- 148 files changed, 1040 insertions(+), 875 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9874d78e0..ce560d0f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Upgraded to PHPUnit 8. - Replaced the standard 'InvalidArgumentException' when an invalid year or holiday provider are given by a new exception for each of these two situations separately ('InvalidYearException' and 'ProviderNotFoundException'). This allows you to better distinguish which exception may occur when instantiating the Yasumi class. [\#95](https://github.com/azuyalabs/yasumi/pull/95) ([qneyrat](https://github.com/qneyrat)) - Refactored the AbstractProvider::count method to use the newly added SubstituteHoliday class. +- Fallback support added to getName() to allow e.g. fallback from 'de_AT' to 'de'. [\#176](https://github.com/azuyalabs/yasumi/pull/176) ([c960657](https://github.com/c960657)) ### Fixed - Late Summer Bank Holiday in 1968 and 1969 in United Kingdom [\#161](https://github.com/azuyalabs/yasumi/pull/161) ([c960657](https://github.com/c960657)) diff --git a/src/Yasumi/Holiday.php b/src/Yasumi/Holiday.php index 9408f77a6..f611cc9e6 100755 --- a/src/Yasumi/Holiday.php +++ b/src/Yasumi/Holiday.php @@ -160,7 +160,20 @@ public function jsonSerialize(): self */ public function getName(): string { - return $this->translations[$this->displayLocale] ?? $this->translations[self::DEFAULT_LOCALE] ?? $this->shortName; + $locales = [$this->displayLocale]; + $parts = \explode('_', $this->displayLocale); + while (\array_pop($parts) && $parts) { + $locales[] = \implode('_', $parts); + } + $locales[] = self::DEFAULT_LOCALE; + + foreach ($locales as $locale) { + if (isset($this->translations[$locale])) { + return $this->translations[$locale]; + } + } + + return $this->shortName; } /** diff --git a/src/Yasumi/Provider/Australia.php b/src/Yasumi/Provider/Australia.php index 782522c2a..2f87b0e78 100755 --- a/src/Yasumi/Provider/Australia.php +++ b/src/Yasumi/Provider/Australia.php @@ -71,15 +71,15 @@ public function initialize(): void private function calculateNewYearHolidays(): void { $newyearsday = new DateTime("$this->year-01-01", new DateTimeZone($this->timezone)); - $this->calculateHoliday('newYearsDay', ['en_AU' => 'New Year\'s Day'], $newyearsday, false, false); + $this->calculateHoliday('newYearsDay', [], $newyearsday, false, false); switch ($newyearsday->format('w')) { case 0: // sunday $newyearsday->add(new DateInterval('P1D')); - $this->calculateHoliday('newYearsHoliday', ['en_AU' => 'New Year\'s Holiday'], $newyearsday, false, false); + $this->calculateHoliday('newYearsHoliday', ['en' => 'New Year\'s Holiday'], $newyearsday, false, false); break; case 6: // saturday $newyearsday->add(new DateInterval('P2D')); - $this->calculateHoliday('newYearsHoliday', ['en_AU' => 'New Year\'s Holiday'], $newyearsday, false, false); + $this->calculateHoliday('newYearsHoliday', ['en' => 'New Year\'s Holiday'], $newyearsday, false, false); break; } } @@ -137,7 +137,7 @@ private function calculateAustraliaDay(): void { $date = new DateTime("$this->year-01-26", new DateTimeZone($this->timezone)); - $this->calculateHoliday('australiaDay', ['en_AU' => 'Australia Day'], $date); + $this->calculateHoliday('australiaDay', ['en' => 'Australia Day'], $date); } /** @@ -163,7 +163,7 @@ private function calculateAnzacDay(): void } $date = new DateTime("$this->year-04-25", new DateTimeZone($this->timezone)); - $this->calculateHoliday('anzacDay', ['en_AU' => 'ANZAC Day'], $date, false, false); + $this->calculateHoliday('anzacDay', [], $date, false, false); $easter = $this->calculateEaster($this->year, $this->timezone); $easterMonday = $this->calculateEaster($this->year, $this->timezone); @@ -172,7 +172,7 @@ private function calculateAnzacDay(): void $fDate = $date->format('Y-m-d'); if ($fDate === $easter->format('Y-m-d') || $fDate === $easterMonday->format('Y-m-d')) { $easterMonday->add(new DateInterval('P1D')); - $this->calculateHoliday('easterTuesday', ['en_AU' => 'Easter Tuesday'], $easterMonday, false, false); + $this->calculateHoliday('easterTuesday', ['en' => 'Easter Tuesday'], $easterMonday, false, false); } unset($fDate); } @@ -193,23 +193,23 @@ private function calculateChristmasDay(): void { $christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone)); $boxingDay = new DateTime("$this->year-12-26", new DateTimeZone($this->timezone)); - $this->calculateHoliday('christmasDay', ['en_AU' => 'Christmas Day'], $christmasDay, false, false); - $this->calculateHoliday('secondChristmasDay', ['en_AU' => 'Boxing Day'], $boxingDay, false, false); + $this->calculateHoliday('christmasDay', [], $christmasDay, false, false); + $this->calculateHoliday('secondChristmasDay', [], $boxingDay, false, false); switch ($christmasDay->format('w')) { case 0: // sunday $christmasDay->add(new DateInterval('P2D')); - $this->calculateHoliday('christmasHoliday', ['en_AU' => 'Christmas Holiday'], $christmasDay, false, false); + $this->calculateHoliday('christmasHoliday', ['en' => 'Christmas Holiday'], $christmasDay, false, false); break; case 5: // friday $boxingDay->add(new DateInterval('P2D')); - $this->calculateHoliday('secondChristmasHoliday', ['en_AU' => 'Boxing Day Holiday'], $boxingDay, false, false); + $this->calculateHoliday('secondChristmasHoliday', ['en' => 'Boxing Day Holiday'], $boxingDay, false, false); break; case 6: // saturday $christmasDay->add(new DateInterval('P2D')); $boxingDay->add(new DateInterval('P2D')); - $this->calculateHoliday('christmasHoliday', ['en_AU' => 'Christmas Holiday'], $christmasDay, false, false); - $this->calculateHoliday('secondChristmasHoliday', ['en_AU' => 'Boxing Day Holiday'], $boxingDay, false, false); + $this->calculateHoliday('christmasHoliday', ['en' => 'Christmas Holiday'], $christmasDay, false, false); + $this->calculateHoliday('secondChristmasHoliday', ['en' => 'Boxing Day Holiday'], $boxingDay, false, false); break; } } diff --git a/src/Yasumi/Provider/Australia/ACT.php b/src/Yasumi/Provider/Australia/ACT.php index 32c660a45..6a51099ed 100644 --- a/src/Yasumi/Provider/Australia/ACT.php +++ b/src/Yasumi/Provider/Australia/ACT.php @@ -77,7 +77,7 @@ private function easterSunday($year, $timezone, $locale, $type = null): Holiday { return new Holiday( 'easter', - ['en_AU' => 'Easter Sunday'], + ['en' => 'Easter Sunday'], $this->calculateEaster($year, $timezone), $locale, $type ?? Holiday::TYPE_OFFICIAL @@ -109,7 +109,7 @@ private function easterSaturday($year, $timezone, $locale, $type = null): Holida { return new Holiday( 'easterSaturday', - ['en_AU' => 'Easter Saturday'], + ['en' => 'Easter Saturday'], $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), $locale, $type ?? Holiday::TYPE_OFFICIAL @@ -135,7 +135,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -151,7 +151,7 @@ private function calculateLabourDay(): void { $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); - $this->addHoliday(new Holiday('labourDay', ['en_AU' => 'Labour Day'], $date, $this->locale)); + $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); } /** @@ -166,7 +166,7 @@ private function calculateCanberraDay(): void } else { $date = new DateTime("second monday of march $this->year", new DateTimeZone($this->timezone)); } - $this->addHoliday(new Holiday('canberraDay', ['en_AU' => 'Canberra Day'], $date, $this->locale)); + $this->addHoliday(new Holiday('canberraDay', ['en' => 'Canberra Day'], $date, $this->locale)); } /** @@ -185,6 +185,6 @@ private function calculateReconciliationDay(): void if (1 !== $day) { $date = $date->add(0 === $day ? new DateInterval('P1D') : new DateInterval('P' . (8 - $day) . 'D')); } - $this->addHoliday(new Holiday('reconciliationDay', ['en_AU' => 'Reconciliation Day'], $date, $this->locale)); + $this->addHoliday(new Holiday('reconciliationDay', ['en' => 'Reconciliation Day'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/NSW.php b/src/Yasumi/Provider/Australia/NSW.php index f6f076493..d1adb1ecb 100644 --- a/src/Yasumi/Provider/Australia/NSW.php +++ b/src/Yasumi/Provider/Australia/NSW.php @@ -44,7 +44,7 @@ public function initialize(): void { parent::initialize(); - $this->addHoliday(new Holiday('easter', ['en_AU' => 'Easter Sunday'], $this->calculateEaster($this->year, $this->timezone), $this->locale)); + $this->addHoliday(new Holiday('easter', [], $this->calculateEaster($this->year, $this->timezone), $this->locale)); $this->addHoliday($this->easterSaturday($this->year, $this->timezone, $this->locale)); $this->calculateQueensBirthday(); $this->calculateLabourDay(); @@ -76,7 +76,7 @@ private function easterSaturday($year, $timezone, $locale, $type = null): Holida { return new Holiday( 'easterSaturday', - ['en_AU' => 'Easter Saturday'], + ['en' => 'Easter Saturday'], $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), $locale, $type ?? Holiday::TYPE_OFFICIAL @@ -102,7 +102,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -131,7 +131,7 @@ private function calculateBankHoliday(): void { $this->calculateHoliday( 'bankHoliday', - ['en_AU' => 'Bank Holiday'], + ['en' => 'Bank Holiday'], new DateTime('first monday of august ' . $this->year, new DateTimeZone($this->timezone)), false, false, diff --git a/src/Yasumi/Provider/Australia/NT.php b/src/Yasumi/Provider/Australia/NT.php index 5fb505c05..c8423879b 100644 --- a/src/Yasumi/Provider/Australia/NT.php +++ b/src/Yasumi/Provider/Australia/NT.php @@ -75,7 +75,7 @@ private function easterSaturday($year, $timezone, $locale, $type = null): Holida { return new Holiday( 'easterSaturday', - ['en_AU' => 'Easter Saturday'], + ['en' => 'Easter Saturday'], $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), $locale, $type ?? Holiday::TYPE_OFFICIAL @@ -101,7 +101,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -117,7 +117,7 @@ private function calculateMayDay(): void { $date = new DateTime("first monday of may $this->year", new DateTimeZone($this->timezone)); - $this->addHoliday(new Holiday('mayDay', ['en_AU' => 'May Day'], $date, $this->locale)); + $this->addHoliday(new Holiday('mayDay', ['en' => 'May Day'], $date, $this->locale)); } /** @@ -132,7 +132,7 @@ private function calculatePicnicDay(): void { $this->calculateHoliday( 'picnicDay', - ['en_AU' => 'Picnic Day'], + ['en' => 'Picnic Day'], new DateTime('first monday of august ' . $this->year, new DateTimeZone($this->timezone)), false, false diff --git a/src/Yasumi/Provider/Australia/Queensland.php b/src/Yasumi/Provider/Australia/Queensland.php index eb740ee94..0e954878b 100644 --- a/src/Yasumi/Provider/Australia/Queensland.php +++ b/src/Yasumi/Provider/Australia/Queensland.php @@ -67,7 +67,7 @@ private function calculateQueensBirthday(): void if ($this->year < 2012 || 2013 === $this->year || 2014 === $this->year || 2015 === $this->year) { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -75,7 +75,7 @@ private function calculateQueensBirthday(): void } else { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('first monday of october ' . $this->year, new DateTimeZone($this->timezone)), false, false diff --git a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php index efdccc17a..84accf1a6 100644 --- a/src/Yasumi/Provider/Australia/Queensland/Brisbane.php +++ b/src/Yasumi/Provider/Australia/Queensland/Brisbane.php @@ -72,6 +72,6 @@ private function calculatePeoplesDay(): void $date = $date->add(new DateInterval('P7D')); } $date = $date->add(new DateInterval('P5D')); - $this->addHoliday(new Holiday('peoplesDay', ['en_AU' => 'Ekka People\'s Day'], $date, $this->locale)); + $this->addHoliday(new Holiday('peoplesDay', ['en' => 'Ekka People\'s Day'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/SA.php b/src/Yasumi/Provider/Australia/SA.php index 39d684011..d8b500413 100644 --- a/src/Yasumi/Provider/Australia/SA.php +++ b/src/Yasumi/Provider/Australia/SA.php @@ -83,7 +83,7 @@ private function easterSaturday($year, $timezone, $locale, $type = null): Holida { return new Holiday( 'easterSaturday', - ['en_AU' => 'Easter Saturday'], + ['en' => 'Easter Saturday'], $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), $locale, $type ?? Holiday::TYPE_OFFICIAL @@ -109,7 +109,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -125,7 +125,7 @@ private function calculateLabourDay(): void { $date = new DateTime("first monday of october $this->year", new DateTimeZone($this->timezone)); - $this->addHoliday(new Holiday('labourDay', ['en_AU' => 'Labour Day'], $date, $this->locale)); + $this->addHoliday(new Holiday('labourDay', ['en' => 'Labour Day'], $date, $this->locale)); } /** @@ -142,7 +142,7 @@ private function calculateAdelaideCupDay(): void if ($this->year < 2006) { $this->calculateHoliday( 'adelaideCup', - ['en_AU' => 'Adelaide Cup'], + ['en' => 'Adelaide Cup'], new DateTime('third monday of may ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -150,7 +150,7 @@ private function calculateAdelaideCupDay(): void } else { $this->calculateHoliday( 'adelaideCup', - ['en_AU' => 'Adelaide Cup'], + ['en' => 'Adelaide Cup'], new DateTime('second monday of march ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -167,27 +167,27 @@ private function calculateAdelaideCupDay(): void private function calculateProclamationDay(): void { $christmasDay = new DateTime("$this->year-12-25", new DateTimeZone($this->timezone)); - $this->calculateHoliday('christmasDay', ['en_AU' => 'Christmas Day'], $christmasDay, false, false); + $this->calculateHoliday('christmasDay', [], $christmasDay, false, false); switch ($christmasDay->format('w')) { case 0: // sunday $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('christmasHoliday', ['en_AU' => 'Christmas Holiday'], $christmasDay, false, false); + $this->calculateHoliday('christmasHoliday', ['en' => 'Christmas Holiday'], $christmasDay, false, false); $proclamationDay = $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('proclamationDay', ['en_AU' => 'Proclamation Day'], $proclamationDay, false, false); + $this->calculateHoliday('proclamationDay', ['en' => 'Proclamation Day'], $proclamationDay, false, false); break; case 5: // friday $proclamationDay = $christmasDay->add(new DateInterval('P3D')); - $this->calculateHoliday('proclamationDay', ['en_AU' => 'Proclamation Day'], $proclamationDay, false, false); + $this->calculateHoliday('proclamationDay', ['en' => 'Proclamation Day'], $proclamationDay, false, false); break; case 6: // saturday $christmasDay->add(new DateInterval('P2D')); - $this->calculateHoliday('christmasHoliday', ['en_AU' => 'Christmas Holiday'], $christmasDay, false, false); + $this->calculateHoliday('christmasHoliday', ['en' => 'Christmas Holiday'], $christmasDay, false, false); $proclamationDay = $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('proclamationDay', ['en_AU' => 'Proclamation Day'], $proclamationDay, false, false); + $this->calculateHoliday('proclamationDay', ['en' => 'Proclamation Day'], $proclamationDay, false, false); break; default: // monday-thursday $proclamationDay = $christmasDay->add(new DateInterval('P1D')); - $this->calculateHoliday('proclamationDay', ['en_AU' => 'Proclamation Day'], $proclamationDay, false, false); + $this->calculateHoliday('proclamationDay', ['en' => 'Proclamation Day'], $proclamationDay, false, false); break; } } diff --git a/src/Yasumi/Provider/Australia/Tasmania.php b/src/Yasumi/Provider/Australia/Tasmania.php index 850cad0e0..bf53bbe03 100644 --- a/src/Yasumi/Provider/Australia/Tasmania.php +++ b/src/Yasumi/Provider/Australia/Tasmania.php @@ -57,7 +57,7 @@ private function calculateEightHoursDay(): void { $date = new DateTime("second monday of march $this->year", new DateTimeZone($this->timezone)); - $this->addHoliday(new Holiday('eightHourDay', ['en_AU' => 'Eight Hour Day'], $date, $this->locale)); + $this->addHoliday(new Holiday('eightHourDay', ['en' => 'Eight Hour Day'], $date, $this->locale)); } /** @@ -79,7 +79,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => 'Queen\'s Birthday'], + ['en' => 'Queen\'s Birthday'], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -98,7 +98,7 @@ private function calculateRecreationDay(): void { $this->calculateHoliday( 'recreationDay', - ['en_AU' => 'Recreation Day'], + ['en' => 'Recreation Day'], new DateTime('first monday of november ' . $this->year, new DateTimeZone($this->timezone)), false, false diff --git a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php index 164fd339e..65761d3fb 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php +++ b/src/Yasumi/Provider/Australia/Tasmania/CentralNorth.php @@ -54,6 +54,6 @@ private function calculateDevonportShow(): void { $date = new DateTime($this->year . '-12-02', new DateTimeZone($this->timezone)); $date = $date->modify('previous friday'); - $this->addHoliday(new Holiday('devonportShow', ['en_AU' => 'Devonport Show'], $date, $this->locale)); + $this->addHoliday(new Holiday('devonportShow', ['en' => 'Devonport Show'], $date, $this->locale)); } } diff --git a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php index 0fed05175..2dedb98d8 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/FlindersIsland.php @@ -55,6 +55,6 @@ private function calculateFlindersIslandShow(): void { $date = new DateTime('third saturday of october ' . $this->year, new DateTimeZone($this->timezone)); $date = $date->sub(new DateInterval('P1D')); - $this->addHoliday(new Holiday('flindersIslandShow', ['en_AU' => 'Flinders Island Show'], $date, $this->locale)); + $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 b9187f895..f26bdd06d 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php +++ b/src/Yasumi/Provider/Australia/Tasmania/KingIsland.php @@ -53,7 +53,7 @@ private function calculateKingIslandShow(): void { $this->calculateHoliday( 'kingIslandShow', - ['en_AU' => 'King Island Show'], + ['en' => 'King Island Show'], new DateTime('first tuesday of march ' . $this->year, new DateTimeZone($this->timezone)), false, false diff --git a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php index 072e067a1..dcd67f1c1 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northeast.php @@ -55,6 +55,6 @@ private function calculateLauncestonShow(): void { $date = new DateTime('second saturday of october ' . $this->year, new DateTimeZone($this->timezone)); $date = $date->sub(new DateInterval('P2D')); - $this->addHoliday(new Holiday('launcestonShow', ['en_AU' => 'Royal Launceston Show'], $date, $this->locale)); + $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 aeb23e4b2..049d56c0f 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest.php @@ -55,6 +55,6 @@ private function calculateBurnieShow(): void { $date = new DateTime('first saturday of october ' . $this->year, new DateTimeZone($this->timezone)); $date = $date->sub(new DateInterval('P1D')); - $this->addHoliday(new Holiday('burnieShow', ['en_AU' => 'Burnie Show'], $date, $this->locale)); + $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 9c16c5836..4c7108281 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php +++ b/src/Yasumi/Provider/Australia/Tasmania/Northwest/CircularHead.php @@ -55,6 +55,6 @@ private function calculateAGFEST(): void { $date = new DateTime('first thursday of may ' . $this->year, new DateTimeZone($this->timezone)); $date = $date->add(new DateInterval('P1D')); - $this->addHoliday(new Holiday('agfest', ['en_AU' => 'AGFEST'], $date, $this->locale)); + $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 e3d920d51..562b59de0 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South.php @@ -55,6 +55,6 @@ private function calculateHobartShow(): void { $date = new DateTime('fourth saturday of october ' . $this->year, new DateTimeZone($this->timezone)); $date = $date->sub(new DateInterval('P2D')); - $this->addHoliday(new Holiday('hobartShow', ['en_AU' => 'Royal Hobart Show'], $date, $this->locale)); + $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 b95923dff..c1ae91d3c 100644 --- a/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php +++ b/src/Yasumi/Provider/Australia/Tasmania/South/Southeast.php @@ -56,7 +56,7 @@ private function calculateHobartRegatta(): void { $this->calculateHoliday( 'hobartRegatta', - ['en_AU' => 'Royal Hobart Regatta'], + ['en' => 'Royal Hobart Regatta'], new DateTime('second monday of february ' . $this->year, new DateTimeZone($this->timezone)), false, false diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index 05f6120ab..9deb59faf 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -77,7 +77,7 @@ private function easterSunday($year, $timezone, $locale, $type = null): Holiday { return new Holiday( 'easter', - ['en_AU' => 'Easter Sunday'], + ['en' => 'Easter Sunday'], $this->calculateEaster($year, $timezone), $locale, $type ?? Holiday::TYPE_OFFICIAL @@ -109,7 +109,7 @@ private function easterSaturday($year, $timezone, $locale, $type = null): Holida { return new Holiday( 'easterSaturday', - ['en_AU' => 'Easter Saturday'], + ['en' => 'Easter Saturday'], $this->calculateEaster($year, $timezone)->sub(new DateInterval('P1D')), $locale, $type ?? Holiday::TYPE_OFFICIAL @@ -125,7 +125,7 @@ private function calculateLabourDay(): void { $date = new DateTime("second monday of march $this->year", new DateTimeZone($this->timezone)); - $this->addHoliday(new Holiday('labourDay', ['en_AU' => 'Labour Day'], $date, $this->locale)); + $this->addHoliday(new Holiday('labourDay', [], $date, $this->locale)); } /** @@ -147,7 +147,7 @@ private function calculateQueensBirthday(): void { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => 'Queen\'s Birthday'], + ['en' => 'Queen\'s Birthday'], new DateTime('second monday of june ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -163,7 +163,7 @@ private function calculateMelbourneCupDay(): void { $date = new DateTime('first Tuesday of November' . " $this->year", new DateTimeZone($this->timezone)); - $this->addHoliday(new Holiday('melbourneCup', ['en_AU' => 'Melbourne Cup'], $date, $this->locale)); + $this->addHoliday(new Holiday('melbourneCup', ['en' => 'Melbourne Cup'], $date, $this->locale)); } /** @@ -194,7 +194,7 @@ private function calculateAFLGrandFinalDay(): void $this->addHoliday(new Holiday( 'aflGrandFinalFriday', - ['en_AU' => 'AFL Grand Final Friday'], + ['en' => 'AFL Grand Final Friday'], $date, $this->locale )); diff --git a/src/Yasumi/Provider/Australia/WA.php b/src/Yasumi/Provider/Australia/WA.php index 15191f29a..74649e098 100644 --- a/src/Yasumi/Provider/Australia/WA.php +++ b/src/Yasumi/Provider/Australia/WA.php @@ -68,7 +68,7 @@ private function calculateQueensBirthday(): void if (2011 === $this->year) { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('2011-10-28', new DateTimeZone($this->timezone)), false, false @@ -76,7 +76,7 @@ private function calculateQueensBirthday(): void } elseif (2012 === $this->year) { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('2012-10-01', new DateTimeZone($this->timezone)), false, false @@ -84,7 +84,7 @@ private function calculateQueensBirthday(): void } else { $this->calculateHoliday( 'queensBirthday', - ['en_AU' => "Queen's Birthday"], + ['en' => "Queen's Birthday"], new DateTime('last monday of september ' . $this->year, new DateTimeZone($this->timezone)), false, false @@ -116,7 +116,7 @@ private function calculateWesternAustraliaDay(): void { $this->calculateHoliday( 'westernAustraliaDay', - ['en_AU' => 'Western Australia Day'], + ['en' => 'Western Australia Day'], new DateTime('first monday of june ' . $this->year, new DateTimeZone($this->timezone)), false, false diff --git a/src/Yasumi/Provider/Austria.php b/src/Yasumi/Provider/Austria.php index 57df71a06..0d31900db 100644 --- a/src/Yasumi/Provider/Austria.php +++ b/src/Yasumi/Provider/Austria.php @@ -88,7 +88,7 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday( 'nationalDay', - ['de_AT' => 'Nationalfeiertag'], + ['de' => 'Nationalfeiertag'], new DateTime($this->year . '-10-26', new \DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Belgium.php b/src/Yasumi/Provider/Belgium.php index 86b6b244b..b1059dcc8 100755 --- a/src/Yasumi/Provider/Belgium.php +++ b/src/Yasumi/Provider/Belgium.php @@ -64,11 +64,9 @@ public function initialize(): void * Belgian National Day is the National Day of Belgium celebrated on 21 July each year. */ $this->addHoliday(new Holiday('nationalDay', [ - 'fr_FR' => 'Fête nationale', - 'fr_BE' => 'Fête nationale', - 'en_US' => 'Belgian National Day', - 'nl_NL' => 'Nationale feestdag', - 'nl_BE' => 'Nationale feestdag' + 'fr' => 'Fête nationale', + 'en' => 'Belgian National Day', + 'nl' => 'Nationale feestdag' ], new DateTime("$this->year-7-21", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Bosnia.php b/src/Yasumi/Provider/Bosnia.php index dabc956b4..c2b1524a6 100644 --- a/src/Yasumi/Provider/Bosnia.php +++ b/src/Yasumi/Provider/Bosnia.php @@ -57,8 +57,8 @@ public function initialize(): void // Add Orthodox holidays $this->addHoliday(new Holiday('orthodoxChristmasDay', [ - 'en_US' => 'Orthodox Christmas Day', - 'bs_Latn_BA' => 'Pravoslavni Božić' + 'en' => 'Orthodox Christmas Day', + 'bs_Latn' => 'Pravoslavni Božić' ], new DateTime("{$this->year}-01-07", new DateTimeZone($this->timezone)))); /** @@ -66,8 +66,8 @@ public function initialize(): void */ if ($this->year >= 1992) { $this->addHoliday(new Holiday('independenceDay', [ - 'en_US' => 'Independence Day', - 'bs_Latn_BA' => 'Dan Nezavisnosti' + 'en' => 'Independence Day', + 'bs_Latn' => 'Dan Nezavisnosti' ], new DateTime("$this->year-3-1", new DateTimeZone($this->timezone)), $this->locale)); } @@ -76,8 +76,8 @@ public function initialize(): void */ if ($this->year >= 1943) { $this->addHoliday(new Holiday('statehoodDay', [ - 'en_US' => 'Statehood Day', - 'bs_Latn_BA' => 'Dan državnosti' + 'en' => 'Statehood Day', + 'bs_Latn' => 'Dan državnosti' ], new DateTime("$this->year-11-25", new DateTimeZone($this->timezone)), $this->locale)); } @@ -85,16 +85,16 @@ public function initialize(): void * Day after New Years Day */ $this->addHoliday(new Holiday('dayAfterNewYearsDay', [ - 'en_US' => 'Day after New Year\'s Day', - 'ro_RO' => 'Nova godina - drugi dan' + 'en' => 'Day after New Year\'s Day', + 'bs_Latn' => 'Nova godina - drugi dan' ], new DateTime("$this->year-01-02", new DateTimeZone($this->timezone)), $this->locale)); /** * Second Labour day */ $this->addHoliday(new Holiday('secondLabourDay', [ - 'en_US' => 'Second Labour Day', - 'ro_RO' => 'Praznik rada - drugi dan' + 'en' => 'Second Labour Day', + 'bs_Latn' => 'Praznik rada - drugi dan' ], new DateTime("$this->year-05-02", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Brazil.php b/src/Yasumi/Provider/Brazil.php index b769484eb..fa27e96a8 100644 --- a/src/Yasumi/Provider/Brazil.php +++ b/src/Yasumi/Provider/Brazil.php @@ -69,7 +69,7 @@ public function initialize(): void $carnavalMonday = clone $easter; $this->addHoliday(new Holiday( 'carnavalMonday', - ['pt_BR' => 'Segunda-feira de Carnaval'], + ['pt' => 'Segunda-feira de Carnaval'], $carnavalMonday->sub(new DateInterval('P48D')), $this->locale, Holiday::TYPE_OBSERVANCE @@ -78,7 +78,7 @@ public function initialize(): void $carnavalTuesday = clone $easter; $this->addHoliday(new Holiday( 'carnavalTuesday', - ['pt_BR' => 'Terça-feira de Carnaval'], + ['pt' => 'Terça-feira de Carnaval'], $carnavalTuesday->sub(new DateInterval('P47D')), $this->locale, Holiday::TYPE_OBSERVANCE @@ -97,7 +97,7 @@ public function initialize(): void if ($this->year >= 1792) { $this->addHoliday(new Holiday( 'tiradentesDay', - ['pt_BR' => 'Dia de Tiradentes'], + ['pt' => 'Dia de Tiradentes'], new DateTime("$this->year-04-21", new DateTimeZone($this->timezone)), $this->locale )); @@ -114,7 +114,7 @@ public function initialize(): void if ($this->year >= 1822) { $this->addHoliday(new Holiday( 'independenceDay', - ['pt_BR' => 'Dia da Independência do Brasil'], + ['pt' => 'Dia da Independência do Brasil'], new DateTime("$this->year-09-07", new DateTimeZone($this->timezone)), $this->locale )); @@ -134,7 +134,7 @@ public function initialize(): void if ($this->year >= 1980) { $this->addHoliday(new Holiday( 'ourLadyOfAparecidaDay', - ['pt_BR' => 'Dia de Nossa Senhora Aparecida'], + ['pt' => 'Dia de Nossa Senhora Aparecida'], new DateTime("$this->year-10-12", new DateTimeZone($this->timezone)), $this->locale )); @@ -150,7 +150,7 @@ public function initialize(): void if ($this->year >= 1300) { $this->addHoliday(new Holiday( 'allSoulsDay', - ['pt_BR' => 'Dia de Finados'], + ['pt' => 'Dia de Finados'], new DateTime("$this->year-11-02", new DateTimeZone($this->timezone)), $this->locale )); @@ -168,7 +168,7 @@ public function initialize(): void if ($this->year >= 1889) { $this->addHoliday(new Holiday( 'proclamationOfRepublicDay', - ['pt_BR' => 'Dia da Proclamação da República'], + ['pt' => 'Dia da Proclamação da República'], new DateTime("$this->year-11-15", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index 067fde886..87e219c03 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -64,8 +64,8 @@ public function initialize(): void */ if ($this->year >= 1941) { $this->addHoliday(new Holiday('antifascistStruggleDay', [ - 'en_US' => 'Day of Antifascist Struggle', - 'hr_HR' => 'Dan antifašističke borbe' + 'en' => 'Day of Antifascist Struggle', + 'hr' => 'Dan antifašističke borbe' ], new DateTime("$this->year-6-22", new DateTimeZone($this->timezone)), $this->locale)); } @@ -74,8 +74,8 @@ public function initialize(): void */ if ($this->year >= 1991) { $this->addHoliday(new Holiday('statehoodDay', [ - 'en_US' => 'Statehood Day', - 'hr_HR' => 'Dan državnosti' + 'en' => 'Statehood Day', + 'hr' => 'Dan državnosti' ], new DateTime("$this->year-6-25", new DateTimeZone($this->timezone)), $this->locale)); } @@ -84,8 +84,8 @@ public function initialize(): void */ if ($this->year >= 1995) { $this->addHoliday(new Holiday('homelandThanksgiving', [ - 'en_US' => 'Homeland Thanksgiving Day', - 'hr_HR' => 'Dan domovinske zahvalnosti' + 'en' => 'Homeland Thanksgiving Day', + 'hr' => 'Dan domovinske zahvalnosti' ], new DateTime("$this->year-8-5", new DateTimeZone($this->timezone)), $this->locale)); } @@ -94,8 +94,8 @@ public function initialize(): void */ if ($this->year >= 1991) { $this->addHoliday(new Holiday('independenceDay', [ - 'en_US' => 'Independence Day', - 'hr_HR' => 'Dan neovisnosti' + 'en' => 'Independence Day', + 'hr' => 'Dan neovisnosti' ], new DateTime("$this->year-10-8", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/CzechRepublic.php b/src/Yasumi/Provider/CzechRepublic.php index 5b24116fb..74a652888 100644 --- a/src/Yasumi/Provider/CzechRepublic.php +++ b/src/Yasumi/Provider/CzechRepublic.php @@ -77,8 +77,8 @@ private function calculateRenewalOfCzechIndependenceDay(): void $this->addHoliday(new Holiday( 'czechRenewalOfIndependentStateDay', [ - 'cs_CZ' => 'Den obnovy samostatného českého státu', - 'en_US' => 'Day of renewal of the independent Czech state' + 'cs' => '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)), $this->locale @@ -110,7 +110,10 @@ private function calculateSaintsCyrilAndMethodiusDay(): void { $this->addHoliday(new Holiday( 'saintsCyrilAndMethodiusDay', - ['cs_CZ' => 'Den slovanských věrozvěstů Cyrila a Metoděje', 'en_US' => 'Saints Cyril and Methodius Day'], + [ + '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)), $this->locale )); @@ -135,7 +138,7 @@ private function calculateJanHusDay(): void { $this->addHoliday(new Holiday( 'janHusDay', - ['cs_CZ' => 'Den upálení mistra Jana Husa', 'en_US' => 'Jan Hus Day'], + ['cs' => 'Den upálení mistra Jana Husa', 'en' => 'Jan Hus Day'], new DateTime($this->year . '-07-6', new \DateTimeZone($this->timezone)), $this->locale )); @@ -163,7 +166,10 @@ private function calculateCzechStatehoodDay(): void { $this->addHoliday(new Holiday( 'czechStateHoodDay', - ['cs_CZ' => 'Den české státnosti', 'en_US' => 'St. Wenceslas Day (Czech Statehood Day)'], + [ + 'cs' => 'Den české státnosti', + 'en' => 'St. Wenceslas Day (Czech Statehood Day)' + ], new DateTime($this->year . '-09-28', new \DateTimeZone($this->timezone)), $this->locale )); @@ -182,8 +188,8 @@ private function calculateCzechStatehoodDay(): void private function calculateIndependentCzechoslovakStateDay(): void { $this->addHoliday(new Holiday('independentCzechoslovakStateDay', [ - 'cs_CZ' => 'Den vzniku samostatného československého státu', - 'en_US' => 'Independent Czechoslovak State Day' + '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)); } @@ -201,7 +207,10 @@ private function calculateStruggleForFreedomAndDemocracyDay(): void { $this->addHoliday(new Holiday( 'struggleForFreedomAndDemocracyDay', - ['cs_CZ' => 'Den boje za svobodu a demokracii', 'en_US' => 'Struggle for Freedom and Democracy Day'], + [ + 'cs' => 'Den boje za svobodu a demokracii', + 'en' => 'Struggle for Freedom and Democracy Day' + ], new DateTime($this->year . '-11-17', new \DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Denmark.php b/src/Yasumi/Provider/Denmark.php index e17da2d63..689b21deb 100644 --- a/src/Yasumi/Provider/Denmark.php +++ b/src/Yasumi/Provider/Denmark.php @@ -97,7 +97,7 @@ private function calculateGreatPrayerDay(): void if ($this->year >= 1686) { $this->addHoliday(new Holiday( 'greatPrayerDay', - ['da_DK' => 'Store bededag'], + ['da' => 'Store bededag'], new DateTime("fourth friday $easter", new DateTimeZone($this->timezone)), $this->locale )); @@ -125,7 +125,7 @@ private function calculateConstitutionDay(): void if ($this->year >= 1849) { $this->addHoliday(new Holiday( 'constitutionDay', - ['da_DK' => 'Grundlovsdag'], + ['da' => 'Grundlovsdag'], new DateTime("$this->year-6-5", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE diff --git a/src/Yasumi/Provider/Estonia.php b/src/Yasumi/Provider/Estonia.php index 34014ebd1..d863ecf5c 100644 --- a/src/Yasumi/Provider/Estonia.php +++ b/src/Yasumi/Provider/Estonia.php @@ -69,8 +69,8 @@ private function addIndependenceDay(): void { if ($this->year >= self::DECLARATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday('independenceDay', [ - 'en_US' => 'Independence Day', - 'et_EE' => 'Iseseisvuspäev' + 'en' => 'Independence Day', + 'et' => 'Iseseisvuspäev' ], new \DateTime("{$this->year}-02-24", new \DateTimeZone($this->timezone)))); } } @@ -83,8 +83,8 @@ private function addVictoryDay(): void { if ($this->year >= self::VICTORY_DAY_START_YEAR) { $this->addHoliday(new Holiday('victoryDay', [ - 'en_US' => 'Victory Day', - 'et_EE' => 'Võidupüha' + 'en' => 'Victory Day', + 'et' => 'Võidupüha' ], new \DateTime("{$this->year}-06-23", new \DateTimeZone($this->timezone)))); } } @@ -97,8 +97,8 @@ private function addRestorationOfIndependenceDay(): void { if ($this->year >= self::RESTORATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday('restorationOfIndependenceDay', [ - 'en_US' => 'Day of Restoration of Independence', - 'et_EE' => 'Tasiseseisvumispäev' + 'en' => 'Day of Restoration of Independence', + 'et' => 'Tasiseseisvumispäev' ], new \DateTime("{$this->year}-08-20", new \DateTimeZone($this->timezone)))); } } diff --git a/src/Yasumi/Provider/Finland.php b/src/Yasumi/Provider/Finland.php index dfb69f00e..00f861a9c 100644 --- a/src/Yasumi/Provider/Finland.php +++ b/src/Yasumi/Provider/Finland.php @@ -150,7 +150,7 @@ private function calculateIndependenceDay(): void if ($this->year >= 1917) { $this->addHoliday(new Holiday( 'independenceDay', - ['fi_FI' => 'Itsenäisyyspäivä'], + ['fi' => 'Itsenäisyyspäivä'], new DateTime("$this->year-12-6", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php index 4935c9390..8fa0c789e 100755 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -88,8 +88,8 @@ private function calculateBastilleDay(): void { if ($this->year >= 1790) { $this->addHoliday(new Holiday('bastilleDay', [ - 'en_US' => 'Bastille Day', - 'fr_FR' => 'La Fête nationale' + 'en' => 'Bastille Day', + 'fr' => 'La Fête nationale' ], new DateTime("$this->year-7-14", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Germany.php b/src/Yasumi/Provider/Germany.php index 6933a7f26..a1f68d2a8 100644 --- a/src/Yasumi/Provider/Germany.php +++ b/src/Yasumi/Provider/Germany.php @@ -86,7 +86,7 @@ private function calculateGermanUnityDay(): void if ($this->year >= 1990) { $this->addHoliday(new Holiday( 'germanUnityDay', - ['de_DE' => 'Tag der Deutschen Einheit'], + ['de' => 'Tag der Deutschen Einheit'], new DateTime($this->year . '-10-3', new \DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Germany/Saxony.php b/src/Yasumi/Provider/Germany/Saxony.php index c4b0fae5f..1e7c1665b 100755 --- a/src/Yasumi/Provider/Germany/Saxony.php +++ b/src/Yasumi/Provider/Germany/Saxony.php @@ -92,7 +92,7 @@ private function calculateRepentanceAndPrayerDay(): void if ($this->year >= 1995) { $this->addHoliday(new Holiday( 'repentanceAndPrayerDay', - ['de_DE' => 'Buß- und Bettag'], + ['de' => 'Buß- und Bettag'], new DateTime("next wednesday $this->year-11-15", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL diff --git a/src/Yasumi/Provider/Greece.php b/src/Yasumi/Provider/Greece.php index b1f815924..c29132560 100644 --- a/src/Yasumi/Provider/Greece.php +++ b/src/Yasumi/Provider/Greece.php @@ -85,7 +85,7 @@ private function calculateThreeHolyHierarchs(): void { $this->addHoliday(new Holiday( 'threeHolyHierarchs', - ['el_GR' => 'Τριών Ιεραρχών'], + ['el' => 'Τριών Ιεραρχών'], new DateTime("$this->year-1-30", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER @@ -110,7 +110,7 @@ private function calculateCleanMonday(): void { $this->addHoliday(new Holiday( 'cleanMonday', - ['el_GR' => 'Καθαρά Δευτέρα'], + ['el' => 'Καθαρά Δευτέρα'], $this->calculateEaster($this->year, $this->timezone)->sub(new DateInterval('P48D')), $this->locale )); @@ -149,7 +149,7 @@ private function calculateIndependenceDay(): void if ($this->year >= 1821) { $this->addHoliday(new Holiday( 'independenceDay', - ['el_GR' => 'Εικοστή Πέμπτη Μαρτίου'], + ['el' => 'Εικοστή Πέμπτη Μαρτίου'], new DateTime("$this->year-3-25", new DateTimeZone($this->timezone)), $this->locale )); @@ -173,7 +173,7 @@ private function calculateOhiDay(): void if ($this->year >= 1940) { $this->addHoliday(new Holiday( 'ohiDay', - ['el_GR' => 'Επέτειος του Όχι'], + ['el' => 'Επέτειος του Όχι'], new DateTime("$this->year-10-28", new DateTimeZone($this->timezone)), $this->locale )); @@ -197,7 +197,7 @@ private function calculatePolytechnio(): void if ($this->year >= 1973) { $this->addHoliday(new Holiday( 'polytechnio', - ['el_GR' => 'Πολυτεχνείο'], + ['el' => 'Πολυτεχνείο'], new DateTime("$this->year-11-17", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER diff --git a/src/Yasumi/Provider/Hungary.php b/src/Yasumi/Provider/Hungary.php index bf1c73061..11e8715ac 100644 --- a/src/Yasumi/Provider/Hungary.php +++ b/src/Yasumi/Provider/Hungary.php @@ -66,8 +66,8 @@ public function initialize(): void */ if ($this->year >= 1927) { $this->addHoliday(new Holiday('memorialDay1848', [ - 'en_US' => 'Memorial day of the 1848 Revolution', - 'hu_HU' => 'Az 1848-as forradalom ünnepe' + 'en' => 'Memorial day of the 1848 Revolution', + 'hu' => 'Az 1848-as forradalom ünnepe' ], new DateTime("$this->year-3-15", new DateTimeZone($this->timezone)), $this->locale)); } @@ -76,8 +76,8 @@ public function initialize(): void */ if ($this->year >= 1891) { $this->addHoliday(new Holiday('stateFoundation', [ - 'en_US' => 'State Foundation Day', - 'hu_HU' => 'Az államalapítás ünnepe' + 'en' => 'State Foundation Day', + 'hu' => 'Az államalapítás ünnepe' ], new DateTime("$this->year-8-20", new DateTimeZone($this->timezone)), $this->locale)); } @@ -86,8 +86,8 @@ public function initialize(): void */ if ($this->year >= 1991) { $this->addHoliday(new Holiday('memorialDay1956', [ - 'en_US' => 'Memorial day of the 1956 Revolution', - 'hu_HU' => 'Az 1956-os forradalom ünnepe' + 'en' => 'Memorial day of the 1956 Revolution', + 'hu' => 'Az 1956-os forradalom ünnepe' ], new DateTime("$this->year-10-23", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index 1e4aa8ef6..4bf000ba4 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -68,7 +68,7 @@ public function initialize(): void $this->calculateJuneHoliday(); $this->addHoliday(new Holiday( 'augustHoliday', - ['en_IE' => 'August Holiday', 'ga_IE' => 'Lá Saoire i mí Lúnasa'], + ['en' => 'August Holiday', 'ga' => 'Lá Saoire i mí Lúnasa'], new DateTime("next monday $this->year-7-31", new DateTimeZone($this->timezone)), $this->locale )); @@ -157,7 +157,7 @@ private function calculateChristmasDay(): void { $holiday = new Holiday( 'christmasDay', - ['en_IE' => 'Christmas Day', 'ga_IE' => 'Lá Nollag'], + ['en' => 'Christmas Day', 'ga' => 'Lá Nollag'], new DateTime($this->year . '-12-25', new DateTimeZone($this->timezone)), $this->locale ); @@ -242,7 +242,7 @@ private function calculateStPatricksDay(): void } $holiday = new Holiday( 'stPatricksDay', - ['en_IE' => 'St. Patrick\'s Day', 'ga_IE' => 'Lá Fhéile Pádraig'], + ['en' => 'St. Patrick\'s Day', 'ga' => 'Lá Fhéile Pádraig'], new DateTime($this->year . '-3-17', new DateTimeZone($this->timezone)), $this->locale ); @@ -288,7 +288,7 @@ private function calculateMayDay(): void $this->addHoliday(new Holiday( 'mayDay', - ['en_IE' => 'May Day', 'ga_IE' => 'Lá Bealtaine'], + ['en' => 'May Day', 'ga' => 'Lá Bealtaine'], new DateTime("next monday $this->year-4-30", new DateTimeZone($this->timezone)), $this->locale )); @@ -316,7 +316,7 @@ private function calculateJuneHoliday(): void $this->addHoliday(new Holiday( 'juneHoliday', - ['en_IE' => 'June Holiday', 'ga_IE' => 'Lá Saoire i mí an Mheithimh'], + ['en' => 'June Holiday', 'ga' => 'Lá Saoire i mí an Mheithimh'], new DateTime("next monday $this->year-5-31", new DateTimeZone($this->timezone)), $this->locale )); @@ -343,7 +343,7 @@ private function calculateOctoberHoliday(): void $this->addHoliday(new Holiday( 'octoberHoliday', - ['en_IE' => 'October Holiday', 'ga_IE' => 'Lá Saoire i mí Dheireadh Fómhair'], + ['en' => 'October Holiday', 'ga' => 'Lá Saoire i mí Dheireadh Fómhair'], new DateTime("previous monday $this->year-11-01", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index b6f90932a..6f98cfd18 100755 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -84,7 +84,7 @@ private function calculateLiberationDay(): void if ($this->year >= 1949) { $this->addHoliday(new Holiday( 'liberationDay', - ['it_IT' => 'Festa della Liberazione'], + ['it' => 'Festa della Liberazione'], new DateTime("$this->year-4-25", new DateTimeZone($this->timezone)), $this->locale )); @@ -112,7 +112,7 @@ private function calculateRepublicDay(): void if ($this->year >= 1946) { $this->addHoliday(new Holiday( 'republicDay', - ['it_IT' => 'Festa della Repubblica'], + ['it' => 'Festa della Repubblica'], new DateTime("$this->year-6-2", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 99eb596a0..0a7ce2bcc 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -119,7 +119,10 @@ private function calculateNationalFoundationDay(): void if ($this->year >= 1966) { $this->addHoliday(new Holiday( 'nationalFoundationDay', - ['en_US' => 'National Foundation Day', 'ja_JP' => '建国記念の日'], + [ + 'en' => 'National Foundation Day', + 'ja' => '建国記念の日' + ], new DateTime("$this->year-2-11", new DateTimeZone($this->timezone)), $this->locale )); @@ -136,7 +139,10 @@ private function calculateShowaDay(): void if ($this->year >= 2007) { $this->addHoliday(new Holiday( 'showaDay', - ['en_US' => 'Showa Day', 'ja_JP' => '昭和の日'], + [ + 'en' => 'Showa Day', + 'ja' => '昭和の日' + ], new DateTime("$this->year-4-29", new DateTimeZone($this->timezone)), $this->locale )); @@ -153,7 +159,10 @@ private function calculateConstitutionMemorialDay(): void if ($this->year >= 1948) { $this->addHoliday(new Holiday( 'constitutionMemorialDay', - ['en_US' => 'Constitution Memorial Day', 'ja_JP' => '憲法記念日'], + [ + 'en' => 'Constitution Memorial Day', + 'ja' => '憲法記念日' + ], new DateTime("$this->year-5-3", new DateTimeZone($this->timezone)), $this->locale )); @@ -170,7 +179,10 @@ private function calculateChildrensDay(): void if ($this->year >= 1948) { $this->addHoliday(new Holiday( 'childrensDay', - ['en_US' => 'Children\'s Day', 'ja_JP' => 'こどもの日'], + [ + 'en' => 'Children\'s Day', + 'ja' => 'こどもの日' + ], new DateTime("$this->year-5-5", new DateTimeZone($this->timezone)), $this->locale )); @@ -187,7 +199,7 @@ private function calculateCultureDay(): void if ($this->year >= 1948) { $this->addHoliday(new Holiday( 'cultureDay', - ['en_US' => 'Culture Day', 'ja_JP' => '文化の日'], + ['en' => 'Culture Day', 'ja' => '文化の日'], new DateTime("$this->year-11-3", new DateTimeZone($this->timezone)), $this->locale )); @@ -204,7 +216,7 @@ private function calculateLaborThanksgivingDay(): void if ($this->year >= 1948) { $this->addHoliday(new Holiday( 'laborThanksgivingDay', - ['en_US' => 'Labor Thanksgiving Day', 'ja_JP' => '勤労感謝の日'], + ['en' => 'Labor Thanksgiving Day', 'ja' => '勤労感謝の日'], new DateTime("$this->year-11-23", new DateTimeZone($this->timezone)), $this->locale )); @@ -233,7 +245,7 @@ private function calculateEmperorsBirthday(): void if (\is_string($emperorsBirthday)) { $this->addHoliday(new Holiday( 'emperorsBirthday', - ['en_US' => 'Emperors Birthday', 'ja_JP' => '天皇誕生日'], + ['en' => 'Emperors Birthday', 'ja' => '天皇誕生日'], new DateTime($emperorsBirthday, new DateTimeZone($this->timezone)), $this->locale )); @@ -270,7 +282,7 @@ private function calculateVernalEquinoxDay(): void if (\is_numeric($day)) { $this->addHoliday(new Holiday( 'vernalEquinoxDay', - ['en_US' => 'Vernal Equinox Day', 'ja_JP' => '春分の日'], + ['en' => 'Vernal Equinox Day', 'ja' => '春分の日'], new DateTime("$this->year-3-$day", new DateTimeZone($this->timezone)), $this->locale )); @@ -301,7 +313,7 @@ private function calculateComingOfAgeDay(): void if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'comingOfAgeDay', - ['en_US' => 'Coming of Age Day', 'ja_JP' => '成人の日'], + ['en' => 'Coming of Age Day', 'ja' => '成人の日'], $date, $this->locale )); @@ -331,7 +343,7 @@ private function calculateGreeneryDay(): void if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'greeneryDay', - ['en_US' => 'Greenery Day', 'ja_JP' => 'みどりの日'], + ['en' => 'Greenery Day', 'ja' => 'みどりの日'], $date, $this->locale )); @@ -365,7 +377,7 @@ private function calculateMarineDay(): void if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'marineDay', - ['en_US' => 'Marine Day', 'ja_JP' => '海の日'], + ['en' => 'Marine Day', 'ja' => '海の日'], $date, $this->locale )); @@ -394,7 +406,7 @@ private function calculateMountainDay(): void if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'mountainDay', - ['en_US' => 'Mountain Day', 'ja_JP' => '山の日'], + ['en' => 'Mountain Day', 'ja' => '山の日'], $date, $this->locale )); @@ -425,7 +437,7 @@ private function calculateRespectForTheAgeDay(): void if ($date instanceof DateTimeInterface) { $this->addHoliday(new Holiday( 'respectfortheAgedDay', - ['en_US' => 'Respect for the Aged Day', 'ja_JP' => '敬老の日'], + ['en' => 'Respect for the Aged Day', 'ja' => '敬老の日'], $date, $this->locale )); @@ -456,9 +468,9 @@ private function calculateSportsDay(): void $date = new DateTime("$this->year-10-10", new DateTimeZone($this->timezone)); } - $holiday_name = ['en_US' => 'Health And Sports Day', 'ja_JP' => '体育の日']; + $holiday_name = ['en' => 'Health And Sports Day', 'ja' => '体育の日']; if ($this->year >= 2020) { - $holiday_name = ['en_US' => 'Sports Day', 'ja_JP' => 'スポーツの日']; + $holiday_name = ['en' => 'Sports Day', 'ja' => 'スポーツの日']; } if ($date instanceof DateTimeInterface) { @@ -501,7 +513,7 @@ private function calculateAutumnalEquinoxDay(): void if (\is_numeric($day)) { $this->addHoliday(new Holiday( 'autumnalEquinoxDay', - ['en_US' => 'Autumnal Equinox Day', 'ja_JP' => '秋分の日'], + ['en' => 'Autumnal Equinox Day', 'ja' => '秋分の日'], new DateTime("$this->year-9-$day", new DateTimeZone($this->timezone)), $this->locale )); @@ -569,7 +581,7 @@ private function calculateCoronationDay(): void if (2019 === $this->year) { $this->addHoliday(new Holiday( 'coronationDay', - ['en_US' => 'Coronation Day', 'ja_JP' => '即位の日'], + ['en' => 'Coronation Day', 'ja' => '即位の日'], new DateTime("$this->year-5-1", new DateTimeZone($this->timezone)), $this->locale )); @@ -587,7 +599,7 @@ private function calculateEnthronementProclamationCeremony(): void if (2019 === $this->year) { $this->addHoliday(new Holiday( 'enthronementProclamationCeremony', - ['en_US' => 'Enthronement Proclamation Ceremony', 'ja_JP' => '即位礼正殿の儀'], + ['en' => 'Enthronement Proclamation Ceremony', 'ja' => '即位礼正殿の儀'], new DateTime("$this->year-10-22", new DateTimeZone($this->timezone)), $this->locale )); @@ -626,8 +638,8 @@ private function calculateBridgeHolidays(): void $bridgeDate->add(new DateInterval('P1D')); $this->addHoliday(new Holiday('bridgeDay' . $counter, [ - 'en_US' => 'Bridge Public holiday', - 'ja_JP' => '国民の休日' + 'en' => 'Bridge Public holiday', + 'ja' => '国民の休日' ], $bridgeDate, $this->locale)); $counter++; } diff --git a/src/Yasumi/Provider/Latvia.php b/src/Yasumi/Provider/Latvia.php index b722f04a1..08a6fd059 100644 --- a/src/Yasumi/Provider/Latvia.php +++ b/src/Yasumi/Provider/Latvia.php @@ -77,8 +77,8 @@ private function addRestorationOfIndependenceDay(): void } $this->addHoliday(new Holiday('restorationOfIndependenceOfLatviaDay', [ - 'en_US' => 'Restoration of Independence day', - 'lv_LV' => 'Latvijas Republikas Neatkarības atjaunošanas diena' + 'en' => 'Restoration of Independence day', + 'lv' => 'Latvijas Republikas Neatkarības atjaunošanas diena' ], $date)); } } @@ -90,8 +90,8 @@ private function addRestorationOfIndependenceDay(): void private function addMidsummerEveDay(): void { $this->addHoliday(new Holiday('midsummerEveDay', [ - 'en_US' => 'Midsummer Eve', - 'lv_LV' => 'Līgo Diena' + 'en' => 'Midsummer Eve', + 'lv' => 'Līgo Diena' ], new \DateTime("{$this->year}-06-23", new \DateTimeZone($this->timezone)))); } @@ -112,8 +112,8 @@ private function addProclamationDay(): void } $this->addHoliday(new Holiday('proclamationOfTheRepublicOfLatviaDay', [ - 'en_US' => 'Proclamation Day of the Republic of Latvia', - 'lv_LV' => 'Latvijas Republikas proklamēšanas diena' + 'en' => 'Proclamation Day of the Republic of Latvia', + 'lv' => 'Latvijas Republikas proklamēšanas diena' ], $date)); } } diff --git a/src/Yasumi/Provider/Lithuania.php b/src/Yasumi/Provider/Lithuania.php index 17169402b..79a4b10ff 100644 --- a/src/Yasumi/Provider/Lithuania.php +++ b/src/Yasumi/Provider/Lithuania.php @@ -81,8 +81,8 @@ private function addRestorationOfTheStateDay(): void { if ($this->year >= self::RESTORATION_OF_THE_STATE_YEAR) { $this->addHoliday(new Holiday('restorationOfTheStateOfLithuaniaDay', [ - 'en_US' => 'Day of Restoration of the State of Lithuania', - 'lt_LT' => 'Lietuvos valstybės atkūrimo diena' + 'en' => 'Day of Restoration of the State of Lithuania', + 'lt' => 'Lietuvos valstybės atkūrimo diena' ], new \DateTime("{$this->year}-02-16", new \DateTimeZone($this->timezone)))); } } @@ -97,8 +97,8 @@ private function addRestorationOfIndependenceDay(): void { if ($this->year >= self::RESTORATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday('restorationOfIndependenceOfLithuaniaDay', [ - 'en_US' => 'Day of Restoration of Independence of Lithuania', - 'lt_LT' => 'Lietuvos nepriklausomybės atkūrimo diena' + 'en' => 'Day of Restoration of Independence of Lithuania', + 'lt' => 'Lietuvos nepriklausomybės atkūrimo diena' ], new \DateTime("{$this->year}-03-11", new \DateTimeZone($this->timezone)))); } } @@ -114,8 +114,8 @@ private function addStatehoodDay(): void { if ($this->year >= self::STATEHOOD_YEAR) { $this->addHoliday(new Holiday('statehoodDay', [ - 'en_US' => 'Statehood Day (Lithuania)', - 'lt_LT' => 'Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena' + 'en' => 'Statehood Day (Lithuania)', + 'lt' => 'Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena' ], new \DateTime("{$this->year}-07-06", new \DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Netherlands.php b/src/Yasumi/Provider/Netherlands.php index bc244a67d..e589e62d3 100755 --- a/src/Yasumi/Provider/Netherlands.php +++ b/src/Yasumi/Provider/Netherlands.php @@ -102,7 +102,7 @@ private function calculateCarnival(): void $carnivalDay1 = clone $easter; $this->addHoliday(new Holiday( 'carnivalDay', - ['en_US' => 'Carnival', 'nl_NL' => 'Carnaval'], + ['en' => 'Carnival', 'nl' => 'Carnaval'], $carnivalDay1->sub(new DateInterval('P49D')), $this->locale, Holiday::TYPE_OBSERVANCE @@ -114,7 +114,7 @@ private function calculateCarnival(): void $carnivalDay2 = clone $easter; $this->addHoliday(new Holiday( 'secondCarnivalDay', - ['en_US' => 'Carnival', 'nl_NL' => 'Carnaval'], + ['en' => 'Carnival', 'nl' => 'Carnaval'], $carnivalDay2->sub(new DateInterval('P48D')), $this->locale, Holiday::TYPE_OBSERVANCE @@ -126,7 +126,7 @@ private function calculateCarnival(): void $carnivalDay3 = clone $easter; $this->addHoliday(new Holiday( 'thirdCarnivalDay', - ['en_US' => 'Carnival', 'nl_NL' => 'Carnaval'], + ['en' => 'Carnival', 'nl' => 'Carnaval'], $carnivalDay3->sub(new DateInterval('P47D')), $this->locale, Holiday::TYPE_OBSERVANCE @@ -186,7 +186,7 @@ private function calculateStNicholasDay(): void */ $this->addHoliday(new Holiday( 'stNicholasDay', - ['en_US' => 'St. Nicholas\' Day', 'nl_NL' => 'Sinterklaas'], + ['en' => 'St. Nicholas\' Day', 'nl' => 'Sinterklaas'], new DateTime("$this->year-12-5", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE @@ -209,7 +209,7 @@ private function calculateHalloween(): void { $this->addHoliday(new Holiday( 'halloween', - ['en_US' => 'Halloween', 'nl_NL' => 'Halloween'], + ['en' => 'Halloween', 'nl' => 'Halloween'], new DateTime("$this->year-10-31", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE @@ -228,7 +228,7 @@ private function calculatePrincesDay(): void { $this->addHoliday(new Holiday( 'princesDay', - ['en_US' => 'Prince\'s Day', 'nl_NL' => 'Prinsjesdag'], + ['en' => 'Prince\'s Day', 'nl' => 'Prinsjesdag'], new DateTime("third tuesday of september $this->year", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OTHER @@ -259,7 +259,7 @@ private function calculateQueensday(): void $this->addHoliday(new Holiday( 'queensDay', - ['en_US' => 'Queen\'s Day', 'nl_NL' => 'Koninginnedag'], + ['en' => 'Queen\'s Day', 'nl' => 'Koninginnedag'], $date, $this->locale )); @@ -285,7 +285,7 @@ private function calculateKingsday(): void $this->addHoliday(new Holiday( 'kingsDay', - ['en_US' => 'Kings Day', 'nl_NL' => 'Koningsdag'], + ['en' => 'Kings Day', 'nl' => 'Koningsdag'], $date, $this->locale )); @@ -304,14 +304,14 @@ private function calculateCommemorationLiberationDay(): void if ($this->year >= 1947) { $this->addHoliday(new Holiday( 'commemorationDay', - ['en_US' => 'Commemoration Day', 'nl_NL' => 'Dodenherdenking'], + ['en' => 'Commemoration Day', 'nl' => 'Dodenherdenking'], new DateTime("$this->year-5-4", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OBSERVANCE )); $this->addHoliday(new Holiday( 'liberationDay', - ['en_US' => 'Liberation Day', 'nl_NL' => 'Bevrijdingsdag'], + ['en' => 'Liberation Day', 'nl' => 'Bevrijdingsdag'], new DateTime("$this->year-5-5", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index 5f409a011..3c3e7b7df 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -184,7 +184,7 @@ private function calculateQueensBirthday(): void $this->addHoliday(new Holiday( 'queensBirthday', - ['en_NZ' => 'Queens Birthday'], + ['en' => 'Queens Birthday'], new DateTime("first monday of june $this->year", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Norway.php b/src/Yasumi/Provider/Norway.php index e4e39b290..39e02ba38 100644 --- a/src/Yasumi/Provider/Norway.php +++ b/src/Yasumi/Provider/Norway.php @@ -85,7 +85,7 @@ private function calculateConstitutionDay(): void if ($this->year >= 1836) { $this->addHoliday(new Holiday( 'constitutionDay', - ['nb_NO' => 'Grunnlovsdagen'], + ['nb' => 'Grunnlovsdagen'], new DateTime("$this->year-5-17", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Poland.php b/src/Yasumi/Provider/Poland.php index 3a67c9b83..4f9223877 100755 --- a/src/Yasumi/Provider/Poland.php +++ b/src/Yasumi/Provider/Poland.php @@ -86,8 +86,8 @@ private function calculateIndependenceDay(): void } $this->addHoliday(new Holiday('independenceDay', [ - 'en_US' => 'Independence Day', - 'pl_PL' => 'Narodowe Święto Niepodległości' + 'en' => 'Independence Day', + 'pl' => 'Narodowe Święto Niepodległości' ], new DateTime("$this->year-11-11", new DateTimeZone($this->timezone)), $this->locale)); } @@ -114,8 +114,8 @@ private function calculateConstitutionDay(): void } $this->addHoliday(new Holiday('constitutionDay', [ - 'en_US' => 'Constitution Day', - 'pl_PL' => 'Święto Narodowe Trzeciego Maja' + 'en' => 'Constitution Day', + 'pl' => 'Święto Narodowe Trzeciego Maja' ], new DateTime("$this->year-5-3", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Portugal.php b/src/Yasumi/Provider/Portugal.php index 2d8fb1232..f0dc6873b 100644 --- a/src/Yasumi/Provider/Portugal.php +++ b/src/Yasumi/Provider/Portugal.php @@ -88,7 +88,7 @@ private function calculateCarnationRevolutionDay(): void if ($this->year >= 1974) { $this->addHoliday(new Holiday( '25thApril', - ['pt_PT' => 'Dia da Liberdade'], + ['pt' => 'Dia da Liberdade'], new DateTime("$this->year-04-25", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL @@ -135,7 +135,7 @@ private function calculatePortugalDay(): void if ($this->year <= 1932 || $this->year >= 1974) { $this->addHoliday(new Holiday( 'portugalDay', - ['pt_PT' => 'Dia de Portugal'], + ['pt' => 'Dia de Portugal'], new DateTime("$this->year-06-10", new DateTimeZone($this->timezone)), $this->locale )); @@ -169,7 +169,7 @@ private function calculatePortugueseRepublicDay(): void if (($this->year >= 1910 && $this->year <= 2012) || $this->year >= 2016) { $this->addHoliday(new Holiday( 'portugueseRepublic', - ['pt_PT' => 'Implantação da República Portuguesa'], + ['pt' => 'Implantação da República Portuguesa'], new DateTime("$this->year-10-05", new DateTimeZone($this->timezone)), $this->locale )); @@ -225,7 +225,7 @@ private function calculateRestorationOfIndependenceDay(): void if (($this->year >= 1850 && $this->year <= 2012) || $this->year >= 2016) { $this->addHoliday(new Holiday( 'restorationOfIndependence', - ['pt_PT' => 'Restauração da Independência'], + ['pt' => 'Restauração da Independência'], new DateTime("$this->year-12-01", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_OFFICIAL diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index 29eff5c2f..957b2f746 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -88,10 +88,12 @@ public function initialize(): void */ private function calculateDayAfterNewYearsDay(): void { - $this->addHoliday(new Holiday('dayAfterNewYearsDay', [ - 'en_US' => 'Day after New Year\'s Day', - 'ro_RO' => 'A doua zi după Anul Nou' - ], new DateTime("$this->year-01-02", new DateTimeZone($this->timezone)), $this->locale)); + $this->addHoliday(new Holiday( + 'dayAfterNewYearsDay', + [], + new DateTime("$this->year-01-02", new DateTimeZone($this->timezone)), + $this->locale + )); } /** @@ -114,8 +116,8 @@ private function calculateUnitedPrincipalitiesDay(): void // The law is official since 21.12.2014. if ($this->year > 2014) { $this->addHoliday(new Holiday('unitedPrincipalitiesDay', [ - 'en_US' => 'Union Day / Small Union', - 'ro_RO' => 'Unirea Principatelor Române / Mica Unire' + 'en' => 'Union Day / Small Union', + 'ro' => 'Unirea Principatelor Române / Mica Unire' ], new DateTime("$this->year-01-24", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -179,8 +181,8 @@ private function calculateNationalDay(): void if (\is_string($national_day)) { $this->addHoliday(new Holiday('nationalDay', [ - 'en_US' => 'National Day', - 'ro_RO' => 'Ziua Națională' + 'en' => 'National Day', + 'ro' => 'Ziua Națională' ], new DateTime($national_day, new DateTimeZone($this->timezone)), $this->locale)); } } @@ -202,8 +204,8 @@ private function calculateConstantinBrancusiDay(): void $this->addHoliday(new Holiday( 'constantinBrancusiDay', [ - 'en_US' => 'Constantin Brâncuși day', - 'ro_RO' => 'Ziua Constantin Brâncuși' + 'en' => 'Constantin Brâncuși day', + 'ro' => 'Ziua Constantin Brâncuși' ], new DateTime("$this->year-02-19", new DateTimeZone($this->timezone)), $this->locale, @@ -231,8 +233,8 @@ private function calculateChildrensDay(): void $this->addHoliday(new Holiday( 'childrensDay', [ - 'en_US' => 'International Children\'s Day', - 'ro_RO' => 'Ziua Copilului' + 'en' => 'International Children\'s Day', + 'ro' => 'Ziua Copilului' ], new DateTime("$this->year-06-01", new DateTimeZone($this->timezone)), $this->locale, @@ -242,8 +244,8 @@ private function calculateChildrensDay(): void if ($this->year >= 2017) { $this->addHoliday(new Holiday('childrensDay', [ - 'en_US' => 'International Children\'s Day', - 'ro_RO' => 'Ziua Copilului' + 'en' => 'International Children\'s Day', + 'ro' => 'Ziua Copilului' ], new DateTime("$this->year-06-01", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Russia.php b/src/Yasumi/Provider/Russia.php index 0ae20e48b..236cc6745 100644 --- a/src/Yasumi/Provider/Russia.php +++ b/src/Yasumi/Provider/Russia.php @@ -67,8 +67,8 @@ private function addNewYearsHolidays(): void foreach ($holidayDays as $day) { $this->addHoliday(new Holiday('newYearHolidaysDay' . $day, [ - 'en_US' => 'New Year\'s holidays', - 'ru_RU' => 'Новогодние каникулы' + 'en' => 'New Year\'s holidays', + 'ru' => 'Новогодние каникулы' ], new \DateTime("{$this->year}-01-{$day}", new \DateTimeZone($this->timezone)), $this->locale)); } } @@ -80,8 +80,8 @@ private function addNewYearsHolidays(): void private function addOrthodoxChristmasDay(): void { $this->addHoliday(new Holiday('orthodoxChristmasDay', [ - 'en_US' => 'Orthodox Christmas Day', - 'ru_RU' => 'Рождество' + 'en' => 'Orthodox Christmas Day', + 'ru' => 'Рождество' ], new \DateTime("{$this->year}-01-07", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -96,8 +96,8 @@ private function addDefenceOfTheFatherlandDay(): void } $this->addHoliday(new Holiday('defenceOfTheFatherlandDay', [ - 'en_US' => 'Defence of the Fatherland Day', - 'ru_RU' => 'День защитника Отечества' + 'en' => 'Defence of the Fatherland Day', + 'ru' => 'День защитника Отечества' ], new \DateTime("{$this->year}-02-23", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -117,8 +117,8 @@ private function addInternationalWomensDay(): void private function addSpringAndLabourDay(): void { $this->addHoliday(new Holiday('springAndLabourDay', [ - 'en_US' => 'Spring and Labour Day', - 'ru_RU' => 'Праздник Весны и Труда' + 'en' => 'Spring and Labour Day', + 'ru' => 'Праздник Весны и Труда' ], new \DateTime("{$this->year}-05-01", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -129,8 +129,8 @@ private function addSpringAndLabourDay(): void private function addVictoryDay(): void { $this->addHoliday(new Holiday('victoryDay', [ - 'en_US' => 'Victory Day', - 'ru_RU' => 'День Победы' + 'en' => 'Victory Day', + 'ru' => 'День Победы' ], new \DateTime("{$this->year}-05-09", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -145,8 +145,8 @@ private function addRussiaDay(): void } $this->addHoliday(new Holiday('russiaDay', [ - 'en_US' => 'Russia Day', - 'ru_RU' => 'День России' + 'en' => 'Russia Day', + 'ru' => 'День России' ], new \DateTime("{$this->year}-06-12", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -161,8 +161,8 @@ private function addUnityDay(): void } $this->addHoliday(new Holiday('unityDay', [ - 'en_US' => 'Unity Day', - 'ru_RU' => 'День народного единства' + 'en' => 'Unity Day', + 'ru' => 'День народного единства' ], new \DateTime("{$this->year}-11-04", new \DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index 3f15f2aa1..c0b482d11 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -122,8 +122,8 @@ private function calculateSlovakIndependenceDay(): void $this->addHoliday(new Holiday( 'slovakIndependenceDay', [ - 'sk_SK' => 'Deň vzniku Slovenskej republiky', - 'en_US' => 'Day of the Establishment of the Slovak Republic' + 'sk' => 'Deň vzniku Slovenskej republiky', + 'en' => 'Day of the Establishment of the Slovak Republic' ], new DateTime($this->year . '-01-01', new DateTimeZone($this->timezone)), $this->locale @@ -147,9 +147,9 @@ private function calculateSaintsCyrilAndMethodiusDay(): void $this->addHoliday(new Holiday( 'saintsCyrilAndMethodiusDay', [ - 'sk_SK' => 'Sviatok svätého Cyrila a Metoda', - 'cs_CZ' => 'Den slovanských věrozvěstů Cyrila a Metoděje', - 'en_US' => 'Saints Cyril and Methodius Day' + 'sk' => 'Sviatok svätého Cyrila a Metoda', + 'cs' => 'Den slovanských věrozvěstů Cyrila a Metoděje', + 'en' => 'Saints Cyril and Methodius Day' ], new DateTime($this->year . '-07-05', new DateTimeZone($this->timezone)), $this->locale, @@ -172,8 +172,8 @@ private function calculateSlovakNationalUprisingDay(): void $this->addHoliday(new Holiday( 'slovakNationalUprisingDay', [ - 'sk_SK' => 'Výročie Slovenského národného povstania', - 'en_US' => 'Slovak National Uprising Day' + 'sk' => 'Výročie Slovenského národného povstania', + 'en' => 'Slovak National Uprising Day' ], new DateTime($this->year . '-08-29', new DateTimeZone($this->timezone)), $this->locale, @@ -196,8 +196,8 @@ private function calculateSlovakConstitutionDay(): void $this->addHoliday(new Holiday( 'slovakConstitutionDay', [ - 'sk_SK' => 'Deň Ústavy Slovenskej republiky', - 'en_US' => 'Day of the Constitution of the Slovak Republic' + 'sk' => 'Deň Ústavy Slovenskej republiky', + 'en' => 'Day of the Constitution of the Slovak Republic' ], new DateTime($this->year . '-09-01', new DateTimeZone($this->timezone)), $this->locale, @@ -222,8 +222,8 @@ private function calculateSlovakConstitutionDay(): void private function calculateOurLadyOfSorrowsDay(): void { $this->addHoliday(new Holiday('ourLadyOfSorrowsDay', [ - 'sk_SK' => 'Sviatok Sedembolestnej Panny Márie', - 'en_US' => 'Our Lady of Sorrows Day' + 'sk' => 'Sviatok Sedembolestnej Panny Márie', + 'en' => 'Our Lady of Sorrows Day' ], new DateTime($this->year . '-09-15', new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK)); } @@ -242,9 +242,9 @@ private function calculateStruggleForFreedomAndDemocracyDay(): void $this->addHoliday(new Holiday( 'struggleForFreedomAndDemocracyDay', [ - 'sk_SK' => 'Deň boja za slobodu a demokraciu', - 'cs_CZ' => 'Den boje za svobodu a demokracii', - 'en_US' => 'Struggle for Freedom and Democracy Day' + 'sk' => 'Deň boja za slobodu a demokraciu', + 'cs' => 'Den boje za svobodu a demokracii', + 'en' => 'Struggle for Freedom and Democracy Day' ], new DateTime($this->year . '-11-17', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index c749942fd..d02bc0e8d 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -99,7 +99,7 @@ private function calculateHumanRightsDay(): void { $this->addHoliday(new Holiday( 'humanRightsDay', - ['en_ZA' => 'Human Rights Day'], + ['en' => 'Human Rights Day'], new DateTime($this->year . '-3-21', new DateTimeZone($this->timezone)), $this->locale )); @@ -121,7 +121,7 @@ private function calculateFamilyDay(): void { $this->addHoliday(new Holiday( 'familyDay', - ['en_ZA' => 'Family Day'], + ['en' => 'Family Day'], $this->calculateEaster($this->year, $this->timezone)->add(new DateInterval('P1D')), $this->locale )); @@ -144,7 +144,7 @@ private function calculateFreedomDay(): void { $this->addHoliday(new Holiday( 'freedomDay', - ['en_ZA' => 'Freedom Day'], + ['en' => 'Freedom Day'], new DateTime($this->year . '-4-27', new DateTimeZone($this->timezone)), $this->locale )); @@ -171,7 +171,7 @@ private function calculateYouthDay(): void { $this->addHoliday(new Holiday( 'youthDay', - ['en_ZA' => 'Youth Day'], + ['en' => 'Youth Day'], new DateTime($this->year . '-6-16', new DateTimeZone($this->timezone)), $this->locale )); @@ -198,7 +198,7 @@ private function calculate2016MunicipalElectionsDay(): void $this->addHoliday(new Holiday( '2016MunicipalElectionsDay', - ['en_ZA' => '2016 Municipal Elections Day'], + ['en' => '2016 Municipal Elections Day'], new DateTime('2016-8-3', new DateTimeZone($this->timezone)), $this->locale )); @@ -223,7 +223,7 @@ private function calculateNationalWomensDay(): void { $this->addHoliday(new Holiday( 'nationalWomensDay', - ['en_ZA' => 'National Women\'s Day'], + ['en' => 'National Women\'s Day'], new DateTime($this->year . '-8-9', new DateTimeZone($this->timezone)), $this->locale )); @@ -248,7 +248,7 @@ private function calculateHeritageDay(): void { $this->addHoliday(new Holiday( 'heritageDay', - ['en_ZA' => 'Heritage Day'], + ['en' => 'Heritage Day'], new DateTime($this->year . '-9-24', new DateTimeZone($this->timezone)), $this->locale )); @@ -275,7 +275,7 @@ private function calculateDayOfReconciliation(): void { $this->addHoliday(new Holiday( 'reconciliationDay', - ['en_ZA' => 'Day of Reconciliation'], + ['en' => 'Day of Reconciliation'], new DateTime($this->year . '-12-16', new DateTimeZone($this->timezone)), $this->locale )); @@ -305,7 +305,7 @@ private function calculateSubstituteDayOfGoodwill(): void $this->addHoliday(new Holiday( 'substituteDayOfGoodwill', - ['en_ZA' => 'Day of Goodwill observed'], + ['en' => 'Day of Goodwill observed'], new DateTime('2016-12-27', new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 7216adfe3..8430bbac1 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -172,7 +172,7 @@ public function calculateNewYearsDay(): void if ($this->year <= 1990) { $this->addHoliday(new Holiday( 'twoDaysLaterNewYearsDay', - ['en_US' => 'Two Days Later New Year\'s Day', 'ko_KR' => '새해 연휴'], + ['en' => 'Two Days Later New Year\'s Day', 'ko' => '새해 연휴'], new DateTime("$this->year-1-3", new DateTimeZone($this->timezone)), $this->locale )); @@ -194,7 +194,7 @@ public function calculateSeollal(): void $seollal = new DateTime(self::LUNAR_HOLIDAY['seollal'][$this->year], new DateTimeZone($this->timezone)); $this->addHoliday(new Holiday( 'seollal', - ['en_US' => 'Seollal', 'ko_KR' => '설날'], + ['en' => 'Seollal', 'ko' => '설날'], $seollal, $this->locale )); @@ -203,7 +203,7 @@ public function calculateSeollal(): void $dayBeforeSeollal->sub(new DateInterval('P1D')); $this->addHoliday(new Holiday( 'dayBeforeSeollal', - ['en_US' => 'Day before Seollal', 'ko_KR' => '설날 연휴'], + ['en' => 'Day before Seollal', 'ko' => '설날 연휴'], $dayBeforeSeollal, $this->locale )); @@ -211,7 +211,7 @@ public function calculateSeollal(): void $dayAfterSeollal->add(new DateInterval('P1D')); $this->addHoliday(new Holiday( 'dayAfterSeollal', - ['en_US' => 'Day after Seollal', 'ko_KR' => '설날 연휴'], + ['en' => 'Day after Seollal', 'ko' => '설날 연휴'], $dayAfterSeollal, $this->locale )); @@ -231,7 +231,7 @@ public function calculateBuddhasBirthday(): void if ($this->year >= 1975 && isset(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year])) { $this->addHoliday(new Holiday( 'buddhasBirthday', - ['en_US' => 'Buddha\'s Birthday', 'ko_KR' => '부처님오신날'], + ['en' => 'Buddha\'s Birthday', 'ko' => '부처님오신날'], new DateTime(self::LUNAR_HOLIDAY['buddhasBirthday'][$this->year], new DateTimeZone($this->timezone)), $this->locale )); @@ -254,7 +254,7 @@ public function calculateChuseok(): void // Chuseok $chuseok = new Holiday( 'chuseok', - ['en_US' => 'Chuseok', 'ko_KR' => '추석'], + ['en' => 'Chuseok', 'ko' => '추석'], new DateTime(self::LUNAR_HOLIDAY['chuseok'][$this->year], new DateTimeZone($this->timezone)), $this->locale ); @@ -264,7 +264,7 @@ public function calculateChuseok(): void if ($this->year >= 1986) { $this->addHoliday(new Holiday( 'dayAfterChuseok', - ['en_US' => 'Day after Chuseok', 'ko_KR' => '추석 연휴'], + ['en' => 'Day after Chuseok', 'ko' => '추석 연휴'], (clone $chuseok)->add(new DateInterval('P1D')), $this->locale )); @@ -274,7 +274,7 @@ public function calculateChuseok(): void if ($this->year >= 1989) { $this->addHoliday(new Holiday( 'dayBeforeChuseok', - ['en_US' => 'Day before Chuseok', 'ko_KR' => '추석 연휴'], + ['en' => 'Day before Chuseok', 'ko' => '추석 연휴'], (clone $chuseok)->sub(new DateInterval('P1D')), $this->locale )); @@ -294,7 +294,7 @@ public function calculateIndependenceMovementDay(): void if ($this->year >= 1949) { $this->addHoliday(new Holiday( 'independenceMovementDay', - ['en_US' => 'Independence Movement Day', 'ko_KR' => '삼일절'], + ['en' => 'Independence Movement Day', 'ko' => '삼일절'], new DateTime("$this->year-3-1", new DateTimeZone($this->timezone)), $this->locale )); @@ -313,7 +313,7 @@ public function calculateArborDay(): void if (($this->year >= 1949 && $this->year < 1960) || ($this->year > 1960 && $this->year < 2006)) { $this->addHoliday(new Holiday( 'arborDay', - ['en_US' => 'Arbor Day', 'ko_KR' => '식목일'], + ['en' => 'Arbor Day', 'ko' => '식목일'], new DateTime("$this->year-4-5", new DateTimeZone($this->timezone)), $this->locale )); @@ -332,7 +332,7 @@ public function calculateChildrensDay(): void if ($this->year >= 1970) { $this->addHoliday(new Holiday( 'childrensDay', - ['en_US' => 'Children\'s Day', 'ko_KR' => '어린이날'], + ['en' => 'Children\'s Day', 'ko' => '어린이날'], new DateTime("$this->year-5-5", new DateTimeZone($this->timezone)), $this->locale )); @@ -351,7 +351,7 @@ public function calculateMemorialDay(): void if ($this->year >= 1966) { $this->addHoliday(new Holiday( 'memorialDay', - ['en_US' => 'Memorial Day', 'ko_KR' => '현충일'], + ['en' => 'Memorial Day', 'ko' => '현충일'], new DateTime("$this->year-6-6", new DateTimeZone($this->timezone)), $this->locale )); @@ -373,7 +373,7 @@ public function calculateConstitutionDay(): void if ($this->year >= 1949 && $this->year < 2008) { $this->addHoliday(new Holiday( 'constitutionDay', - ['en_US' => 'Constitution Day', 'ko_KR' => '제헌절'], + ['en' => 'Constitution Day', 'ko' => '제헌절'], new DateTime("$this->year-7-17", new DateTimeZone($this->timezone)), $this->locale )); @@ -392,7 +392,7 @@ public function calculateLiberationDay(): void if ($this->year >= 1949) { $this->addHoliday(new Holiday( 'liberationDay', - ['en_US' => 'Liberation Day', 'ko_KR' => '광복절'], + ['en' => 'Liberation Day', 'ko' => '광복절'], new DateTime("$this->year-8-15", new DateTimeZone($this->timezone)), $this->locale )); @@ -411,7 +411,7 @@ public function calculateArmedForcesDay(): void if ($this->year >= 1956 && $this->year <= 1990) { $this->addHoliday(new Holiday( 'armedForcesDay', - ['en_US' => 'Armed Forces Day', 'ko_KR' => '국군의 날'], + ['en' => 'Armed Forces Day', 'ko' => '국군의 날'], new DateTime("$this->year-10-1", new DateTimeZone($this->timezone)), $this->locale )); @@ -430,7 +430,7 @@ public function calculateNationalFoundationDay(): void if ($this->year >= 1949) { $this->addHoliday(new Holiday( 'nationalFoundationDay', - ['en_US' => 'National Foundation Day', 'ko_KR' => '개천절'], + ['en' => 'National Foundation Day', 'ko' => '개천절'], new DateTime("$this->year-10-3", new DateTimeZone($this->timezone)), $this->locale )); @@ -449,7 +449,7 @@ public function calculateHangulDay(): void if (($this->year >= 1949 && $this->year <= 1990) || $this->year > 2012) { $this->addHoliday(new Holiday( 'hangulDay', - ['en_US' => 'Hangul Day', 'ko_KR' => '한글날'], + ['en' => 'Hangul Day', 'ko' => '한글날'], new DateTime("$this->year-10-9", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index 3a2092854..df629eef9 100755 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -83,7 +83,7 @@ private function calculateNationalDay(): void if ($this->year >= 1981) { $this->addHoliday(new Holiday( 'nationalDay', - ['es_ES' => 'Fiesta Nacional de España'], + ['es' => 'Fiesta Nacional de España'], new DateTime("$this->year-10-12", new DateTimeZone($this->timezone)), $this->locale )); @@ -109,7 +109,7 @@ private function calculateConstitutionDay(): void if ($this->year >= 1978) { $this->addHoliday(new Holiday( 'constitutionDay', - ['es_ES' => 'Día de la Constitución'], + ['es' => 'Día de la Constitución'], new DateTime("$this->year-12-6", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/Andalusia.php b/src/Yasumi/Provider/Spain/Andalusia.php index 4bbd723da..cafb20a67 100755 --- a/src/Yasumi/Provider/Spain/Andalusia.php +++ b/src/Yasumi/Provider/Spain/Andalusia.php @@ -78,7 +78,7 @@ private function calculateAndalusiaDay(): void if ($this->year >= 1980) { $this->addHoliday(new Holiday( 'andalusiaDay', - ['es_ES' => 'Día de Andalucía'], + ['es' => 'Día de Andalucía'], new DateTime("$this->year-2-28", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/Asturias.php b/src/Yasumi/Provider/Spain/Asturias.php index f6b3ce503..a3af1fe74 100755 --- a/src/Yasumi/Provider/Spain/Asturias.php +++ b/src/Yasumi/Provider/Spain/Asturias.php @@ -80,7 +80,7 @@ private function calculateAsturiasDay(): void if ($this->year >= 1984) { $this->addHoliday(new Holiday( 'asturiasDay', - ['es_ES' => 'Día de Asturias'], + ['es' => 'Día de Asturias'], new DateTime("$this->year-9-8", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/BalearicIslands.php b/src/Yasumi/Provider/Spain/BalearicIslands.php index 927882f9d..a3c25a3f9 100755 --- a/src/Yasumi/Provider/Spain/BalearicIslands.php +++ b/src/Yasumi/Provider/Spain/BalearicIslands.php @@ -80,7 +80,7 @@ private function calculateBalearicIslandsDay(): void if ($this->year >= 1983) { $this->addHoliday(new Holiday( 'balearicIslandsDay', - ['es_ES' => 'Día de les Illes Balears'], + ['es' => 'Día de les Illes Balears'], new DateTime("$this->year-3-1", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/BasqueCountry.php b/src/Yasumi/Provider/Spain/BasqueCountry.php index 40eb19a09..17acdd4dc 100755 --- a/src/Yasumi/Provider/Spain/BasqueCountry.php +++ b/src/Yasumi/Provider/Spain/BasqueCountry.php @@ -80,7 +80,7 @@ private function calculateBasqueCountryDay(): void if ($this->year >= 2011 && $this->year <= 2013) { $this->addHoliday(new Holiday( 'basqueCountryDay', - ['es_ES' => 'Euskadi Eguna'], + ['es' => 'Euskadi Eguna'], new DateTime("$this->year-10-25", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/CanaryIslands.php b/src/Yasumi/Provider/Spain/CanaryIslands.php index ae372fa60..51950b6b9 100755 --- a/src/Yasumi/Provider/Spain/CanaryIslands.php +++ b/src/Yasumi/Provider/Spain/CanaryIslands.php @@ -79,7 +79,7 @@ private function calculateCanaryIslandsDay(): void if ($this->year >= 1984) { $this->addHoliday(new Holiday( 'canaryIslandsDay', - ['es_ES' => 'Día de las Canarias'], + ['es' => 'Día de las Canarias'], new DateTime("$this->year-5-30", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/Cantabria.php b/src/Yasumi/Provider/Spain/Cantabria.php index 0e7b2d6ed..64beb44b2 100755 --- a/src/Yasumi/Provider/Spain/Cantabria.php +++ b/src/Yasumi/Provider/Spain/Cantabria.php @@ -83,7 +83,7 @@ private function calculateCantabriaDay(): void if ($this->year >= 1967) { $this->addHoliday(new Holiday( 'cantabriaDay', - ['es_ES' => 'Día de Cantabria'], + ['es' => 'Día de Cantabria'], new DateTime("second sunday of august $this->year", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/CastileAndLeon.php b/src/Yasumi/Provider/Spain/CastileAndLeon.php index 3e0fd573c..2a798fdf7 100755 --- a/src/Yasumi/Provider/Spain/CastileAndLeon.php +++ b/src/Yasumi/Provider/Spain/CastileAndLeon.php @@ -80,7 +80,7 @@ private function calculateCastileAndLeonDay(): void if ($this->year >= 1976) { $this->addHoliday(new Holiday( 'castileAndLeonDay', - ['es_ES' => 'Día de Castilla y León'], + ['es' => 'Día de Castilla y León'], new DateTime("$this->year-4-23", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/CastillaLaMancha.php b/src/Yasumi/Provider/Spain/CastillaLaMancha.php index 11b379504..e5a590d13 100755 --- a/src/Yasumi/Provider/Spain/CastillaLaMancha.php +++ b/src/Yasumi/Provider/Spain/CastillaLaMancha.php @@ -83,7 +83,7 @@ private function calculateCastillaLaManchaDay(): void if ($this->year >= 1984) { $this->addHoliday(new Holiday( 'castillaLaManchaDay', - ['es_ES' => 'Día de la Región Castilla-La Mancha'], + ['es' => 'Día de la Región Castilla-La Mancha'], new DateTime("$this->year-5-31", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/Catalonia.php b/src/Yasumi/Provider/Spain/Catalonia.php index fe68573c0..e62463917 100755 --- a/src/Yasumi/Provider/Spain/Catalonia.php +++ b/src/Yasumi/Provider/Spain/Catalonia.php @@ -83,7 +83,7 @@ private function calculateNationalDayOfCatalonia(): void if ($this->year >= 1886) { $this->addHoliday(new Holiday( 'nationalCataloniaDay', - ['es_ES' => 'Diada Nacional de Catalunya'], + ['es' => 'Diada Nacional de Catalunya'], new DateTime("$this->year-9-11", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/Ceuta.php b/src/Yasumi/Provider/Spain/Ceuta.php index 7cb2b43ab..de8807b7c 100755 --- a/src/Yasumi/Provider/Spain/Ceuta.php +++ b/src/Yasumi/Provider/Spain/Ceuta.php @@ -77,7 +77,7 @@ private function calculateDayOfCeuta(): void if ($this->year >= 1416) { $this->addHoliday(new Holiday( 'ceutaDay', - ['es_ES' => 'Día de Ceuta'], + ['es' => 'Día de Ceuta'], new DateTime("$this->year-9-2", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php index 618d6f99f..848857e76 100755 --- a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php +++ b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php @@ -83,7 +83,7 @@ private function calculateDosdeMayoUprisingDay(): void { $this->addHoliday(new Holiday( 'dosdeMayoUprisingDay', - ['es_ES' => 'Fiesta de la Comunidad de Madrid'], + ['es' => 'Fiesta de la Comunidad de Madrid'], new DateTime("$this->year-5-2", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/Extremadura.php b/src/Yasumi/Provider/Spain/Extremadura.php index c62e08fc6..0433440fe 100755 --- a/src/Yasumi/Provider/Spain/Extremadura.php +++ b/src/Yasumi/Provider/Spain/Extremadura.php @@ -80,7 +80,7 @@ private function calculateDayOfExtremadura(): void if ($this->year >= 1985) { $this->addHoliday(new Holiday( 'extremaduraDay', - ['es_ES' => 'Día de Extremadura'], + ['es' => 'Día de Extremadura'], new DateTime("$this->year-9-8", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Spain/Galicia.php b/src/Yasumi/Provider/Spain/Galicia.php index f7afe801a..470725923 100755 --- a/src/Yasumi/Provider/Spain/Galicia.php +++ b/src/Yasumi/Provider/Spain/Galicia.php @@ -80,8 +80,8 @@ private function calculateGalicianLiteratureDay(): void { if ($this->year >= 1991) { $this->addHoliday(new Holiday('galicianLiteratureDay', [ - 'es_ES' => 'Día de las Letras Gallegas', - 'gl_ES' => 'Día das Letras Galegas' + 'es' => 'Día de las Letras Gallegas', + 'gl' => 'Día das Letras Galegas' ], new DateTime("$this->year-5-17", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -108,7 +108,7 @@ private function calculateStJamesDay(): void { if ($this->year >= 2000) { $this->addHoliday(new Holiday('stJamesDay', [ - 'es_ES' => 'Santiago Apostol' + 'es' => 'Santiago Apostol' ], new DateTime("$this->year-7-25", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Spain/LaRioja.php b/src/Yasumi/Provider/Spain/LaRioja.php index 141ac32f9..b3bc121b2 100755 --- a/src/Yasumi/Provider/Spain/LaRioja.php +++ b/src/Yasumi/Provider/Spain/LaRioja.php @@ -76,7 +76,7 @@ private function calculateLaRiojaDay(): void { if ($this->year >= 1983) { $this->addHoliday(new Holiday('laRiojaDay', [ - 'es_ES' => 'Día de La Rioja' + 'es' => 'Día de La Rioja' ], new DateTime("$this->year-6-9", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Spain/RegionOfMurcia.php b/src/Yasumi/Provider/Spain/RegionOfMurcia.php index ce675cf20..da3abb174 100755 --- a/src/Yasumi/Provider/Spain/RegionOfMurcia.php +++ b/src/Yasumi/Provider/Spain/RegionOfMurcia.php @@ -77,7 +77,7 @@ private function calculateDayOfMurcia(): void { if ($this->year >= 1983) { $this->addHoliday(new Holiday('murciaDay', [ - 'es_ES' => 'Día de la Región de Murcia' + 'es' => 'Día de la Región de Murcia' ], new DateTime("$this->year-6-9", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Spain/ValencianCommunity.php b/src/Yasumi/Provider/Spain/ValencianCommunity.php index 0950ea20a..5ed7930a6 100755 --- a/src/Yasumi/Provider/Spain/ValencianCommunity.php +++ b/src/Yasumi/Provider/Spain/ValencianCommunity.php @@ -84,7 +84,7 @@ private function calculateValencianCommunityDay(): void { if ($this->year >= 1239) { $this->addHoliday(new Holiday('valencianCommunityDay', [ - 'es_ES' => 'Día de la Comunidad Valenciana' + 'es' => 'Día de la Comunidad Valenciana' ], new DateTime("$this->year-10-9", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index 7d03a0a89..56678f23c 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -233,7 +233,7 @@ private function calculateNationalDay(): void $this->addHoliday(new Holiday( 'nationalDay', - ['sv_SE' => $holiday_name], + ['sv' => $holiday_name], new DateTime("$this->year-6-6", new DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/Switzerland.php b/src/Yasumi/Provider/Switzerland.php index e164c615d..9232a179f 100644 --- a/src/Yasumi/Provider/Switzerland.php +++ b/src/Yasumi/Provider/Switzerland.php @@ -65,14 +65,11 @@ public function initialize(): void private function calculateNationalDay(): void { $translations = [ - 'en_US' => 'National Day', - 'fr_FR' => 'Jour de la fête nationale', - 'fr_CH' => 'Jour de la fête nationale', - 'de_DE' => 'Bundesfeiertag', - 'de_CH' => 'Bundesfeiertag', - 'it_IT' => 'Giorno festivo federale', - 'it_CH' => 'Giorno festivo federale', - 'rm_CH' => 'Fiasta naziunala' + 'en' => 'National Day', + 'fr' => 'Jour de la fête nationale', + 'de' => 'Bundesfeiertag', + 'it' => 'Giorno festivo federale', + 'rm' => 'Fiasta naziunala' ]; if ($this->year >= 1994) { $this->addHoliday(new Holiday( @@ -112,11 +109,9 @@ public function calculateBerchtoldsTag(): void $this->addHoliday(new Holiday( 'berchtoldsTag', [ - 'de_DE' => 'Berchtoldstag', - 'de_CH' => 'Berchtoldstag', - 'fr_FR' => 'Jour de la Saint-Berthold', - 'fr_CH' => 'Jour de la Saint-Berthold', - 'en_US' => 'Berchtoldstag' + 'de' => 'Berchtoldstag', + 'fr' => 'Jour de la Saint-Berthold', + 'en' => 'Berchtoldstag' ], new DateTime($this->year . '-01-02', new DateTimeZone($this->timezone)), $this->locale, @@ -148,12 +143,9 @@ public function calculateBettagsMontag(): void $date->add(new DateInterval('P1D')); $this->addHoliday(new Holiday('bettagsMontag', [ - 'fr_FR' => 'Jeûne fédéral', - 'fr_CH' => 'Jeûne fédéral', - 'de_DE' => 'Eidgenössischer Dank-, Buss- und Bettag', - 'de_CH' => 'Eidgenössischer Dank-, Buss- und Bettag', - 'it_IT' => 'Festa federale di ringraziamento, pentimento e preghiera', - 'it_CH' => 'Festa federale di ringraziamento, pentimento e preghiera' + 'fr' => 'Jeûne fédéral', + 'de' => 'Eidgenössischer Dank-, Buss- und Bettag', + 'it' => 'Festa federale di ringraziamento, pentimento e preghiera', ], $date, $this->locale, Holiday::TYPE_OTHER)); } } diff --git a/src/Yasumi/Provider/Switzerland/Geneva.php b/src/Yasumi/Provider/Switzerland/Geneva.php index 5a9de3df3..6c14781f3 100644 --- a/src/Yasumi/Provider/Switzerland/Geneva.php +++ b/src/Yasumi/Provider/Switzerland/Geneva.php @@ -81,13 +81,11 @@ private function calculateJeuneGenevois(): void if (($this->year >= 1840 && $this->year <= 1869) || $this->year >= 1966) { $this->addHoliday(new Holiday('jeuneGenevois', [ - 'fr_FR' => 'Jeûne genevois', - 'fr_CH' => 'Jeûne genevois' + 'fr' => 'Jeûne genevois', ], $date, $this->locale, Holiday::TYPE_OTHER)); } elseif ($this->year > 1869 && $this->year < 1966) { $this->addHoliday(new Holiday('jeuneGenevois', [ - 'fr_FR' => 'Jeûne genevois', - 'fr_CH' => 'Jeûne genevois' + 'fr' => 'Jeûne genevois', ], $date, $this->locale, Holiday::TYPE_OBSERVANCE)); } } @@ -113,8 +111,7 @@ private function calculateRestaurationGenevoise(): void $this->addHoliday(new Holiday( 'restaurationGenevoise', [ - 'fr_FR' => 'Restauration de la République', - 'fr_CH' => 'Restauration de la République' + 'fr' => 'Restauration de la République' ], new DateTime($this->year . '-12-31', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/Switzerland/Glarus.php b/src/Yasumi/Provider/Switzerland/Glarus.php index c492f9a15..15163b4b1 100644 --- a/src/Yasumi/Provider/Switzerland/Glarus.php +++ b/src/Yasumi/Provider/Switzerland/Glarus.php @@ -79,8 +79,7 @@ private function calculateNafelserFahrt(): void if ($this->year >= 1389) { $date = new DateTime('First Thursday of ' . $this->year . '-04', new DateTimeZone($this->timezone)); $this->addHoliday(new Holiday('nafelserFahrt', [ - 'de_DE' => 'Näfelser Fahrt', - 'de_CH' => 'Näfelser Fahrt' + 'de' => 'Näfelser Fahrt', ], $date, $this->locale, Holiday::TYPE_OTHER)); } } diff --git a/src/Yasumi/Provider/Switzerland/Jura.php b/src/Yasumi/Provider/Switzerland/Jura.php index 90259b5d5..0600f5e63 100644 --- a/src/Yasumi/Provider/Switzerland/Jura.php +++ b/src/Yasumi/Provider/Switzerland/Jura.php @@ -83,8 +83,7 @@ private function calculatePlebisciteJurassien(): void $this->addHoliday(new Holiday( 'plebisciteJurassien', [ - 'fr_FR' => 'Commémoration du plébiscite jurassien', - 'fr_CH' => 'Commémoration du plébiscite jurassien' + 'fr' => 'Commémoration du plébiscite jurassien', ], new DateTime($this->year . '-06-23', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/Switzerland/Neuchatel.php b/src/Yasumi/Provider/Switzerland/Neuchatel.php index 3420d7908..88fca00e2 100644 --- a/src/Yasumi/Provider/Switzerland/Neuchatel.php +++ b/src/Yasumi/Provider/Switzerland/Neuchatel.php @@ -81,8 +81,7 @@ private function calculateInstaurationRepublique(): void $this->addHoliday(new Holiday( 'instaurationRepublique', [ - 'fr_FR' => 'Instauration de la République', - 'fr_CH' => 'Instauration de la République' + 'fr' => 'Instauration de la République' ], new DateTime($this->year . '-03-01', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/Switzerland/Obwalden.php b/src/Yasumi/Provider/Switzerland/Obwalden.php index 19e6fc186..51b1cf306 100644 --- a/src/Yasumi/Provider/Switzerland/Obwalden.php +++ b/src/Yasumi/Provider/Switzerland/Obwalden.php @@ -85,8 +85,7 @@ private function calculateBruderKlausenFest(): void $this->addHoliday(new Holiday( 'bruderKlausenFest', [ - 'de_DE' => 'Bruder-Klausen-Fest', - 'de_CH' => 'Bruder-Klausen-Fest' + 'de' => 'Bruder-Klausen-Fest' ], new DateTime($this->year . '-09-25', new DateTimeZone($this->timezone)), $this->locale, @@ -96,8 +95,7 @@ private function calculateBruderKlausenFest(): void $this->addHoliday(new Holiday( 'bruderKlausenFest', [ - 'de_DE' => 'Bruder-Klausen-Fest', - 'de_CH' => 'Bruder-Klausen-Fest' + 'de' => 'Bruder-Klausen-Fest', ], new DateTime($this->year . '-09-21', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/Switzerland/Ticino.php b/src/Yasumi/Provider/Switzerland/Ticino.php index 81289414e..57c92c0d2 100644 --- a/src/Yasumi/Provider/Switzerland/Ticino.php +++ b/src/Yasumi/Provider/Switzerland/Ticino.php @@ -89,13 +89,10 @@ private function calculateStPeterPaul(): void $this->addHoliday(new Holiday( 'stPeterPaul', [ - 'it_IT' => 'Santi Pietro e Paolo', - 'it_CH' => 'Santi Pietro e Paolo', - 'en_US' => 'Feast of Saints Peter and Paul', - 'fr_FR' => 'Solennité des saints Pierre et Paul', - 'fr_CH' => 'Solennité des saints Pierre et Paul', - 'de_DE' => 'St. Peter und Paul', - 'de_CH' => 'St. Peter und Paul' + 'it' => 'Santi Pietro e Paolo', + 'en' => 'Feast of Saints Peter and Paul', + 'fr' => 'Solennité des saints Pierre et Paul', + 'de' => 'St. Peter und Paul', ], new DateTime($this->year . '-06-29', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index c7cbb07f1..134b688be 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -78,7 +78,7 @@ private function calculateMartinLutherKingday(): void { if ($this->year >= 1986) { $this->addHoliday(new Holiday('martinLutherKingDay', [ - 'en_US' => 'Dr. Martin Luther King Jr\'s Birthday' + 'en' => 'Dr. Martin Luther King Jr\'s Birthday' ], new DateTime("third monday of january $this->year", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -106,7 +106,7 @@ private function calculateWashingtonsBirthday(): void $date = new DateTime("third monday of february $this->year", new DateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('washingtonsBirthday', [ - 'en_US' => 'Washington\'s Birthday' + 'en' => 'Washington\'s Birthday' ], $date, $this->locale)); } } @@ -131,7 +131,7 @@ private function calculateMemorialDay(): void $date = new DateTime("last monday of may $this->year", new DateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('memorialDay', [ - 'en_US' => 'Memorial Day' + 'en' => 'Memorial Day' ], $date, $this->locale)); } } @@ -152,7 +152,7 @@ private function calculateIndependenceDay(): void { if ($this->year >= 1776) { $this->addHoliday(new Holiday('independenceDay', [ - 'en_US' => 'Independence Day' + 'en' => 'Independence Day' ], new DateTime("$this->year-7-4", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -173,7 +173,7 @@ private function calculateLabourDay(): void $this->addHoliday(new Holiday( 'labourDay', [ - 'en_US' => 'Labour Day' + 'en' => 'Labour Day' ], new DateTime("first monday of september $this->year", new DateTimeZone($this->timezone)), $this->locale @@ -202,7 +202,7 @@ private function calculateColumbusDay(): void $date = new DateTime("second monday of october $this->year", new DateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('columbusDay', [ - 'en_US' => 'Columbus Day' + 'en' => 'Columbus Day' ], $date, $this->locale)); } } @@ -224,7 +224,7 @@ private function calculateVeteransDay(): void $name = $this->year < 1954 ? 'Armistice Day' : 'Veterans Day'; $this->addHoliday(new Holiday('veteransDay', [ - 'en_US' => $name + 'en' => $name ], new DateTime("$this->year-11-11", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -247,7 +247,7 @@ private function calculateThanksgivingDay(): void $this->addHoliday(new Holiday( 'thanksgivingDay', [ - 'en_US' => 'Thanksgiving Day' + 'en' => 'Thanksgiving Day' ], new DateTime("fourth thursday of november $this->year", new DateTimeZone($this->timezone)), $this->locale diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index fd50dbe39..778a184f8 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -95,8 +95,8 @@ private function calculateChristmasDay(): void private function calculateSecondInternationalWorkersDay(): void { $this->addHoliday(new Holiday('secondInternationalWorkersDay', [ - 'uk_UA' => 'День міжнародної солідарності трудящих', - 'ru_UA' => 'День международной солидарности трудящихся' + 'uk' => 'День міжнародної солідарності трудящих', + 'ru' => 'День международной солидарности трудящихся' ], new \DateTime("$this->year-05-02", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -120,7 +120,7 @@ private function calculateVictoryDay(): void { $this->addHoliday(new Holiday( 'victoryDay', - ['uk_UA' => 'День перемоги', 'ru_UA' => 'День победы'], + ['uk' => 'День перемоги', 'ru' => 'День победы'], new \DateTime("$this->year-05-09", new \DateTimeZone($this->timezone)), $this->locale )); @@ -146,7 +146,7 @@ private function calculateConstitutionDay(): void $this->addHoliday(new Holiday( 'constitutionDay', - ['uk_UA' => 'День Конституції', 'ru_UA' => 'День Конституции'], + ['uk' => 'День Конституції', 'ru' => 'День Конституции'], new \DateTime("$this->year-06-28", new \DateTimeZone($this->timezone)), $this->locale )); @@ -174,7 +174,7 @@ private function calculateIndependenceDay(): void $this->addHoliday(new Holiday( 'independenceDay', - ['uk_UA' => 'День Незалежності', 'ru_UA' => 'День Независимости'], + ['uk' => 'День Незалежності', 'ru' => 'День Независимости'], new \DateTime("$this->year-08-24", new \DateTimeZone($this->timezone)), $this->locale )); @@ -203,7 +203,7 @@ private function calculateDefenderOfUkraineDay(): void $this->addHoliday(new Holiday( 'defenderOfUkraineDay', - ['uk_UA' => 'День захисника України', 'ru_UA' => 'День Защитника Украины'], + ['uk' => 'День захисника України', 'ru' => 'День Защитника Украины'], new \DateTime("$this->year-10-14", new \DateTimeZone($this->timezone)), $this->locale )); diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 9bb37c925..dfa15391b 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -125,7 +125,7 @@ protected function calculateMayDayBankHoliday(): void if (1995 === $this->year || 2020 === $this->year) { $this->addHoliday(new Holiday( 'mayDayBankHoliday', - ['en_GB' => 'May Day Bank Holiday'], + ['en' => 'May Day Bank Holiday'], new DateTime("$this->year-5-8", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK @@ -136,7 +136,7 @@ protected function calculateMayDayBankHoliday(): void $this->addHoliday(new Holiday( 'mayDayBankHoliday', - ['en_GB' => 'May Day Bank Holiday'], + ['en' => 'May Day Bank Holiday'], new DateTime("first monday of may $this->year", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK @@ -171,7 +171,7 @@ protected function calculateSpringBankHoliday(): void if (2002 === $this->year || 2012 === $this->year) { $this->addHoliday(new Holiday( 'springBankHoliday', - ['en_GB' => 'Spring Bank Holiday'], + ['en' => 'Spring Bank Holiday'], new DateTime("$this->year-6-4", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK @@ -182,7 +182,7 @@ protected function calculateSpringBankHoliday(): void $this->addHoliday(new Holiday( 'springBankHoliday', - ['en_GB' => 'Spring Bank Holiday'], + ['en' => 'Spring Bank Holiday'], new DateTime("last monday of may $this->year", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK @@ -214,7 +214,7 @@ protected function calculateSummerBankHoliday(): void if ($this->year < 1965) { $this->addHoliday(new Holiday( 'summerBankHoliday', - ['en_GB' => 'August Bank Holiday'], + ['en' => 'August Bank Holiday'], new DateTime("first monday of august $this->year", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK @@ -229,7 +229,7 @@ protected function calculateSummerBankHoliday(): void if (1968 === $this->year || 1969 === $this->year) { $this->addHoliday(new Holiday( 'summerBankHoliday', - ['en_GB' => 'Summer Bank Holiday'], + ['en' => 'Summer Bank Holiday'], new DateTime("first monday of september $this->year", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK @@ -240,7 +240,7 @@ protected function calculateSummerBankHoliday(): void $this->addHoliday(new Holiday( 'summerBankHoliday', - ['en_GB' => 'Summer Bank Holiday'], + ['en' => 'Summer Bank Holiday'], new DateTime("last monday of august $this->year", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK diff --git a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php index aff00e5e3..bd8f9b610 100644 --- a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php +++ b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php @@ -78,7 +78,7 @@ private function calculateStPatricksDay(): void $holiday = new Holiday( 'stPatricksDay', - ['en_GB' => 'St. Patrick\'s Day'], + ['en' => 'St. Patrick\'s Day'], new DateTime($this->year . '-3-17', new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK @@ -124,7 +124,7 @@ private function calculateBattleOfTheBoyne(): void $holiday = new Holiday( 'battleOfTheBoyne', - ['en_GB' => 'Battle of the Boyne'], + ['en' => 'Battle of the Boyne'], new DateTime($this->year . '-7-12', new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index d0736b8f2..4856319f0 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -151,7 +151,7 @@ protected function calculateSummerBankHoliday(): void $this->addHoliday(new Holiday( 'summerBankHoliday', - ['en_GB' => 'August Bank Holiday'], + ['en' => 'August Bank Holiday'], new DateTime("first monday of august $this->year", new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK diff --git a/src/Yasumi/data/locales.php b/src/Yasumi/data/locales.php index 6fa1c48a7..ca370f6be 100644 --- a/src/Yasumi/data/locales.php +++ b/src/Yasumi/data/locales.php @@ -12,11 +12,16 @@ // List of possible locales. This list is used in case the 'intl' extension is not loaded/available. return [ + 'af', 'af_NA', 'af_ZA', + 'agq', 'agq_CM', + 'ak', 'ak_GH', + 'am', 'am_ET', + 'ar', 'ar_AE', 'ar_BH', 'ar_DJ', @@ -44,47 +49,74 @@ 'ar_TD', 'ar_TN', 'ar_YE', + 'as', 'as_IN', + 'asa', 'asa_TZ', + 'ast', 'ast_ES', + 'az', 'az_Cyrl', 'az_Cyrl_AZ', 'az_Latn', 'az_Latn_AZ', + 'bas', 'bas_CM', + 'be', 'be_BY', + 'bem', 'bem_ZM', + 'bez', 'bez_TZ', + 'bg', 'bg_BG', + 'bm', 'bm_ML', + 'bn', 'bn_BD', 'bn_IN', + 'bo', 'bo_CN', 'bo_IN', + 'br', 'br_FR', + 'brx', 'brx_IN', + 'bs', 'bs_Cyrl', 'bs_Cyrl_BA', 'bs_Latn', 'bs_Latn_BA', + 'ca', 'ca_AD', 'ca_ES', 'ca_ES_VALENCIA', 'ca_FR', 'ca_IT', + 'ccp', 'ccp_BD', 'ccp_IN', + 'ce', 'ce_RU', + 'cgg', 'cgg_UG', + 'chr', 'chr_US', + 'ckb', 'ckb_IQ', 'ckb_IR', + 'cs', 'cs_CZ', + 'cu', 'cu_RU', + 'cy', 'cy_GB', + 'da', 'da_DK', 'da_GL', + 'dav', 'dav_KE', + 'de', 'de_AT', 'de_BE', 'de_CH', @@ -92,16 +124,25 @@ 'de_IT', 'de_LI', 'de_LU', + 'dje', 'dje_NE', + 'dsb', 'dsb_DE', + 'dua', 'dua_CM', + 'dyo', 'dyo_SN', + 'dz', 'dz_BT', + 'ebu', 'ebu_KE', + 'ee', 'ee_GH', 'ee_TG', + 'el', 'el_CY', 'el_GR', + 'en', 'en_AG', 'en_AI', 'en_AS', @@ -204,6 +245,7 @@ 'en_ZA', 'en_ZM', 'en_ZW', + 'es', 'es_AR', 'es_BO', 'es_BR', @@ -231,11 +273,16 @@ 'es_US', 'es_UY', 'es_VE', + 'et', 'et_EE', + 'eu', 'eu_ES', + 'ewo', 'ewo_CM', + 'fa', 'fa_AF', 'fa_IR', + 'ff', 'ff_CM', 'ff_GN', 'ff_Latn', @@ -253,10 +300,14 @@ 'ff_Latn_SN', 'ff_MR', 'ff_SN', + 'fi', 'fi_FI', + 'fil', 'fil_PH', + 'fo', 'fo_DK', 'fo_FO', + 'fr', 'fr_BE', 'fr_BF', 'fr_BI', @@ -303,107 +354,190 @@ 'fr_VU', 'fr_WF', 'fr_YT', + 'fur', 'fur_IT', + 'fy', 'fy_NL', + 'ga', 'ga_IE', + 'gd', 'gd_GB', + 'gl', 'gl_ES', + 'gsw', 'gsw_CH', 'gsw_FR', 'gsw_LI', + 'gu', 'gu_IN', + 'guz', 'guz_KE', + 'gv', 'gv_IM', + 'ha', 'ha_GH', 'ha_NE', 'ha_NG', + 'haw', 'haw_US', + 'he', 'he_IL', + 'hi', 'hi_IN', + 'hr', 'hr_BA', 'hr_HR', + 'hsb', 'hsb_DE', + 'hu', 'hu_HU', + 'hy', 'hy_AM', + 'ia', 'ia_001', + 'id', 'id_ID', + 'ig', 'ig_NG', + 'ii', 'ii_CN', + 'is', 'is_IS', + 'it', 'it_CH', 'it_IT', 'it_SM', 'it_VA', + 'ja', 'ja_JP', + 'jgo', 'jgo_CM', + 'jmc', 'jmc_TZ', + 'jv', 'jv_ID', + 'ka', 'ka_GE', + 'kab', 'kab_DZ', + 'kam', 'kam_KE', + 'kde', 'kde_TZ', + 'kea', 'kea_CV', + 'khq', 'khq_ML', + 'ki', 'ki_KE', + 'kk', 'kk_KZ', + 'kkj', 'kkj_CM', + 'kl', 'kl_GL', + 'kln', 'kln_KE', + 'km', 'km_KH', + 'kn', 'kn_IN', + 'ko', 'ko_KP', 'ko_KR', + 'kok', 'kok_IN', + 'ks', 'ks_IN', + 'ksb', 'ksb_TZ', + 'ksf', 'ksf_CM', + 'ksh', 'ksh_DE', + 'ku', 'ku_TR', + 'kw', 'kw_GB', + 'ky', 'ky_KG', + 'lag', 'lag_TZ', + 'lb', 'lb_LU', + 'lg', 'lg_UG', + 'lkt', 'lkt_US', + 'ln', 'ln_AO', 'ln_CD', 'ln_CF', 'ln_CG', + 'lo', 'lo_LA', + 'lrc', 'lrc_IQ', 'lrc_IR', + 'lt', 'lt_LT', + 'lu', 'lu_CD', + 'luo', 'luo_KE', + 'luy', 'luy_KE', + 'lv', 'lv_LV', + 'mas', 'mas_KE', 'mas_TZ', + 'mer', 'mer_KE', + 'mfe', 'mfe_MU', + 'mg', 'mg_MG', + 'mgh', 'mgh_MZ', + 'mgo', 'mgo_CM', + 'mi', 'mi_NZ', + 'mk', 'mk_MK', + 'ml', 'ml_IN', + 'mn', 'mn_MN', + 'mr', 'mr_IN', + 'ms', 'ms_BN', 'ms_MY', 'ms_SG', + 'mt', 'mt_MT', + 'mua', 'mua_CM', + 'my', 'my_MM', + 'mzn', 'mzn_IR', + 'naq', 'naq_NA', + 'nb', 'nb_NO', 'nb_SJ', + 'nd', 'nd_ZW', + 'nds', 'nds_DE', 'nds_NL', + 'ne', 'ne_IN', 'ne_NP', + 'nl', 'nl_AW', 'nl_BE', 'nl_BQ', @@ -411,22 +545,34 @@ 'nl_NL', 'nl_SR', 'nl_SX', + 'nmg', 'nmg_CM', + 'nn', 'nn_NO', + 'nnh', 'nnh_CM', + 'nus', 'nus_SS', + 'nyn', 'nyn_UG', + 'om', 'om_ET', 'om_KE', + 'or', 'or_IN', + 'os', 'os_GE', 'os_RU', + 'pa', 'pa_Arab', 'pa_Arab_PK', 'pa_Guru', 'pa_Guru_IN', + 'pl', 'pl_PL', + 'ps', 'ps_AF', + 'pt', 'pt_AO', 'pt_BR', 'pt_CH', @@ -439,48 +585,73 @@ 'pt_PT', 'pt_ST', 'pt_TL', + 'qu', 'qu_BO', 'qu_EC', 'qu_PE', + 'rm', 'rm_CH', + 'rn', 'rn_BI', + 'ro', 'ro_MD', 'ro_RO', + 'rof', 'rof_TZ', + 'ru', 'ru_BY', 'ru_KG', 'ru_KZ', 'ru_MD', 'ru_RU', 'ru_UA', + 'rw', 'rw_RW', + 'rwk', 'rwk_TZ', + 'sah', 'sah_RU', + 'saq', 'saq_KE', + 'sbp', 'sbp_TZ', + 'sd', 'sd_PK', + 'se', 'se_FI', 'se_NO', 'se_SE', + 'seh', 'seh_MZ', + 'ses', 'ses_ML', + 'sg', 'sg_CF', + 'shi', 'shi_Latn', 'shi_Latn_MA', 'shi_Tfng', 'shi_Tfng_MA', + 'si', 'si_LK', + 'sk', 'sk_SK', + 'sl', 'sl_SI', + 'smn', 'smn_FI', + 'sn', 'sn_ZW', + 'so', 'so_DJ', 'so_ET', 'so_KE', 'so_SO', + 'sq', 'sq_AL', 'sq_MK', 'sq_XK', + 'sr', 'sr_Cyrl', 'sr_Cyrl_BA', 'sr_Cyrl_ME', @@ -491,60 +662,90 @@ 'sr_Latn_ME', 'sr_Latn_RS', 'sr_Latn_XK', + 'sv', 'sv_AX', 'sv_FI', 'sv_SE', + 'sw', 'sw_CD', 'sw_KE', 'sw_TZ', 'sw_UG', + 'ta', 'ta_IN', 'ta_LK', 'ta_MY', 'ta_SG', + 'te', 'te_IN', + 'teo', 'teo_KE', 'teo_UG', + 'tg', 'tg_TJ', + 'th', 'th_TH', + 'ti', 'ti_ER', 'ti_ET', + 'tk', 'tk_TM', + 'to', 'to_TO', + 'tr', 'tr_CY', 'tr_TR', + 'tt', 'tt_RU', + 'twq', 'twq_NE', + 'tzm', 'tzm_MA', + 'ug', 'ug_CN', + 'uk', 'uk_UA', + 'ur', 'ur_IN', 'ur_PK', + 'uz', 'uz_Arab', 'uz_Arab_AF', 'uz_Cyrl', 'uz_Cyrl_UZ', 'uz_Latn', 'uz_Latn_UZ', + 'vai', 'vai_Latn', 'vai_Latn_LR', 'vai_Vaii', 'vai_Vaii_LR', + 'vi', 'vi_VN', + 'vun', 'vun_TZ', + 'wae', 'wae_CH', + 'wo', 'wo_SN', + 'xh', 'xh_ZA', + 'xog', 'xog_UG', + 'yav', 'yav_CM', + 'yo', 'yo_BJ', 'yo_NG', + 'yue', 'yue_HK', 'yue_Hans', 'yue_Hans_CN', 'yue_Hant', 'yue_Hant_HK', + 'zgh', 'zgh_MA', + 'zh', 'zh_Hans', 'zh_Hans_CN', 'zh_Hans_HK', @@ -554,5 +755,6 @@ 'zh_Hant_HK', 'zh_Hant_MO', 'zh_Hant_TW', + 'zu', 'zu_ZA' ]; diff --git a/src/Yasumi/data/translations/allSaintsDay.php b/src/Yasumi/data/translations/allSaintsDay.php index 26f90e770..3c9effb5c 100755 --- a/src/Yasumi/data/translations/allSaintsDay.php +++ b/src/Yasumi/data/translations/allSaintsDay.php @@ -12,26 +12,22 @@ // Translations for All Saints' Day return [ - 'de_AT' => 'Allerheiligen', - 'de_CH' => 'Allerheiligen', - 'de_DE' => 'Allerheiligen', - 'el_GR' => 'Άγιοι Πάντες', - 'en_US' => 'All Saints\' Day', - 'es_ES' => 'Día de todos los Santos', - 'fi_FI' => 'Pyhäinpäivä', + 'de' => 'Allerheiligen', + 'el' => 'Άγιοι Πάντες', + 'en' => 'All Saints\' Day', + 'es' => 'Día de todos los Santos', + 'fi' => 'Pyhäinpäivä', 'fr_BE' => 'La Toussaint', - 'fr_CH' => 'Toussaint', - 'fr_FR' => 'Toussaint', - 'hr_HR' => 'Dan svih svetih', - 'hu_HU' => 'Mindenszentek', + 'fr' => 'Toussaint', + 'hr' => 'Dan svih svetih', + 'hu' => 'Mindenszentek', + 'it' => 'Festa di Tutti i Santi', 'it_CH' => 'Ognissanti', - 'it_IT' => 'Festa di Tutti i Santi', - 'lt_LT' => 'Visų šventųjų diena (Vėlinės)', - 'nl_BE' => 'Allerheiligen', - 'nl_NL' => 'Allerheiligen', - 'pl_PL' => 'Uroczystość Wszystkich Świętych', - 'pt_PT' => 'Dia de todos os Santos', - 'ro_RO' => 'Ziua tuturor sfinților', - 'sk_SK' => 'Sviatok Všetkých svätých', - 'sv_SE' => 'alla helgons dag' + 'lt' => 'Visų šventųjų diena (Vėlinės)', + 'nl' => 'Allerheiligen', + 'pl' => 'Uroczystość Wszystkich Świętych', + 'pt' => 'Dia de todos os Santos', + 'ro' => 'Ziua tuturor sfinților', + 'sk' => 'Sviatok Všetkých svätých', + 'sv' => 'alla helgons dag' ]; diff --git a/src/Yasumi/data/translations/allSaintsEve.php b/src/Yasumi/data/translations/allSaintsEve.php index 7c7c51d83..f579546d7 100755 --- a/src/Yasumi/data/translations/allSaintsEve.php +++ b/src/Yasumi/data/translations/allSaintsEve.php @@ -12,7 +12,7 @@ // Translations for All Saints' Eve return [ - 'da_DK' => 'Allehelgensaften', - 'en_US' => 'All Saints\' Eve', - 'sv_SE' => 'alla helgons afton' + 'da' => 'Allehelgensaften', + 'en' => 'All Saints\' Eve', + 'sv' => 'alla helgons afton' ]; diff --git a/src/Yasumi/data/translations/annunciation.php b/src/Yasumi/data/translations/annunciation.php index b10e2e5ef..1a8f148b0 100644 --- a/src/Yasumi/data/translations/annunciation.php +++ b/src/Yasumi/data/translations/annunciation.php @@ -12,8 +12,7 @@ // Translations for Annunciation return [ - 'el_GR' => 'Ευαγγελισμός της Θεοτόκου', - 'en_US' => 'Annunciation', - 'fr_BE' => 'Annonciation', - 'fr_FR' => 'Annonciation' + 'el' => 'Ευαγγελισμός της Θεοτόκου', + 'en' => 'Annunciation', + 'fr' => 'Annonciation', ]; diff --git a/src/Yasumi/data/translations/anzacDay.php b/src/Yasumi/data/translations/anzacDay.php index aed012ea8..547d38a5c 100644 --- a/src/Yasumi/data/translations/anzacDay.php +++ b/src/Yasumi/data/translations/anzacDay.php @@ -12,7 +12,5 @@ // Translations for ANZAC Day return [ - 'en_AU' => 'ANZAC Day', - 'en_NZ' => 'ANZAC Day', - 'en_US' => 'ANZAC Day' + 'en' => 'ANZAC Day' ]; diff --git a/src/Yasumi/data/translations/armisticeDay.php b/src/Yasumi/data/translations/armisticeDay.php index 8834e592d..6acfb7958 100644 --- a/src/Yasumi/data/translations/armisticeDay.php +++ b/src/Yasumi/data/translations/armisticeDay.php @@ -12,9 +12,9 @@ // Translations for Armistice Day return [ - 'el_GR' => 'Ημέρα Ανακωχής', - 'en_US' => 'Armistice Day', - 'fr_BE' => 'Armistice', + 'el' => 'Ημέρα Ανακωχής', + 'en' => 'Armistice Day', + 'fr' => 'Armistice', 'fr_FR' => 'Armistice 1918', - 'nl_BE' => 'Wapenstilstand' + 'nl' => 'Wapenstilstand' ]; diff --git a/src/Yasumi/data/translations/ascensionDay.php b/src/Yasumi/data/translations/ascensionDay.php index 0a2c96f9c..f0e7cd368 100644 --- a/src/Yasumi/data/translations/ascensionDay.php +++ b/src/Yasumi/data/translations/ascensionDay.php @@ -12,19 +12,15 @@ // Translations for Ascension Day return [ - 'da_DK' => 'Kristi himmelfartsdag', - 'de_AT' => 'Christi Himmelfahrt', + 'da' => 'Kristi himmelfartsdag', + 'de' => 'Christi Himmelfahrt', 'de_CH' => 'Auffahrt', - 'de_DE' => 'Christi Himmelfahrt', - 'el_GR' => 'Ανάληψη του Χριστού', - 'en_US' => 'Ascension Day', - 'fi_FI' => 'Helatorstai', - 'fr_BE' => 'Ascension', - 'fr_CH' => 'Ascension', - 'fr_FR' => 'Ascension', - 'it_CH' => 'Ascensione', - 'nb_NO' => 'Kristi himmelfartsdag', - 'nl_BE' => 'Hemelvaart', - 'nl_NL' => 'Hemelvaart', - 'sv_SE' => 'Kristi himmelsfärdsdag' + 'el' => 'Ανάληψη του Χριστού', + 'en' => 'Ascension Day', + 'fi' => 'Helatorstai', + 'fr' => 'Ascension', + 'it' => 'Ascensione', + 'nb' => 'Kristi himmelfartsdag', + 'nl' => 'Hemelvaart', + 'sv' => 'Kristi himmelsfärdsdag' ]; diff --git a/src/Yasumi/data/translations/ashWednesday.php b/src/Yasumi/data/translations/ashWednesday.php index a108449e9..9a4015336 100644 --- a/src/Yasumi/data/translations/ashWednesday.php +++ b/src/Yasumi/data/translations/ashWednesday.php @@ -12,13 +12,11 @@ // Translations for Ash Wednesday return [ - 'de_CH' => 'Aschermittwoch', - 'en_US' => 'Ash Wednesday', - 'es_ES' => 'Miércoles de Ceniza', - 'fr_BE' => 'Mercredi des Cendres', - 'fr_CH' => 'Mercredi des Cendres', - 'it_CH' => 'Mercoledi delle Ceneri', - 'nl_BE' => 'Aswoensdag', - 'nl_NL' => 'Aswoensdag', - 'pt_BR' => 'Quarta-feira de Cinzas' + 'de' => 'Aschermittwoch', + 'en' => 'Ash Wednesday', + 'es' => 'Miércoles de Ceniza', + 'fr' => 'Mercredi des Cendres', + 'it' => 'Mercoledi delle Ceneri', + 'nl' => 'Aswoensdag', + 'pt' => 'Quarta-feira de Cinzas' ]; diff --git a/src/Yasumi/data/translations/assumptionOfMary.php b/src/Yasumi/data/translations/assumptionOfMary.php index 46079fb53..059d12b5c 100755 --- a/src/Yasumi/data/translations/assumptionOfMary.php +++ b/src/Yasumi/data/translations/assumptionOfMary.php @@ -12,23 +12,18 @@ // Translations for Assumption of Mary return [ - 'de_AT' => 'Mariä Himmelfahrt', - 'de_CH' => 'Mariä Himmelfahrt', - 'de_DE' => 'Mariä Himmelfahrt', - 'el_GR' => 'Κοίμηση της Θεοτόκου', - 'en_US' => 'Assumption of Mary', - 'es_ES' => 'Asunción de la Virgen María', - 'fr_BE' => 'Assomption', - 'fr_CH' => 'Assomption', - 'fr_FR' => 'Assomption', - 'hr_HR' => 'Velika Gospa', + 'de' => 'Mariä Himmelfahrt', + 'el' => 'Κοίμηση της Θεοτόκου', + 'en' => 'Assumption of Mary', + 'es' => 'Asunción de la Virgen María', + 'fr' => 'Assomption', + 'hr' => 'Velika Gospa', + 'it' => 'Assunzione di Maria Vergine', 'it_CH' => 'Assunzione', - 'it_IT' => 'Assunzione di Maria Vergine', - 'lt_LT' => 'Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)', - 'nl_BE' => 'Onze Lieve Vrouw hemelvaart', - 'nl_NL' => 'Onze Lieve Vrouw hemelvaart', - 'pl_PL' => 'Wniebowzięcie Najświętszej Marii Panny', - 'pt_PT' => 'Assunção de Nossa Senhora', - 'ro_RO' => 'Adormirea Maicii Domnului', - 'sk_SK' => 'Nanebovzatie Panny Márie' + 'lt' => 'Žolinė (Švč. Mergelės Marijos ėmimo į dangų diena)', + 'nl' => 'Onze Lieve Vrouw hemelvaart', + 'pl' => 'Wniebowzięcie Najświętszej Marii Panny', + 'pt' => 'Assunção de Nossa Senhora', + 'ro' => 'Adormirea Maicii Domnului', + 'sk' => 'Nanebovzatie Panny Márie' ]; diff --git a/src/Yasumi/data/translations/australiaDay.php b/src/Yasumi/data/translations/australiaDay.php index ef8d7752e..a07d969b1 100644 --- a/src/Yasumi/data/translations/australiaDay.php +++ b/src/Yasumi/data/translations/australiaDay.php @@ -12,6 +12,5 @@ // Translations for Australia Day return [ - 'en_AU' => 'Australia Day', - 'en_US' => 'Australia Day' + 'en' => 'Australia Day', ]; diff --git a/src/Yasumi/data/translations/carnationRevolutionDay.php b/src/Yasumi/data/translations/carnationRevolutionDay.php index c1fa592ee..fced9aef3 100644 --- a/src/Yasumi/data/translations/carnationRevolutionDay.php +++ b/src/Yasumi/data/translations/carnationRevolutionDay.php @@ -12,6 +12,6 @@ // Translations for Freedom Day return [ - 'en_US' => 'Freedom Day', - 'pt_PT' => 'Dia da Liberdade' + 'en' => 'Freedom Day', + 'pt' => 'Dia da Liberdade' ]; diff --git a/src/Yasumi/data/translations/christmasDay.php b/src/Yasumi/data/translations/christmasDay.php index 87e496bd9..b9fe61979 100755 --- a/src/Yasumi/data/translations/christmasDay.php +++ b/src/Yasumi/data/translations/christmasDay.php @@ -12,41 +12,34 @@ // Translations for Christmas return [ - 'bs_Latn_BA' => 'Božić', - 'cs_CZ' => '1. svátek vánoční', - 'cy_GB' => 'Nadolig', - 'da_DK' => 'Juledag', + 'bs_Latn' => 'Božić', + 'cs' => '1. svátek vánoční', + 'cy' => 'Nadolig', + 'da' => 'Juledag', + 'de' => '1. Weihnachtsfeiertag', 'de_AT' => 'Christtag', 'de_CH' => 'Weihnachtstag', - 'de_DE' => '1. Weihnachtsfeiertag', - 'el_GR' => 'Χριστούγεννα', - 'en_AU' => 'Christmas Day', - 'en_GB' => 'Christmas Day', - 'en_NZ' => 'Christmas Day', + 'el' => 'Χριστούγεννα', + 'en' => 'Christmas Day', 'en_US' => 'Christmas', - 'en_ZA' => 'Christmas Day', - 'es_ES' => 'Navidad', - 'et_EE' => 'Esimene jõulupüha', - 'fi_FI' => 'Joulupäivä', - 'fr_BE' => 'Noël', - 'fr_CH' => 'Noël', - 'fr_FR' => 'Noël', - 'hr_HR' => 'Božić', - 'hu_HU' => 'Karácsony', - 'it_CH' => 'Natale', - 'it_IT' => 'Natale', - 'ko_KR' => '기독탄신일', - 'lt_LT' => 'Šv. Kalėdos', - 'lv_LV' => 'Ziemassvētki', - 'nb_NO' => 'Første juledag', + 'es' => 'Navidad', + 'et' => 'Esimene jõulupüha', + 'fi' => 'Joulupäivä', + 'fr' => 'Noël', + 'hr' => 'Božić', + 'hu' => 'Karácsony', + 'it' => 'Natale', + 'ko' => '기독탄신일', + 'lt' => 'Šv. Kalėdos', + 'lv' => 'Ziemassvētki', + 'nb' => 'Første juledag', + 'nl' => 'Eerste kerstdag', 'nl_BE' => 'Kerstmis', - 'nl_NL' => 'Eerste kerstdag', - 'pl_PL' => 'pierwszy dzień Bożego Narodzenia', - 'pt_BR' => 'Natal', - 'pt_PT' => 'Natal', - 'ro_RO' => 'Crăciunul', - 'ru_UA' => 'Рождество', - 'sk_SK' => 'Prvý sviatok vianočný', - 'sv_SE' => 'juldagen', - 'uk_UA' => 'Різдво' + 'pl' => 'pierwszy dzień Bożego Narodzenia', + 'pt' => 'Natal', + 'ro' => 'Crăciunul', + 'ru' => 'Рождество', + 'sk' => 'Prvý sviatok vianočný', + 'sv' => 'juldagen', + 'uk' => 'Різдво' ]; diff --git a/src/Yasumi/data/translations/christmasEve.php b/src/Yasumi/data/translations/christmasEve.php index 60bee03a4..9f4e48885 100755 --- a/src/Yasumi/data/translations/christmasEve.php +++ b/src/Yasumi/data/translations/christmasEve.php @@ -12,20 +12,19 @@ // Translations for Christmas Eve return [ - 'cs_CZ' => 'Štědrý den', - 'cy_GB' => 'Noswyl Nadolig', - 'da_DK' => 'Juleaften', - 'de_CH' => 'Heiliger Abend', - 'en_US' => 'Christmas Eve', - 'et_EE' => 'Jõululaupäev', - 'fr_BE' => 'Réveillon de Noël', - 'fr_CH' => 'Réveillon de Noël', - 'it_CH' => 'Vigilia di Natale', - 'ko_KR' => '크리스마스 이브', - 'lt_LT' => 'Šv. Kūčios', - 'lv_LV' => 'Ziemassvētku vakars', - 'pt_PT' => 'Véspera de Natal', - 'ro_RO' => 'Ajunul Crãciunului', - 'sk_SK' => 'Štedrý deň', - 'sv_SE' => 'julafton' + 'cs' => 'Štědrý den', + 'cy' => 'Noswyl Nadolig', + 'da' => 'Juleaften', + 'de' => 'Heiliger Abend', + 'en' => 'Christmas Eve', + 'et' => 'Jõululaupäev', + 'fr' => 'Réveillon de Noël', + 'it' => 'Vigilia di Natale', + 'ko' => '크리스마스 이브', + 'lt' => 'Šv. Kūčios', + 'lv' => 'Ziemassvētku vakars', + 'pt' => 'Véspera de Natal', + 'ro' => 'Ajunul Crãciunului', + 'sk' => 'Štedrý deň', + 'sv' => 'julafton' ]; diff --git a/src/Yasumi/data/translations/corpusChristi.php b/src/Yasumi/data/translations/corpusChristi.php index 81e675986..0a456fc6a 100644 --- a/src/Yasumi/data/translations/corpusChristi.php +++ b/src/Yasumi/data/translations/corpusChristi.php @@ -12,15 +12,12 @@ // Translations for Corpus Christi return [ - 'de_AT' => 'Fronleichnam', - 'de_CH' => 'Fronleichnam', - 'de_DE' => 'Fronleichnam', - 'en_US' => 'Corpus Christi', - 'es_ES' => 'Corpus Christi', - 'fr_CH' => 'Fête-Dieu', - 'hr_HR' => 'Tijelovo', - 'it_CH' => 'Corpus Domini', - 'pl_PL' => 'Boże Ciało', - 'pt_BR' => 'Corpus Christi', + 'de' => 'Fronleichnam', + 'en' => 'Corpus Christi', + 'fr' => 'Fête-Dieu', + 'hr' => 'Tijelovo', + 'it' => 'Corpus Domini', + 'pl' => 'Boże Ciało', + 'pt' => 'Corpus Christi', 'pt_PT' => 'Corpo de Deus' ]; diff --git a/src/Yasumi/data/translations/dayAfterNewYearsDay.php b/src/Yasumi/data/translations/dayAfterNewYearsDay.php index 34c73e2f2..8648e89fc 100644 --- a/src/Yasumi/data/translations/dayAfterNewYearsDay.php +++ b/src/Yasumi/data/translations/dayAfterNewYearsDay.php @@ -12,7 +12,7 @@ // Translations for Day after New Year's Day return [ - 'en_NZ' => 'Day after New Year\'s Day', - 'en_US' => 'Day after New Year\'s Day', - 'ko_KR' => '새해 연휴' + 'en' => 'Day after New Year\'s Day', + 'ko' => '새해 연휴', + 'ro' => 'A doua zi după Anul Nou' ]; diff --git a/src/Yasumi/data/translations/dayOfReformation.php b/src/Yasumi/data/translations/dayOfReformation.php index 80929e843..07621e861 100755 --- a/src/Yasumi/data/translations/dayOfReformation.php +++ b/src/Yasumi/data/translations/dayOfReformation.php @@ -12,6 +12,6 @@ // Translations for Day of Reformation return [ - 'de_DE' => 'Tag der Reformation', - 'en_US' => 'Day of Reformation' + 'de' => 'Tag der Reformation', + 'en' => 'Day of Reformation' ]; diff --git a/src/Yasumi/data/translations/easter.php b/src/Yasumi/data/translations/easter.php index f34887bea..39362cb98 100644 --- a/src/Yasumi/data/translations/easter.php +++ b/src/Yasumi/data/translations/easter.php @@ -12,35 +12,28 @@ // Translations for Easter Sunday return [ - 'bs_Latn_BA' => 'Uskrs', - 'cy_GB' => 'Sul y Pasg', - 'da_DK' => 'Påskedag', - 'de_AT' => 'Ostersonntag', + 'bs_Latn' => 'Uskrs', + 'cy' => 'Sul y Pasg', + 'da' => 'Påskedag', + 'de' => 'Ostersonntag', 'de_CH' => 'Ostern', - 'de_DE' => 'Ostersonntag', - 'el_GR' => 'Κυριακή του Πάσχα', - 'en_IE' => 'Easter Sunday', - 'en_US' => 'Easter Sunday', - 'et_EE' => 'Ülestõusmispühade 1. püha', - 'fi_FI' => 'Pääsiäispäivä', - 'fr_BE' => 'Pâques', - 'fr_CH' => 'Pâques', - 'fr_FR' => 'Pâques', - 'ga_IE' => 'Domhnach Cásca', - 'hr_HR' => 'Uskrs', - 'hu_HU' => 'Húsvét', - 'it_CH' => 'Pasqua', - 'it_IT' => 'Pasqua', - 'lt_LT' => 'Velykos', - 'lv_LV' => 'Lieldienas', - 'nb_NO' => 'Første påskedag', - 'nl_BE' => 'Eerste paasdag', - 'nl_NL' => 'Eerste paasdag', - 'pl_PL' => 'Wielkanoc', - 'pt_BR' => 'Páscoa', - 'pt_PT' => 'Páscoa', - 'ro_RO' => 'Paștele', - 'ru_UA' => 'Пасха', - 'sv_SE' => 'påskdagen', - 'uk_UA' => 'Великдень' + 'el' => 'Κυριακή του Πάσχα', + 'en' => 'Easter Sunday', + 'et' => 'Ülestõusmispühade 1. püha', + 'fi' => 'Pääsiäispäivä', + 'fr' => 'Pâques', + 'ga' => 'Domhnach Cásca', + 'hr' => 'Uskrs', + 'hu' => 'Húsvét', + 'it' => 'Pasqua', + 'lt' => 'Velykos', + 'lv' => 'Lieldienas', + 'nb' => 'Første påskedag', + 'nl' => 'Eerste paasdag', + 'pl' => 'Wielkanoc', + 'pt' => 'Páscoa', + 'ro' => 'Paștele', + 'ru' => 'Пасха', + 'sv' => 'påskdagen', + 'uk' => 'Великдень' ]; diff --git a/src/Yasumi/data/translations/easterMonday.php b/src/Yasumi/data/translations/easterMonday.php index 829bcb8a6..4e5a36559 100644 --- a/src/Yasumi/data/translations/easterMonday.php +++ b/src/Yasumi/data/translations/easterMonday.php @@ -12,35 +12,27 @@ // Translations for Easter Monday return [ - 'cs_CZ' => 'Velikonoční pondělí', - 'cy_GB' => 'Llun y Pasg', - 'da_DK' => '2. påskedag', - 'de_AT' => 'Ostermontag', - 'de_CH' => 'Ostermontag', - 'de_DE' => 'Ostermontag', - 'el_GR' => 'Δευτέρα του Πάσχα', - 'en_AU' => 'Easter Monday', - 'en_GB' => 'Easter Monday', - 'en_IE' => 'Easter Monday', - 'en_NZ' => 'Easter Monday', - 'en_US' => 'Easter Monday', - 'es_ES' => 'Lunes de Pascua', - 'fi_FI' => '2. pääsiäispäivä', - 'fr_BE' => 'Lundi de Pâques', - 'fr_CH' => 'Lundi de Pâques', - 'fr_FR' => 'Lundi de Pâques', - 'ga_IE' => 'Luan Cásca', - 'hr_HR' => 'Uskršnji ponedjeljak', - 'hu_HU' => 'Húsvéthétfő', + 'cs' => 'Velikonoční pondělí', + 'cy' => 'Llun y Pasg', + 'da' => '2. påskedag', + 'de' => 'Ostermontag', + 'el' => 'Δευτέρα του Πάσχα', + 'en' => 'Easter Monday', + 'es' => 'Lunes de Pascua', + 'fi' => '2. pääsiäispäivä', + 'fr' => 'Lundi de Pâques', + 'ga' => 'Luan Cásca', + 'hr' => 'Uskršnji ponedjeljak', + 'hu' => 'Húsvéthétfő', + 'it' => 'Lunedì dell\'Angelo', 'it_CH' => 'Lunedi di Pasqua', - 'it_IT' => 'Lunedì dell\'Angelo', - 'lt_LT' => 'Antroji Velykų diena', - 'lv_LV' => 'Otrās Lieldienas', - 'nb_NO' => 'Andre påskedag', + 'lt' => 'Antroji Velykų diena', + 'lv' => 'Otrās Lieldienas', + 'nb' => 'Andre påskedag', 'nl_BE' => 'Paasmaandag', - 'nl_NL' => 'Tweede paasdag', - 'pl_PL' => 'Poniedziałek Wielkanocny', - 'ro_RO' => 'A doua zi de Paște', - 'sk_SK' => 'Veľkonočný pondelok', - 'sv_SE' => 'annandag påsk' + 'nl' => 'Tweede paasdag', + 'pl' => 'Poniedziałek Wielkanocny', + 'ro' => 'A doua zi de Paște', + 'sk' => 'Veľkonočný pondelok', + 'sv' => 'annandag påsk' ]; diff --git a/src/Yasumi/data/translations/epiphany.php b/src/Yasumi/data/translations/epiphany.php index 995ee3d19..398ab297e 100644 --- a/src/Yasumi/data/translations/epiphany.php +++ b/src/Yasumi/data/translations/epiphany.php @@ -14,20 +14,17 @@ return [ 'de_AT' => 'Heilige Drei Könige', 'de_CH' => 'Heilige Drei Könige', - 'de_DE' => 'Heilige 3 Könige', - 'el_GR' => 'Θεοφάνεια', - 'en_US' => 'Epiphany', - 'es_ES' => 'Día de Reyes', - 'fi_FI' => 'Loppiainen', - 'fr_BE' => 'Epiphanie', - 'fr_CH' => 'Epiphanie', - 'hr_HR' => 'Sveta tri kralja', - 'it_CH' => 'Epifania', - 'it_IT' => 'Epifania', - 'ja_JP' => 'エピファニー', - 'nl_BE' => 'Drie Koningen', - 'nl_NL' => 'Drie Koningen', - 'pl_PL' => 'Święto Trzech Króli', - 'sk_SK' => 'Zjavenie Pána / Traja králi', - 'sv_SE' => 'trettondedag jul' + 'de' => 'Heilige 3 Könige', + 'el' => 'Θεοφάνεια', + 'en' => 'Epiphany', + 'es' => 'Día de Reyes', + 'fi' => 'Loppiainen', + 'fr' => 'Epiphanie', + 'hr' => 'Sveta tri kralja', + 'it' => 'Epifania', + 'ja' => 'エピファニー', + 'nl' => 'Drie Koningen', + 'pl' => 'Święto Trzech Króli', + 'sk' => 'Zjavenie Pána / Traja králi', + 'sv' => 'trettondedag jul' ]; diff --git a/src/Yasumi/data/translations/epiphanyEve.php b/src/Yasumi/data/translations/epiphanyEve.php index c0c8f6c97..dfc44f11d 100644 --- a/src/Yasumi/data/translations/epiphanyEve.php +++ b/src/Yasumi/data/translations/epiphanyEve.php @@ -12,7 +12,7 @@ // Translations for Epiphany Eve return [ - 'da_DK' => 'Helligtrekongersaften', - 'en_US' => 'Epiphany Eve', - 'sv_SE' => 'trettondagsafton' + 'da' => 'Helligtrekongersaften', + 'en' => 'Epiphany Eve', + 'sv' => 'trettondagsafton' ]; diff --git a/src/Yasumi/data/translations/fathersDay.php b/src/Yasumi/data/translations/fathersDay.php index 518f11874..20f0f4615 100755 --- a/src/Yasumi/data/translations/fathersDay.php +++ b/src/Yasumi/data/translations/fathersDay.php @@ -12,15 +12,13 @@ // Translations for Father's Day return [ - 'de_CH' => 'Vatertag', - 'el_GR' => 'Γιορτή του πατέρα', - 'en_US' => 'Father\'s Day', - 'fr_BE' => 'Fête des pères', - 'fr_CH' => 'Fête des pères', - 'it_CH' => 'Festa del papà', - 'nl_BE' => 'Vaderdag', - 'nl_NL' => 'Vaderdag', - 'pt_PT' => 'Dia do Pai', - 'ro_RO' => 'Ziua Tatălui', - 'sk_SK' => 'Deň otcov' + 'de' => 'Vatertag', + 'el' => 'Γιορτή του πατέρα', + 'en' => 'Father\'s Day', + 'fr' => 'Fête des pères', + 'it' => 'Festa del papà', + 'nl' => 'Vaderdag', + 'pt' => 'Dia do Pai', + 'ro' => 'Ziua Tatălui', + 'sk' => 'Deň otcov' ]; diff --git a/src/Yasumi/data/translations/goodFriday.php b/src/Yasumi/data/translations/goodFriday.php index 3910993fc..8384896e5 100644 --- a/src/Yasumi/data/translations/goodFriday.php +++ b/src/Yasumi/data/translations/goodFriday.php @@ -12,35 +12,26 @@ // Translations for Good Friday return [ - 'cs_CZ' => 'Velký pátek', - 'cy_GB' => 'Gwener y Groglith', - 'da_DK' => 'Langfredag', - 'de_CH' => 'Karfreitag', - 'de_DE' => 'Karfreitag', - 'el_GR' => 'Μεγάλη Παρασκευή', - 'en_AU' => 'Good Friday', - 'en_GB' => 'Good Friday', - 'en_IE' => 'Good Friday', - 'en_NZ' => 'Good Friday', - 'en_US' => 'Good Friday', - 'en_ZA' => 'Good Friday', - 'es_ES' => 'Viernes Santo', - 'et_EE' => 'Suur Reede', - 'fi_FI' => 'Pitkäperjantai', - 'fr_BE' => 'Vendredi Saint', - 'fr_CH' => 'Vendredi Saint', - 'fr_FR' => 'Vendredi Saint', - 'ga_IE' => 'Aoine an Chéasta', - 'hu_HU' => 'Nagypéntek', - 'it_CH' => 'Venerdi Santo', - 'ja_JP' => 'グッドフライデー', - 'lv_LV' => 'Lielā Piektdiena', - 'nb_NO' => 'Langfredag', - 'nl_BE' => 'Goede Vrijdag', - 'nl_NL' => 'Goede Vrijdag', - 'pl_PL' => 'Wielki Piątek', - 'pt_BR' => 'Sexta feira santa', + 'cs' => 'Velký pátek', + 'cy' => 'Gwener y Groglith', + 'da' => 'Langfredag', + 'de' => 'Karfreitag', + 'el' => 'Μεγάλη Παρασκευή', + 'en' => 'Good Friday', + 'es' => 'Viernes Santo', + 'et' => 'Suur Reede', + 'fi' => 'Pitkäperjantai', + 'fr' => 'Vendredi Saint', + 'ga' => 'Aoine an Chéasta', + 'hu' => 'Nagypéntek', + 'it' => 'Venerdi Santo', + 'ja' => 'グッドフライデー', + 'lv' => 'Lielā Piektdiena', + 'nb' => 'Langfredag', + 'nl' => 'Goede Vrijdag', + 'pl' => 'Wielki Piątek', + 'pt' => 'Sexta feira santa', 'pt_PT' => 'Sexta-feira Santa', - 'sk_SK' => 'Veľký piatok', - 'sv_SE' => 'långfredagen' + 'sk' => 'Veľký piatok', + 'sv' => 'långfredagen' ]; diff --git a/src/Yasumi/data/translations/immaculateConception.php b/src/Yasumi/data/translations/immaculateConception.php index 75a578eb9..7ad1c9c60 100644 --- a/src/Yasumi/data/translations/immaculateConception.php +++ b/src/Yasumi/data/translations/immaculateConception.php @@ -12,14 +12,11 @@ // Translations for Immaculate Conception return [ - 'de_AT' => 'Mariä Empfängnis', - 'de_CH' => 'Mariä Empfängnis', - 'el_GR' => 'Ευαγγελισμός της Θεοτόκου', - 'en_US' => 'Immaculate Conception', - 'es_ES' => 'Inmaculada Concepción', - 'fr_BE' => 'Immaculée Conception', - 'fr_CH' => 'Immaculée Conception', - 'it_CH' => 'Immacolata Concezione', - 'it_IT' => 'Immacolata Concezione', - 'pt_PT' => 'Dia da Imaculada Conceição' + 'de' => 'Mariä Empfängnis', + 'el' => 'Ευαγγελισμός της Θεοτόκου', + 'en' => 'Immaculate Conception', + 'es' => 'Inmaculada Concepción', + 'fr' => 'Immaculée Conception', + 'it' => 'Immacolata Concezione', + 'pt' => 'Dia da Imaculada Conceição' ]; diff --git a/src/Yasumi/data/translations/internationalWomensDay.php b/src/Yasumi/data/translations/internationalWomensDay.php index 4647d5c6a..34b47c696 100755 --- a/src/Yasumi/data/translations/internationalWomensDay.php +++ b/src/Yasumi/data/translations/internationalWomensDay.php @@ -12,10 +12,9 @@ // Translations for International Women's Day return [ - 'de_DE' => 'Internationaler Frauentag', - 'en_US' => 'International Women\'s Day', - 'ko_KR' => '국제 여성의 날', - 'ru_RU' => 'Международный женский день', - 'ru_UA' => 'Международный женский день', - 'uk_UA' => 'Міжнародний жіночий день' + 'de' => 'Internationaler Frauentag', + 'en' => 'International Women\'s Day', + 'ko' => '국제 여성의 날', + 'ru' => 'Международный женский день', + 'uk' => 'Міжнародний жіночий день' ]; diff --git a/src/Yasumi/data/translations/internationalWorkersDay.php b/src/Yasumi/data/translations/internationalWorkersDay.php index 0e9be61a5..a9f35c31e 100755 --- a/src/Yasumi/data/translations/internationalWorkersDay.php +++ b/src/Yasumi/data/translations/internationalWorkersDay.php @@ -12,38 +12,34 @@ // Translations for International Workers' Day return [ - 'bs_Latn_BA' => 'Praznik rada', - 'cs_CZ' => 'Svátek práce', - 'da_DK' => 'Første maj', + 'bs_Latn' => 'Praznik rada', + 'cs' => 'Svátek práce', + 'da' => 'Første maj', + 'de' => 'Tag der Arbeit', 'de_AT' => 'Staatsfeiertag', - 'de_CH' => 'Tag der Arbeit', - 'de_DE' => 'Tag der Arbeit', - 'el_GR' => 'Εργατική Πρωτομαγιά', + 'el' => 'Εργατική Πρωτομαγιά', 'en_US' => 'International Workers\' Day', 'en_ZA' => 'Workers\' Day', - 'es_ES' => 'Día del Trabajador', - 'et_EE' => 'Kevadpüha', - 'fi_FI' => 'Vappu', - 'fr_BE' => 'Fête du Travail', - 'fr_CH' => 'Fête du Travail', - 'fr_FR' => 'Fête du Travail', - 'hr_HR' => 'Praznik rada', - 'hu_HU' => 'A munka ünnepe', + 'es' => 'Día del Trabajador', + 'et' => 'Kevadpüha', + 'fi' => 'Vappu', + 'fr' => 'Fête du Travail', + 'hr' => 'Praznik rada', + 'hu' => 'A munka ünnepe', + 'it' => 'Festa del Lavoro', 'it_CH' => 'Festa dei lavoratori', - 'it_IT' => 'Festa del Lavoro', - 'ja_JP' => '労働の日', - 'ko_KR' => '노동절', - 'lt_LT' => 'Tarptautinė darbo diena', - 'lv_LV' => 'Darba svētki', - 'nb_NO' => 'Arbeidernes dag', - 'nl_BE' => 'Dag van de arbeid', - 'nl_NL' => 'Dag van de arbeid', - 'pl_PL' => 'Święto Pracy', - 'pt_BR' => 'Dia internacional do trabalhador', + 'ja' => '労働の日', + 'ko' => '노동절', + 'lt' => 'Tarptautinė darbo diena', + 'lv' => 'Darba svētki', + 'nb' => 'Arbeidernes dag', + 'nl' => 'Dag van de arbeid', + 'pl' => 'Święto Pracy', + 'pt' => 'Dia internacional do trabalhador', 'pt_PT' => 'Dia do Trabalhador', - 'ro_RO' => 'Ziua internațională a muncii', - 'ru_UA' => 'День международной солидарности трудящихся', - 'sk_SK' => 'Sviatok práce', - 'sv_SE' => 'Första maj', - 'uk_UA' => 'День міжнародної солідарності трудящих' + 'ro' => 'Ziua internațională a muncii', + 'ru' => 'День международной солидарности трудящихся', + 'sk' => 'Sviatok práce', + 'sv' => 'Första maj', + 'uk' => 'День міжнародної солідарності трудящих' ]; diff --git a/src/Yasumi/data/translations/labourDay.php b/src/Yasumi/data/translations/labourDay.php index 595ed006d..3079a9338 100644 --- a/src/Yasumi/data/translations/labourDay.php +++ b/src/Yasumi/data/translations/labourDay.php @@ -12,12 +12,9 @@ // Translations for Labour Day return [ - 'en_AU' => 'Labour Day', - 'en_NZ' => 'Labour Day', - 'en_US' => 'Labour Day', - 'ja_JP' => '労働の日', - 'ko_KR' => '노동절', - 'nl_BE' => 'Dag van de arbeid', - 'nl_NL' => 'Dag van de arbeid', - 'sk_SK' => 'Sviatok práce' + 'en' => 'Labour Day', + 'ja' => '労働の日', + 'ko' => '노동절', + 'nl' => 'Dag van de arbeid', + 'sk' => 'Sviatok práce' ]; diff --git a/src/Yasumi/data/translations/maundyThursday.php b/src/Yasumi/data/translations/maundyThursday.php index 2e7467344..44f6f2844 100644 --- a/src/Yasumi/data/translations/maundyThursday.php +++ b/src/Yasumi/data/translations/maundyThursday.php @@ -12,9 +12,9 @@ // Translations for Maundy Thursday return [ - 'da_DK' => 'Skærtorsdag', - 'el_GR' => 'Μεγάλη Πέμπτη', - 'en_US' => 'Maundy Thursday', - 'es_ES' => 'Jueves Santo', - 'nb_NO' => 'Skjærtorsdag' + 'da' => 'Skærtorsdag', + 'el' => 'Μεγάλη Πέμπτη', + 'en' => 'Maundy Thursday', + 'es' => 'Jueves Santo', + 'nb' => 'Skjærtorsdag' ]; diff --git a/src/Yasumi/data/translations/mothersDay.php b/src/Yasumi/data/translations/mothersDay.php index 7195526b6..374460a3a 100755 --- a/src/Yasumi/data/translations/mothersDay.php +++ b/src/Yasumi/data/translations/mothersDay.php @@ -12,15 +12,13 @@ // Translations for Mother's Day return [ - 'de_CH' => 'Muttertag', - 'el_GR' => 'Ημέρα της μητέρας', - 'en_US' => 'Mother\'s Day', - 'fr_BE' => 'Fête des mères', - 'fr_CH' => 'Fête des mères', - 'it_CH' => 'Festa della mamma', - 'nl_BE' => 'Moederdag', - 'nl_NL' => 'Moederdag', - 'pt_PT' => 'Dia da Mãe', - 'ro_RO' => 'Ziua Mamei', - 'sk_SK' => 'Deň matiek' + 'de' => 'Muttertag', + 'el' => 'Ημέρα της μητέρας', + 'en' => 'Mother\'s Day', + 'fr' => 'Fête des mères', + 'it' => 'Festa della mamma', + 'nl' => 'Moederdag', + 'pt' => 'Dia da Mãe', + 'ro' => 'Ziua Mamei', + 'sk' => 'Deň matiek' ]; diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php index 3b2b0f4ec..1fd9f5d9e 100755 --- a/src/Yasumi/data/translations/newYearsDay.php +++ b/src/Yasumi/data/translations/newYearsDay.php @@ -12,45 +12,35 @@ // Translations for New Year's Day return [ - 'bs_Latn_BA' => 'Nova godina', - 'cs_CZ' => 'Nový rok', - 'cy_GB' => 'Dydd Calan', - 'da_DK' => 'Nytårsdag', - 'de_AT' => 'Neujahr', - 'de_CH' => 'Neujahr', - 'de_DE' => 'Neujahr', - 'el_GR' => 'Πρωτοχρονιά', - 'en_AU' => 'New Year\'s Day', - 'en_GB' => 'New Year\'s Day', - 'en_IE' => 'New Year\'s Day', - 'en_NZ' => 'New Year\'s Day', - 'en_US' => 'New Year\'s Day', - 'en_ZA' => 'New Year\'s Day', - 'es_ES' => 'Año Nuevo', - 'et_EE' => 'Uusaasta', - 'fi_FI' => 'Uudenvuodenpäivä', + 'bs_Latn' => 'Nova godina', + 'cs' => 'Nový rok', + 'cy' => 'Dydd Calan', + 'da' => 'Nytårsdag', + 'de' => 'Neujahr', + 'el' => 'Πρωτοχρονιά', + 'en' => 'New Year\'s Day', + 'es' => 'Año Nuevo', + 'et' => 'Uusaasta', + 'fi' => 'Uudenvuodenpäivä', 'fr_BE' => 'Nouvel An', 'fr_CH' => 'Nouvel An', - 'fr_FR' => 'Jour de l\'An', - 'ga_IE' => 'Lá Caille', - 'hr_HR' => 'Nova godina', - 'hu_HU' => 'Újév', - 'it_CH' => 'Capodanno', - 'it_IT' => 'Capodanno', - 'ja_JP' => '元日', - 'ko_KR' => '새해', - 'lt_LT' => 'Naujųjų metų diena', - 'lv_LV' => 'Jaunais Gads', - 'nb_NO' => 'Første nyttårsdag', - 'nl_BE' => 'Nieuwjaar', - 'nl_NL' => 'Nieuwjaar', - 'pl_PL' => 'Nowy Rok', - 'pt_BR' => 'Ano novo', + 'fr' => 'Jour de l\'An', + 'ga' => 'Lá Caille', + 'hr' => 'Nova godina', + 'hu' => 'Újév', + 'it' => 'Capodanno', + 'ja' => '元日', + 'ko' => '새해', + 'lt' => 'Naujųjų metų diena', + 'lv' => 'Jaunais Gads', + 'nb' => 'Første nyttårsdag', + 'nl' => 'Nieuwjaar', + 'pl' => 'Nowy Rok', + 'pt' => 'Ano novo', 'pt_PT' => 'Dia de Ano Novo', - 'ro_RO' => 'Anul Nou', - 'ru_RU' => 'Новый год', - 'ru_UA' => 'Новый Год', - 'sk_SK' => 'Nový rok', - 'sv_SE' => 'nyårsdagen', - 'uk_UA' => 'Новий Рік' + 'ro' => 'Anul Nou', + 'ru' => 'Новый год', + 'sk' => 'Nový rok', + 'sv' => 'nyårsdagen', + 'uk' => 'Новий Рік' ]; diff --git a/src/Yasumi/data/translations/newYearsEve.php b/src/Yasumi/data/translations/newYearsEve.php index 67de43599..ea9f6a9c8 100755 --- a/src/Yasumi/data/translations/newYearsEve.php +++ b/src/Yasumi/data/translations/newYearsEve.php @@ -12,9 +12,9 @@ // Translations for New Year's Eve return [ - 'da_DK' => 'Nytårsaften', - 'en_US' => 'New Year\'s Eve', - 'ko_KR' => '신년전야', - 'lv_LV' => 'Vecgada vakars', - 'sv_SE' => 'nyårsafton' + 'da' => 'Nytårsaften', + 'en' => 'New Year\'s Eve', + 'ko' => '신년전야', + 'lv' => 'Vecgada vakars', + 'sv' => 'nyårsafton' ]; diff --git a/src/Yasumi/data/translations/pentecost.php b/src/Yasumi/data/translations/pentecost.php index 63655e955..b2f28426c 100755 --- a/src/Yasumi/data/translations/pentecost.php +++ b/src/Yasumi/data/translations/pentecost.php @@ -12,27 +12,23 @@ // Translations for Whitsunday return [ - 'da_DK' => 'Pinsedag', + 'da' => 'Pinsedag', + 'de' => 'Pfingstsonntag', 'de_AT' => 'Pfingsten', 'de_CH' => 'Pfingsten', - 'de_DE' => 'Pfingstsonntag', - 'el_GR' => 'Πεντηκοστή', - 'en_IE' => 'Whitsunday', - 'en_US' => 'Whitsunday', - 'et_EE' => 'Nelipühade 1. püha', - 'fi_FI' => 'Helluntaipäivä', - 'fr_BE' => 'Pentecôte', - 'fr_CH' => 'Pentecôte', - 'fr_FR' => 'Pentecôte', - 'ga_IE' => 'Domhnach Cincíse', - 'hu_HU' => 'Pünkösd', - 'it_CH' => 'Pentecoste', - 'nb_NO' => 'Første pinsedag', - 'nl_BE' => 'Eerste pinksterdag', - 'nl_NL' => 'Eerste pinksterdag', - 'pl_PL' => 'Zielone Świątki', - 'ro_RO' => 'Rusaliile', - 'ru_UA' => 'Троица', - 'sv_SE' => 'Pingstdagen', - 'uk_UA' => 'Трійця' + 'el' => 'Πεντηκοστή', + 'en' => 'Whitsunday', + 'et' => 'Nelipühade 1. püha', + 'fi' => 'Helluntaipäivä', + 'fr' => 'Pentecôte', + 'ga' => 'Domhnach Cincíse', + 'hu' => 'Pünkösd', + 'it' => 'Pentecoste', + 'nb' => 'Første pinsedag', + 'nl' => 'Eerste pinksterdag', + 'pl' => 'Zielone Świątki', + 'ro' => 'Rusaliile', + 'ru' => 'Троица', + 'sv' => 'Pingstdagen', + 'uk' => 'Трійця' ]; diff --git a/src/Yasumi/data/translations/pentecostMonday.php b/src/Yasumi/data/translations/pentecostMonday.php index 6025392b3..5e1f965cd 100755 --- a/src/Yasumi/data/translations/pentecostMonday.php +++ b/src/Yasumi/data/translations/pentecostMonday.php @@ -12,21 +12,16 @@ // Translations for Whitmonday return [ - 'da_DK' => '2. pinsedag', - 'de_AT' => 'Pfingstmontag', - 'de_CH' => 'Pfingstmontag', - 'de_DE' => 'Pfingstmontag', - 'el_GR' => 'Αγίου Πνεύματος', - 'en_IE' => 'Whitmonday', - 'en_US' => 'Whitmonday', - 'fr_BE' => 'Lundi de Pentecôte', - 'fr_CH' => 'Lundi de Pentecôte', - 'fr_FR' => 'Lundi de Pentecôte', - 'ga_IE' => 'Luan Cincíse', - 'hu_HU' => 'Pünkösdhétfő', - 'it_CH' => 'Lunedi di Pentecoste', - 'nb_NO' => 'Andre pinsedag', + 'da' => '2. pinsedag', + 'de' => 'Pfingstmontag', + 'el' => 'Αγίου Πνεύματος', + 'en' => 'Whitmonday', + 'fr' => 'Lundi de Pentecôte', + 'ga' => 'Luan Cincíse', + 'hu' => 'Pünkösdhétfő', + 'it' => 'Lunedi di Pentecoste', + 'nb' => 'Andre pinsedag', + 'nl' => 'Tweede pinksterdag', 'nl_BE' => 'Pinkstermaandag', - 'nl_NL' => 'Tweede pinksterdag', - 'ro_RO' => 'A doua zi de Rusalii' + 'ro' => 'A doua zi de Rusalii' ]; diff --git a/src/Yasumi/data/translations/portugalDay.php b/src/Yasumi/data/translations/portugalDay.php index e067f467a..952d07a1a 100644 --- a/src/Yasumi/data/translations/portugalDay.php +++ b/src/Yasumi/data/translations/portugalDay.php @@ -12,6 +12,6 @@ // Translations for Portugal Day return [ - 'en_US' => 'Portugal Day', - 'pt_PT' => 'Dia de Portugal' + 'en' => 'Portugal Day', + 'pt' => 'Dia de Portugal' ]; diff --git a/src/Yasumi/data/translations/portugueseRepublicDay.php b/src/Yasumi/data/translations/portugueseRepublicDay.php index b677528a4..9539dc414 100644 --- a/src/Yasumi/data/translations/portugueseRepublicDay.php +++ b/src/Yasumi/data/translations/portugueseRepublicDay.php @@ -12,6 +12,6 @@ // Translations for Implantation of the Portuguese Republic return [ - 'en_US' => 'Implantation of the Portuguese Republic', - 'pt_PT' => 'Implantação da República Portuguesa' + 'en' => 'Implantation of the Portuguese Republic', + 'pt' => 'Implantação da República Portuguesa' ]; diff --git a/src/Yasumi/data/translations/reformationDay.php b/src/Yasumi/data/translations/reformationDay.php index 61a9c8ab3..4a1812165 100755 --- a/src/Yasumi/data/translations/reformationDay.php +++ b/src/Yasumi/data/translations/reformationDay.php @@ -12,6 +12,6 @@ // Translations for Reformation Day return [ - 'de_DE' => 'Reformationstag', - 'en_US' => 'Reformation Day' + 'de' => 'Reformationstag', + 'en' => 'Reformation Day' ]; diff --git a/src/Yasumi/data/translations/restorationOfIndepence.php b/src/Yasumi/data/translations/restorationOfIndepence.php index acce2d38f..37cf8a240 100644 --- a/src/Yasumi/data/translations/restorationOfIndepence.php +++ b/src/Yasumi/data/translations/restorationOfIndepence.php @@ -12,6 +12,6 @@ // Translations for Restoration of Independence return [ - 'en_US' => 'Restoration of Independence', - 'pt_PT' => 'Restauração da Independência' + 'en' => 'Restoration of Independence', + 'pt' => 'Restauração da Independência' ]; diff --git a/src/Yasumi/data/translations/secondChristmasDay.php b/src/Yasumi/data/translations/secondChristmasDay.php index eb0a131e8..7165110dc 100755 --- a/src/Yasumi/data/translations/secondChristmasDay.php +++ b/src/Yasumi/data/translations/secondChristmasDay.php @@ -12,27 +12,24 @@ // Translations for Second Christmas Day return [ - 'cs_CZ' => '2. svátek vánoční', - 'da_DK' => '2. juledag', + 'cs' => '2. svátek vánoční', + 'da' => '2. juledag', + 'de' => '2. Weihnachtsfeiertag', 'de_AT' => 'Stefanitag', - 'de_DE' => '2. Weihnachtsfeiertag', - 'el_GR' => 'Σύναξις Υπεραγίας Θεοτόκου Μαρίας', - 'en_AU' => 'Boxing Day', - 'en_GB' => 'Boxing Day', - 'en_NZ' => 'Boxing Day', + 'el' => 'Σύναξις Υπεραγίας Θεοτόκου Μαρίας', + 'en' => 'Boxing Day', 'en_US' => 'Second Christmas Day', 'en_ZA' => 'Day of Goodwill', - 'et_EE' => 'Teine Jõulupüha', - 'fi_FI' => '2. joulupäivä', - 'hu_HU' => 'Karácsony másnapja', - 'ko_KR' => '성탄절 연휴', - 'lt_LT' => 'Kalėdos (antra diena)', - 'lv_LV' => 'Otrie Ziemassvētki', - 'nb_NO' => 'Andre juledag', - 'nl_BE' => 'Tweede kerstdag', - 'nl_NL' => 'Tweede kerstdag', - 'pl_PL' => 'drugi dzień Bożego Narodzenia', - 'ro_RO' => 'A doua zi de Crăciun', - 'sk_SK' => 'Druhý sviatok vianočný', - 'sv_SE' => 'annandag jul' + 'et' => 'Teine Jõulupüha', + 'fi' => '2. joulupäivä', + 'hu' => 'Karácsony másnapja', + 'ko' => '성탄절 연휴', + 'lt' => 'Kalėdos (antra diena)', + 'lv' => 'Otrie Ziemassvētki', + 'nb' => 'Andre juledag', + 'nl' => 'Tweede kerstdag', + 'pl' => 'drugi dzień Bożego Narodzenia', + 'ro' => 'A doua zi de Crăciun', + 'sk' => 'Druhý sviatok vianočný', + 'sv' => 'annandag jul' ]; diff --git a/src/Yasumi/data/translations/secondNewYearsDay.php b/src/Yasumi/data/translations/secondNewYearsDay.php index 944e93ce2..d83bc4306 100755 --- a/src/Yasumi/data/translations/secondNewYearsDay.php +++ b/src/Yasumi/data/translations/secondNewYearsDay.php @@ -12,6 +12,6 @@ // Translations for New Year's Day return [ - 'da_DK' => '2. nytårsdag', - 'en_GB' => '2nd January', + 'da' => '2. nytårsdag', + 'en' => '2nd January', ]; diff --git a/src/Yasumi/data/translations/stAndrewsDay.php b/src/Yasumi/data/translations/stAndrewsDay.php index 70a03e4d4..931a1446f 100644 --- a/src/Yasumi/data/translations/stAndrewsDay.php +++ b/src/Yasumi/data/translations/stAndrewsDay.php @@ -12,7 +12,6 @@ // Translations for St. Andrew's Day return [ - 'en_US' => 'St. Andrew\'s Day', - 'en_GB' => 'St. Andrew\'s Day', - 'ro_RO' => 'Sfântul Andrei', + 'en' => 'St. Andrew\'s Day', + 'ro' => 'Sfântul Andrei', ]; diff --git a/src/Yasumi/data/translations/stDavidsDay.php b/src/Yasumi/data/translations/stDavidsDay.php index 2aa7ce611..5a603b18c 100644 --- a/src/Yasumi/data/translations/stDavidsDay.php +++ b/src/Yasumi/data/translations/stDavidsDay.php @@ -12,7 +12,6 @@ // Translations for St. David's Day return [ - 'cy_GB' => 'Dydd Gŵyl Dewi', - 'en_GB' => 'St. David\'s Day', - 'en_US' => 'St. David\'s Day' + 'cy' => 'Dydd Gŵyl Dewi', + 'en' => 'St. David\'s Day' ]; diff --git a/src/Yasumi/data/translations/stGeorgesDay.php b/src/Yasumi/data/translations/stGeorgesDay.php index 1f85f1d23..ecca83052 100644 --- a/src/Yasumi/data/translations/stGeorgesDay.php +++ b/src/Yasumi/data/translations/stGeorgesDay.php @@ -12,7 +12,7 @@ // Translations for St. George's Day return [ - 'el_GR' => 'Αγίου Γεωργίου', - 'en_US' => 'St. George\'s Day', - 'es_ES' => 'San Jorge' + 'el' => 'Αγίου Γεωργίου', + 'en' => 'St. George\'s Day', + 'es' => 'San Jorge' ]; diff --git a/src/Yasumi/data/translations/stJohnsDay.php b/src/Yasumi/data/translations/stJohnsDay.php index 81db9cf18..98a08bed1 100644 --- a/src/Yasumi/data/translations/stJohnsDay.php +++ b/src/Yasumi/data/translations/stJohnsDay.php @@ -12,13 +12,13 @@ // Translations for St. John's Day return [ - 'da_DK' => 'Sankthansaften', - 'el_GR' => 'Σύναξις Προφήτου Προδρόμου και Βαπτιστού Ιωάννου', - 'en_US' => 'St. John\'s Day', - 'es_ES' => 'Sant Joan', - 'et_EE' => 'Jaanipäev', - 'fi_FI' => 'Juhannuspäivä', - 'lt_LT' => 'Rasos ir Joninių diena', - 'lv_LV' => 'Jāņi', - 'sv_SE' => 'midsommardagen' + 'da' => 'Sankthansaften', + 'el' => 'Σύναξις Προφήτου Προδρόμου και Βαπτιστού Ιωάννου', + 'en' => 'St. John\'s Day', + 'es' => 'Sant Joan', + 'et' => 'Jaanipäev', + 'fi' => 'Juhannuspäivä', + 'lt' => 'Rasos ir Joninių diena', + 'lv' => 'Jāņi', + 'sv' => 'midsommardagen' ]; diff --git a/src/Yasumi/data/translations/stJohnsEve.php b/src/Yasumi/data/translations/stJohnsEve.php index 8f12086eb..8111bc79a 100644 --- a/src/Yasumi/data/translations/stJohnsEve.php +++ b/src/Yasumi/data/translations/stJohnsEve.php @@ -12,7 +12,7 @@ // Translations for St. John's Eve return [ - 'da_DK' => 'Sankthansaften', - 'en_US' => 'St. John\'s Eve', - 'sv_SE' => 'midsommarafton' + 'da' => 'Sankthansaften', + 'en' => 'St. John\'s Eve', + 'sv' => 'midsommarafton' ]; diff --git a/src/Yasumi/data/translations/stJosephsDay.php b/src/Yasumi/data/translations/stJosephsDay.php index d88fa199e..652fcae9f 100644 --- a/src/Yasumi/data/translations/stJosephsDay.php +++ b/src/Yasumi/data/translations/stJosephsDay.php @@ -12,9 +12,9 @@ // Translations for St. Joseph's Day return [ - 'de_CH' => 'Josephstag', - 'en_US' => 'St. Joseph\'s Day', - 'es_ES' => 'San José', - 'fr_CH' => 'Saint-Joseph', - 'it_CH' => 'San Giuseppe' + 'de' => 'Josephstag', + 'en' => 'St. Joseph\'s Day', + 'es' => 'San José', + 'fr' => 'Saint-Joseph', + 'it' => 'San Giuseppe' ]; diff --git a/src/Yasumi/data/translations/stMartinsDay.php b/src/Yasumi/data/translations/stMartinsDay.php index 53c9ddfda..384ae2b20 100644 --- a/src/Yasumi/data/translations/stMartinsDay.php +++ b/src/Yasumi/data/translations/stMartinsDay.php @@ -12,7 +12,6 @@ // Translations for St. Martin's Day return [ - 'en_US' => 'St. Martin\'s Day', - 'nl_BE' => 'Sint Maarten', - 'nl_NL' => 'Sint Maarten' + 'en' => 'St. Martin\'s Day', + 'nl' => 'Sint Maarten', ]; diff --git a/src/Yasumi/data/translations/stStephensDay.php b/src/Yasumi/data/translations/stStephensDay.php index 7283b8903..e04553796 100644 --- a/src/Yasumi/data/translations/stStephensDay.php +++ b/src/Yasumi/data/translations/stStephensDay.php @@ -12,15 +12,12 @@ // Translations for St. Stephen's Day return [ - 'cy_GB' => 'Gŵyl San Steffan', - 'de_CH' => 'Stephanstag', - 'en_IE' => 'St. Stephen\'s Day', - 'en_US' => 'St. Stephen\'s Day', - 'es_ES' => 'Sant Esteve', - 'fr_CH' => 'Saint-Etienne', - 'fr_FR' => 'Saint-Étienne', - 'ga_IE' => 'Lá Fhéile Stiofáin', - 'hr_HR' => 'Sveti Stjepan', - 'it_CH' => 'Santo Stefano', - 'it_IT' => 'Santo Stefano' + 'cy' => 'Gŵyl San Steffan', + 'de' => 'Stephanstag', + 'en' => 'St. Stephen\'s Day', + 'es' => 'Sant Esteve', + 'fr' => 'Saint-Étienne', + 'ga' => 'Lá Fhéile Stiofáin', + 'hr' => 'Sveti Stjepan', + 'it' => 'Santo Stefano' ]; diff --git a/src/Yasumi/data/translations/substituteHoliday.php b/src/Yasumi/data/translations/substituteHoliday.php index 8f723afec..a6333cf32 100755 --- a/src/Yasumi/data/translations/substituteHoliday.php +++ b/src/Yasumi/data/translations/substituteHoliday.php @@ -12,11 +12,10 @@ // Translation pattern for substitute holidays. return [ - 'da_DK' => '{0} (erstatning)', - 'en_GB' => '{0} (substitute day)', - 'en_IE' => '{0} observed', + 'da' => '{0} (erstatning)', + 'en' => '{0} (substitute day)', 'en_US' => '{0} observed', - 'en_ZA' => '{0} observed', - 'ja_JP' => '振替休日 ({0})', - 'ko_KR' => '대체공휴일', + 'en_CA' => '{0} observed', + 'ja' => '振替休日 ({0})', + 'ko' => '대체공휴일', ]; diff --git a/src/Yasumi/data/translations/summerTime.php b/src/Yasumi/data/translations/summerTime.php index 5eee75079..5d42dd4cc 100644 --- a/src/Yasumi/data/translations/summerTime.php +++ b/src/Yasumi/data/translations/summerTime.php @@ -12,8 +12,8 @@ // Translations for Summertime return [ - 'da_DK' => 'Sommertid starter', - 'en_US' => 'Summertime', - 'ko_KR' => '서머타임', - 'nl_NL' => 'Zomertijd' + 'da' => 'Sommertid starter', + 'en' => 'Summertime', + 'ko' => '서머타임', + 'nl' => 'Zomertijd' ]; diff --git a/src/Yasumi/data/translations/valentinesDay.php b/src/Yasumi/data/translations/valentinesDay.php index 2d3d0d9db..3beaa573a 100644 --- a/src/Yasumi/data/translations/valentinesDay.php +++ b/src/Yasumi/data/translations/valentinesDay.php @@ -12,17 +12,15 @@ // Translations for Valentine's Day return [ - 'de_CH' => 'Valentinstag', - 'el_GR' => 'Αγίου Βαλεντίνου', - 'en_US' => 'Valentine\'s Day', - 'es_ES' => 'San Valentín', - 'fr_BE' => 'Saint-Valentin', - 'fr_CH' => 'Saint-Valentin', - 'it_CH' => 'San Valentino', - 'ja_JP' => 'バレンタイン·デー', - 'ko_KR' => '발렌타인 데이', - 'nl_BE' => 'Valentijnsdag', - 'nl_NL' => 'Valentijnsdag', - 'pl_PL' => 'Walentynki', - 'pt_PT' => 'Dia dos Namorados' + 'de' => 'Valentinstag', + 'el' => 'Αγίου Βαλεντίνου', + 'en' => 'Valentine\'s Day', + 'es' => 'San Valentín', + 'fr' => 'Saint-Valentin', + 'it' => 'San Valentino', + 'ja' => 'バレンタイン·デー', + 'ko' => '발렌타인 데이', + 'nl' => 'Valentijnsdag', + 'pl' => 'Walentynki', + 'pt' => 'Dia dos Namorados' ]; diff --git a/src/Yasumi/data/translations/victoryInEuropeDay.php b/src/Yasumi/data/translations/victoryInEuropeDay.php index 12c3de82c..33a04fbd5 100644 --- a/src/Yasumi/data/translations/victoryInEuropeDay.php +++ b/src/Yasumi/data/translations/victoryInEuropeDay.php @@ -12,8 +12,8 @@ // Translations for Victory in Europe Day return [ - 'cs_CZ' => 'Den vítězství', - 'en_US' => 'Victory in Europe Day', - 'fr_FR' => 'Victoire 1945', - 'sk_SK' => 'Deň víťazstva nad fašizmom' + 'cs' => 'Den vítězství', + 'en' => 'Victory in Europe Day', + 'fr' => 'Victoire 1945', + 'sk' => 'Deň víťazstva nad fašizmom' ]; diff --git a/src/Yasumi/data/translations/waitangiDay.php b/src/Yasumi/data/translations/waitangiDay.php index b891e971e..76ab28edb 100644 --- a/src/Yasumi/data/translations/waitangiDay.php +++ b/src/Yasumi/data/translations/waitangiDay.php @@ -12,6 +12,5 @@ // Translations for Waitangi Day return [ - 'en_NZ' => 'Waitangi Day', - 'en_US' => 'Waitangi Day' + 'en' => 'Waitangi Day' ]; diff --git a/src/Yasumi/data/translations/walpurgisEve.php b/src/Yasumi/data/translations/walpurgisEve.php index 8c83ec8d8..2e2f1448f 100755 --- a/src/Yasumi/data/translations/walpurgisEve.php +++ b/src/Yasumi/data/translations/walpurgisEve.php @@ -12,6 +12,6 @@ // Translations for Walpurgis Night return [ - 'en_US' => 'Walpurgis Night', - 'sv_SE' => 'valborgsmässoafton' + 'en' => 'Walpurgis Night', + 'sv' => 'valborgsmässoafton' ]; diff --git a/src/Yasumi/data/translations/winterTime.php b/src/Yasumi/data/translations/winterTime.php index 3c2777683..f173fccdc 100644 --- a/src/Yasumi/data/translations/winterTime.php +++ b/src/Yasumi/data/translations/winterTime.php @@ -12,7 +12,7 @@ // Translations for Wintertime return [ - 'da_DK' => 'Sommertid slutter', - 'en_US' => 'Wintertime', - 'nl_NL' => 'Wintertijd' + 'da' => 'Sommertid slutter', + 'en' => 'Wintertime', + 'nl' => 'Wintertijd' ]; diff --git a/src/Yasumi/data/translations/worldAnimalDay.php b/src/Yasumi/data/translations/worldAnimalDay.php index 51f49498d..79b615731 100644 --- a/src/Yasumi/data/translations/worldAnimalDay.php +++ b/src/Yasumi/data/translations/worldAnimalDay.php @@ -12,7 +12,6 @@ // Translations for World Animal Day return [ - 'en_US' => 'World Animal Day', - 'nl_BE' => 'Werelddierendag', - 'nl_NL' => 'Werelddierendag' + 'en' => 'World Animal Day', + 'nl' => 'Werelddierendag' ]; diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index b8e30b3de..9263eb6e7 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -101,6 +101,20 @@ public function testHolidayGetNameWithNoTranslations(): void $this->assertEquals($name, $holiday->getName()); } + /** + * Tests the getName function of the Holiday object with only a parent translation for the name given. + * @throws Exception + */ + public function testHolidayGetNameWithParentLocaleTranslation(): void + { + $name = 'testHoliday'; + $translation = 'My Holiday'; + $holiday = new Holiday($name, ['de' => $translation], new DateTime(), 'de_DE'); + + $this->assertIsString($holiday->getName()); + $this->assertEquals($translation, $holiday->getName()); + } + /** * Tests the getName function of the Holiday object with only a default translation for the name given. * @throws Exception @@ -158,6 +172,32 @@ public function testHolidayGetNameWithGlobalTranslations(): void $this->assertEquals($translations[$locale], $holiday->getName()); } + /** + * Tests the getName function of the Holiday object with global translations and no custom translation. + * @throws Exception + */ + public function testHolidayGetNameWithGlobalParentLocaleTranslations(): void + { + /** @var TranslationsInterface|PHPUnit_Framework_MockObject_MockObject $translationsStub */ + $translationsStub = $this->getMockBuilder(TranslationsInterface::class)->getMock(); + + $translations = [ + 'en_US' => 'New Year\'s Day', + 'pl' => 'Nowy Rok' + ]; + + $translationsStub->expects($this->once())->method('getTranslations')->with($this->equalTo('newYearsDay'))->willReturn($translations); + + $locale = 'pl_PL'; + + $holiday = new Holiday('newYearsDay', [], new DateTime('2015-01-01'), $locale); + $holiday->mergeGlobalTranslations($translationsStub); + + $this->assertNotNull($holiday->getName()); + $this->assertIsString($holiday->getName()); + $this->assertEquals($translations['pl'], $holiday->getName()); + } + /** * Tests the getName function of the Holiday object with global translations and a new custom translation. * @throws Exception diff --git a/tests/Estonia/IndependenceDayTest.php b/tests/Estonia/IndependenceDayTest.php index 93eae17cc..be538ca91 100644 --- a/tests/Estonia/IndependenceDayTest.php +++ b/tests/Estonia/IndependenceDayTest.php @@ -80,7 +80,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(Estonia::DECLARATION_OF_INDEPENDENCE_YEAR), - ['en_US' => 'Independence Day'] + ['en' => 'Independence Day'] ); } diff --git a/tests/Estonia/RestorationOfIndependenceDayTest.php b/tests/Estonia/RestorationOfIndependenceDayTest.php index e9b0dcae4..ea16b7228 100644 --- a/tests/Estonia/RestorationOfIndependenceDayTest.php +++ b/tests/Estonia/RestorationOfIndependenceDayTest.php @@ -80,7 +80,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(Estonia::RESTORATION_OF_INDEPENDENCE_YEAR), - ['en_US' => 'Day of Restoration of Independence'] + ['en' => 'Day of Restoration of Independence'] ); } diff --git a/tests/Estonia/VictoryDayTest.php b/tests/Estonia/VictoryDayTest.php index d6ed7d366..cd392d34f 100644 --- a/tests/Estonia/VictoryDayTest.php +++ b/tests/Estonia/VictoryDayTest.php @@ -80,7 +80,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(Estonia::VICTORY_DAY_START_YEAR), - ['en_US' => 'Victory Day'] + ['en' => 'Victory Day'] ); } diff --git a/tests/Latvia/MidsummerEveDayTest.php b/tests/Latvia/MidsummerEveDayTest.php index 8514806ed..08ae9772d 100644 --- a/tests/Latvia/MidsummerEveDayTest.php +++ b/tests/Latvia/MidsummerEveDayTest.php @@ -63,7 +63,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Līgo Diena', 'en_US' => 'Midsummer Eve'] + [self::LOCALE => 'Līgo Diena', 'en' => 'Midsummer Eve'] ); } diff --git a/tests/Latvia/NewYearsEveDayTest.php b/tests/Latvia/NewYearsEveDayTest.php index f37a97b1e..1d8f07337 100644 --- a/tests/Latvia/NewYearsEveDayTest.php +++ b/tests/Latvia/NewYearsEveDayTest.php @@ -63,7 +63,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(), - [self::LOCALE => 'Vecgada vakars', 'en_US' => 'New Year\'s Eve'] + [self::LOCALE => 'Vecgada vakars', 'en' => 'New Year\'s Eve'] ); } diff --git a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php index aa2a0f2c1..27465641c 100644 --- a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php +++ b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php @@ -94,7 +94,7 @@ public function testTranslation(): void $this->generateRandomYear(Latvia::PROCLAMATION_OF_INDEPENDENCE_YEAR), [ self::LOCALE => 'Latvijas Republikas proklamēšanas diena', - 'en_US' => 'Proclamation Day of the Republic of Latvia' + 'en' => 'Proclamation Day of the Republic of Latvia' ] ); } diff --git a/tests/Latvia/RestorationOfIndependenceDayTest.php b/tests/Latvia/RestorationOfIndependenceDayTest.php index cd3d2c310..6d5ac1c8f 100644 --- a/tests/Latvia/RestorationOfIndependenceDayTest.php +++ b/tests/Latvia/RestorationOfIndependenceDayTest.php @@ -94,7 +94,7 @@ public function testTranslation(): void $this->generateRandomYear(Latvia::RESTORATION_OF_INDEPENDENCE_YEAR), [ self::LOCALE => 'Latvijas Republikas Neatkarības atjaunošanas diena', - 'en_US' => 'Restoration of Independence day' + 'en' => 'Restoration of Independence day' ] ); } diff --git a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php index 8ff587b47..4004a48b5 100644 --- a/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfIndependenceOfLithuaniaDayTest.php @@ -80,7 +80,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(Lithuania::RESTORATION_OF_INDEPENDENCE_YEAR), - ['en_US' => 'Day of Restoration of Independence of Lithuania'] + ['en' => 'Day of Restoration of Independence of Lithuania'] ); } diff --git a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php index 3eac82813..8eea1cd02 100644 --- a/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php +++ b/tests/Lithuania/RestorationOfTheStateOfLithuaniaDayTest.php @@ -80,7 +80,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(Lithuania::RESTORATION_OF_THE_STATE_YEAR), - ['en_US' => 'Day of Restoration of the State of Lithuania'] + ['en' => 'Day of Restoration of the State of Lithuania'] ); } diff --git a/tests/Lithuania/StatehoodDayTest.php b/tests/Lithuania/StatehoodDayTest.php index a890720cc..22341ed7c 100644 --- a/tests/Lithuania/StatehoodDayTest.php +++ b/tests/Lithuania/StatehoodDayTest.php @@ -80,7 +80,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(Lithuania::STATEHOOD_YEAR), - ['en_US' => 'Statehood Day (Lithuania)'] + ['en' => 'Statehood Day (Lithuania)'] ); } diff --git a/tests/Russia/DefenceOfTheFatherlandDayTest.php b/tests/Russia/DefenceOfTheFatherlandDayTest.php index d3c019ee6..c2d45a76b 100644 --- a/tests/Russia/DefenceOfTheFatherlandDayTest.php +++ b/tests/Russia/DefenceOfTheFatherlandDayTest.php @@ -79,7 +79,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(Russia::DEFENCE_OF_THE_FATHERLAND_START_YEAR), - ['en_US' => 'Defence of the Fatherland Day'] + ['en' => 'Defence of the Fatherland Day'] ); } diff --git a/tests/Russia/RussiaDayTest.php b/tests/Russia/RussiaDayTest.php index bf1a47efe..c465d2e86 100644 --- a/tests/Russia/RussiaDayTest.php +++ b/tests/Russia/RussiaDayTest.php @@ -80,7 +80,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(Russia::RUSSIA_DAY_START_YEAR), - ['en_US' => 'Russia Day'] + ['en' => 'Russia Day'] ); } diff --git a/tests/Russia/UnityDayTest.php b/tests/Russia/UnityDayTest.php index 4593507dd..fa07dfd90 100644 --- a/tests/Russia/UnityDayTest.php +++ b/tests/Russia/UnityDayTest.php @@ -80,7 +80,7 @@ public function testTranslation(): void self::REGION, self::HOLIDAY, $this->generateRandomYear(Russia::UNITY_DAY_START_YEAR), - ['en_US' => 'Unity Day'] + ['en' => 'Unity Day'] ); } diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index 4c4f6f18c..e2ea930c2 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -164,10 +164,22 @@ public function assertTranslatedHolidayName($provider, $shortName, $year, $trans if (\is_array($translations) && !empty($translations)) { foreach ($translations as $locale => $name) { - $translationExists = isset($holiday->translations[$locale]) ? true : false; + $locales = [$locale]; + $parts = \explode('_', $locale); + while (\array_pop($parts) && $parts) { + $locales[] = \implode('_', $parts); + } + + $translation = null; + foreach ($locales as $l) { + if (isset($holiday->translations[$l])) { + $translation = $holiday->translations[$l]; + break; + } + } - $this->assertTrue($translationExists); - $this->assertEquals($name, $holiday->translations[$locale]); + $this->assertTrue(isset($translation)); + $this->assertEquals($name, $translation); } } From 2ec1d6abfdf5088f2c0c8ac87f07f329e511c9a0 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 30 Sep 2019 15:42:25 +0900 Subject: [PATCH 117/133] Remove unnecessary qualifier (use imports). Removed attributes as they are the same as the parent class. Signed-off-by: Sacha Telgenhof --- .../UnitedKingdom/NorthernIreland.php | 16 +++++++------- .../Provider/UnitedKingdom/Scotland.php | 22 ++++++++++--------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php index bd8f9b610..2d261fd50 100644 --- a/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php +++ b/src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\UnitedKingdom; use Yasumi\SubstituteHoliday; @@ -35,14 +37,12 @@ class NorthernIreland extends UnitedKingdom */ public const ID = 'GB-NIR'; - public $timezone = 'Europe/Belfast'; - /** * Initialize holidays for Northern Ireland (United Kingdom). * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void @@ -64,9 +64,9 @@ public function initialize(): void * * @link https://en.wikipedia.org/wiki/Saint_Patrick%27s_Day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ @@ -110,9 +110,9 @@ private function calculateStPatricksDay(): void * * @link https://en.wikipedia.org/wiki/The_Twelfth * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index 4856319f0..61ef28c5f 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Yasumi\Exception\InvalidDateException; +use Yasumi\Exception\UnknownLocaleException; use Yasumi\Holiday; use Yasumi\Provider\UnitedKingdom; use Yasumi\SubstituteHoliday; @@ -41,18 +43,18 @@ class Scotland extends UnitedKingdom */ public const ID = 'GB-SCT'; - public $timezone = 'Europe/London'; - /** * Initialize holidays for the United Kingdom. * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ public function initialize(): void { + parent::initialize(); + // Add common holidays $this->calculateNewYearsHolidays(); $this->calculateMayDayBankHoliday(); @@ -76,9 +78,9 @@ public function initialize(): void * @link https://en.wikipedia.org/wiki/Public_holidays_in_Scotland * @link http://www.timeanddate.com/holidays/uk/new-year-day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ protected function calculateNewYearsHolidays(): void @@ -138,9 +140,9 @@ protected function calculateNewYearsHolidays(): void * @link https://www.timeanddate.com/holidays/uk/summer-bank-holiday * @link https://en.wikipedia.org/wiki/Public_holidays_in_Scotland * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception */ protected function calculateSummerBankHoliday(): void @@ -165,9 +167,9 @@ protected function calculateSummerBankHoliday(): void * * @link https://en.wikipedia.org/wiki/Saint_Andrew%27s_Day * - * @throws \Yasumi\Exception\InvalidDateException + * @throws InvalidDateException * @throws \InvalidArgumentException - * @throws \Yasumi\Exception\UnknownLocaleException + * @throws UnknownLocaleException * @throws \Exception * @throws \Exception */ From 10bc5285562b9c1d33bdd98c83b7d1c1ccac4d41 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 30 Sep 2019 15:43:27 +0900 Subject: [PATCH 118/133] Correction of nullable parameter. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/UnitedKingdom.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index dfa15391b..07c20217a 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -264,14 +264,13 @@ protected function calculateSummerBankHoliday(): void * @link http://www.timeanddate.com/holidays/uk/christmas-day * @link http://www.timeanddate.com/holidays/uk/boxing-day * - * @throws InvalidDateException - * @throws \InvalidArgumentException - * @throws UnknownLocaleException + * @param string|null $type the Holiday Type (e.g. Official, Seasonal, etc.) + * * @throws \Exception */ - protected function calculateChristmasHolidays($type = Holiday::TYPE_OFFICIAL): void + protected function calculateChristmasHolidays(string $type = null): void { - $christmasDay = $this->christmasDay($this->year, $this->timezone, $this->locale, $type); + $christmasDay = $this->christmasDay($this->year, $this->timezone, $this->locale, $type ?? Holiday::TYPE_OFFICIAL); $secondChristmasDay = $this->secondChristmasDay($this->year, $this->timezone, $this->locale, Holiday::TYPE_BANK); $this->addHoliday($christmasDay); From 7595145736578e25c9d4de12d21d1d4be839bfe9 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 30 Sep 2019 15:43:49 +0900 Subject: [PATCH 119/133] Reformatting. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 4 ++-- phpunit.xml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce560d0f4..63e903af1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,15 +6,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ## [Unreleased] ### Added +- Holiday providers for England, Wales, Scotland and Northern Ireland [\#166](https://github.com/azuyalabs/yasumi/pull/166) ([c960657](https://github.com/c960657)) - Holiday Provider for South Korea. [\#156](https://github.com/azuyalabs/yasumi/pull/156) ([blood72](https://github.com/blood72)) - Translation for the Easter holiday for the 'fr_FR' locale [\#146](https://github.com/azuyalabs/yasumi/pull/146) ([pioc92](https://github.com/pioc92)) - Translation for the Pentecost holiday for the 'fr_FR' locale [\#145](https://github.com/azuyalabs/yasumi/pull/145) ([pioc92](https://github.com/pioc92)) - Late Summer Bank Holiday in United Kingdom prior to 1965 [\#161](https://github.com/azuyalabs/yasumi/pull/161) ([c960657](https://github.com/c960657)) - Observance holidays for Sweden [\#172](https://github.com/azuyalabs/yasumi/pull/172) ([c960657](https://github.com/c960657)) +- Special subclass of Holiday for substitute holidays [\#162](https://github.com/azuyalabs/yasumi/pull/162) ([c960657](https://github.com/c960657)) - Added additional code style fixers and aligning StyleCI settings with PHP-CS. - Included extra requirement for some PHP Extensions in the composer file. -- Special subclass of Holiday for substitute holidays [\#162](https://github.com/azuyalabs/yasumi/pull/162) ([c960657](https://github.com/c960657)) -- Holiday providers for England, Wales, Scotland and Northern Ireland [\#166](https://github.com/azuyalabs/yasumi/pull/166) ([c960657](https://github.com/c960657)) ### Changed - Updated the translation for the All Saints holiday for the 'fr_FR' locale [\#152](https://github.com/azuyalabs/yasumi/pull/152) ([pioc92](https://github.com/pioc92)) diff --git a/phpunit.xml b/phpunit.xml index 2952d83e9..7cbade3eb 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -208,7 +208,6 @@ ./tests/UnitedKingdom - From 0a92d6d1e0e8e0685276276e64af1210bdb7ad67 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 30 Sep 2019 15:57:54 +0900 Subject: [PATCH 120/133] Applying the use of strict typing. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/UnitedKingdom/England.php | 3 +-- src/Yasumi/Provider/UnitedKingdom/NorthernIreland.php | 2 +- src/Yasumi/Provider/UnitedKingdom/Scotland.php | 2 +- src/Yasumi/Provider/UnitedKingdom/Wales.php | 3 +-- src/Yasumi/data/translations/secondNewYearsDay.php | 2 +- src/Yasumi/data/translations/stAndrewsDay.php | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Yasumi/Provider/UnitedKingdom/England.php b/src/Yasumi/Provider/UnitedKingdom/England.php index 5c242d86f..70c91b8e3 100644 --- a/src/Yasumi/Provider/UnitedKingdom/England.php +++ b/src/Yasumi/Provider/UnitedKingdom/England.php @@ -1,4 +1,4 @@ - Date: Mon, 30 Sep 2019 15:58:20 +0900 Subject: [PATCH 121/133] Removed unused variables. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/UnitedKingdom.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 07c20217a..8c8161d7d 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -276,9 +276,6 @@ protected function calculateChristmasHolidays(string $type = null): void $this->addHoliday($christmasDay); $this->addHoliday($secondChristmasDay); - $substituteChristmasDay = clone $christmasDay; - $substituteSecondChristmasDay = clone $secondChristmasDay; - if (\in_array((int)$christmasDay->format('w'), [0, 6], true)) { $date = clone $christmasDay; $date->add(new DateInterval('P2D')); From d5b9d0d8142949f36231286079f68ba76a950426 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 30 Sep 2019 15:58:31 +0900 Subject: [PATCH 122/133] Reformatting. Signed-off-by: Sacha Telgenhof --- src/Yasumi/Provider/AbstractProvider.php | 20 ++++++++++---------- src/Yasumi/Provider/SouthKorea.php | 2 +- src/Yasumi/SubstituteHoliday.php | 10 +++++----- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Yasumi/Provider/AbstractProvider.php b/src/Yasumi/Provider/AbstractProvider.php index 3b81a5999..427b975a3 100755 --- a/src/Yasumi/Provider/AbstractProvider.php +++ b/src/Yasumi/Provider/AbstractProvider.php @@ -314,6 +314,16 @@ public function count(): int return \count(\array_unique($names)); } + /** + * Gets all of the holidays defined by this holiday provider (for the given year). + * + * @return Holiday[] list of all holidays defined for the given year + */ + public function getHolidays(): array + { + return $this->holidays; + } + /** * Gets all of the holiday names defined by this holiday provider (for the given year). * @@ -394,16 +404,6 @@ public function getHoliday($shortName): ?Holiday return $holidays[$shortName] ?? null; } - /** - * Gets all of the holidays defined by this holiday provider (for the given year). - * - * @return Holiday[] list of all holidays defined for the given year - */ - public function getHolidays(): array - { - return $this->holidays; - } - /** * Retrieves the previous date (year) the given holiday took place. * diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index 8430bbac1..ef3111216 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -497,7 +497,7 @@ public function calculateSubstituteHolidays(): void // Find next week day (not being another holiday) while (0 === (int)$date->format('w') - || (6 === (int)$date->format('w') && 'childrensDay' === $shortName) + || (6 === (int)$date->format('w') && 'childrensDay' === $shortName) || \in_array($date, $holidayDates, false)) { $date->add(new DateInterval('P1D')); continue; diff --git a/src/Yasumi/SubstituteHoliday.php b/src/Yasumi/SubstituteHoliday.php index cb132bd0f..1b2559dc5 100755 --- a/src/Yasumi/SubstituteHoliday.php +++ b/src/Yasumi/SubstituteHoliday.php @@ -41,13 +41,13 @@ class SubstituteHoliday extends Holiday * If a holiday date needs to be defined for a specific timezone, make sure that the date instance * (DateTimeInterface) has the correct timezone set. Otherwise the default system timezone is used. * - * @param Holiday $substitutedHoliday The holiday being substituted - * @param array $names An array containing the name/description of this holiday + * @param Holiday $substitutedHoliday The holiday being substituted + * @param array $names An array containing the name/description of this holiday * in various languages. Overrides global translations - * @param \DateTimeInterface $date A DateTimeInterface instance representing the date of the holiday - * @param string $displayLocale Locale (i.e. language) in which the holiday information needs to + * @param \DateTimeInterface $date A DateTimeInterface instance representing the date of the holiday + * @param string $displayLocale Locale (i.e. language) in which the holiday information needs to * be displayed in. (Default 'en_US') - * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, + * @param string $type The type of holiday. Use the following constants: TYPE_OFFICIAL, * TYPE_OBSERVANCE, TYPE_SEASON, TYPE_BANK or TYPE_OTHER. By default * an official holiday is considered. * From 673981fb5f7f87c0daa20d35b509572c33c0519b Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 30 Sep 2019 16:07:08 +0900 Subject: [PATCH 123/133] Added missing exceptions throws. Signed-off-by: Sacha Telgenhof --- .../NorthernIreland/MayDayBankHolidayTest.php | 2 ++ .../NorthernIreland/SummerBankHolidayTest.php | 8 ++++++++ tests/UnitedKingdom/Wales/SpringBankHolidayTest.php | 2 ++ 3 files changed, 12 insertions(+) diff --git a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php index 97b4fcccf..2fd57fbde 100644 --- a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php @@ -50,7 +50,9 @@ public function testHoliday() /** * Tests the holiday exception in 1995 and 2020. + * * @throws \ReflectionException + * @throws \Exception */ public function testHolidayExceptions() { diff --git a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php index 74e54b07b..00dfa94c4 100644 --- a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php @@ -50,7 +50,9 @@ public function testHoliday() /** * Tests the holiday exception in 2020. + * * @throws \ReflectionException + * @throws \Exception */ public function testHolidayBefore1965() { @@ -66,6 +68,12 @@ public function testHolidayBefore1965() /** * Tests the holiday during trial period in 1965-1970. * @throws \ReflectionException + * @throws \Exception + * @throws \Exception + * @throws \Exception + * @throws \Exception + * @throws \Exception + * @throws \Exception */ public function testHolidayTrialPeriod() { diff --git a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php index 68ca360b4..ae79fc25f 100644 --- a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php @@ -50,7 +50,9 @@ public function testHoliday() /** * Tests the holiday exceptions in 2002 and 2012. + * * @throws \ReflectionException + * @throws \Exception */ public function testHolidayException() { From d16821cd51c17c9640b1eb1c562331580cad8a0e Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 30 Sep 2019 16:21:18 +0900 Subject: [PATCH 124/133] Applying the use of strict typing. Added missing exceptions throws. Signed-off-by: Sacha Telgenhof --- tests/Base/SubstituteHolidayTest.php | 2 +- tests/UnitedKingdom/England/BoxingDayTest.php | 2 +- tests/UnitedKingdom/England/ChristmasDayTest.php | 2 +- tests/UnitedKingdom/England/EasterMondayTest.php | 2 +- tests/UnitedKingdom/England/EnglandBaseTestCase.php | 2 +- tests/UnitedKingdom/England/EnglandTest.php | 2 +- tests/UnitedKingdom/England/GoodFridayTest.php | 2 +- tests/UnitedKingdom/England/MayDayBankHolidayTest.php | 5 ++++- tests/UnitedKingdom/England/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/England/SpringBankHolidayTest.php | 5 ++++- tests/UnitedKingdom/England/SummerBankHolidayTest.php | 6 +++++- .../UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php | 2 +- .../UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php | 2 +- .../NorthernIreland/NorthernIrelandBaseTestCase.php | 2 +- tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php | 2 +- .../UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php | 2 +- .../UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/Scotland/BoxingDayTest.php | 2 +- tests/UnitedKingdom/Scotland/ChristmasDayTest.php | 2 +- tests/UnitedKingdom/Scotland/GoodFridayTest.php | 2 +- tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php | 5 ++++- tests/UnitedKingdom/Scotland/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/Scotland/ScotlandBaseTestCase.php | 2 +- tests/UnitedKingdom/Scotland/ScotlandTest.php | 2 +- tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php | 2 +- tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/Scotland/StAndrewsDayTest.php | 2 +- tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php | 2 +- tests/UnitedKingdom/Wales/BoxingDayTest.php | 2 +- tests/UnitedKingdom/Wales/ChristmasDayTest.php | 2 +- tests/UnitedKingdom/Wales/EasterMondayTest.php | 2 +- tests/UnitedKingdom/Wales/GoodFridayTest.php | 2 +- tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php | 5 ++++- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 2 +- tests/UnitedKingdom/Wales/SpringBankHolidayTest.php | 2 +- tests/UnitedKingdom/Wales/SummerBankHolidayTest.php | 6 +++++- tests/UnitedKingdom/Wales/WalesBaseTestCase.php | 2 +- tests/UnitedKingdom/Wales/WalesTest.php | 2 +- 44 files changed, 64 insertions(+), 44 deletions(-) diff --git a/tests/Base/SubstituteHolidayTest.php b/tests/Base/SubstituteHolidayTest.php index 54f1741ad..9937835d3 100644 --- a/tests/Base/SubstituteHolidayTest.php +++ b/tests/Base/SubstituteHolidayTest.php @@ -1,4 +1,4 @@ - Date: Mon, 30 Sep 2019 16:23:23 +0900 Subject: [PATCH 125/133] Reordered arguments in Yoda style. Signed-off-by: Sacha Telgenhof --- tests/Australia/BoxingDayTest.php | 2 +- tests/Australia/ChristmasDayTest.php | 2 +- tests/Australia/NewYearsDayTest.php | 2 +- tests/Australia/SA/ChristmasDayTest.php | 2 +- tests/Denmark/SummerTimeTest.php | 2 +- tests/Finland/AllSaintsDayTest.php | 2 +- tests/SouthAfrica/SouthAfricaTest.php | 2 +- tests/Sweden/AllSaintsDayTest.php | 2 +- tests/Sweden/AllSaintsEveTest.php | 2 +- tests/YasumiBase.php | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/Australia/BoxingDayTest.php b/tests/Australia/BoxingDayTest.php index 0d40d7345..3fe4b54b3 100644 --- a/tests/Australia/BoxingDayTest.php +++ b/tests/Australia/BoxingDayTest.php @@ -50,7 +50,7 @@ public function testHoliday($year, $expected, $expectedExtra) $year, new DateTime($expected, new DateTimeZone($this->timezone)) ); - if ($expectedExtra === null) { + if (null === $expectedExtra) { $this->assertNotHoliday( $this->region, self::HOLIDAY2, diff --git a/tests/Australia/ChristmasDayTest.php b/tests/Australia/ChristmasDayTest.php index 1b756eb6f..97fecad9c 100644 --- a/tests/Australia/ChristmasDayTest.php +++ b/tests/Australia/ChristmasDayTest.php @@ -50,7 +50,7 @@ public function testHoliday($year, $expected, $expectedExtra) $year, new DateTime($expected, new DateTimeZone($this->timezone)) ); - if ($expectedExtra === null) { + if (null === $expectedExtra) { $this->assertNotHoliday( $this->region, self::HOLIDAY2, diff --git a/tests/Australia/NewYearsDayTest.php b/tests/Australia/NewYearsDayTest.php index 8436fb3da..0b0e38f61 100644 --- a/tests/Australia/NewYearsDayTest.php +++ b/tests/Australia/NewYearsDayTest.php @@ -50,7 +50,7 @@ public function testHoliday($year, $expected, $expectedExtra) $year, new DateTime($expected, new DateTimeZone($this->timezone)) ); - if ($expectedExtra === null) { + if (null === $expectedExtra) { $this->assertNotHoliday( $this->region, self::HOLIDAY2, diff --git a/tests/Australia/SA/ChristmasDayTest.php b/tests/Australia/SA/ChristmasDayTest.php index 374fc4f64..eea76245e 100644 --- a/tests/Australia/SA/ChristmasDayTest.php +++ b/tests/Australia/SA/ChristmasDayTest.php @@ -50,7 +50,7 @@ public function testHoliday($year, $expected, $expectedExtra) $year, new DateTime($expected, new DateTimeZone($this->timezone)) ); - if ($expectedExtra === null) { + if (null === $expectedExtra) { $this->assertNotHoliday( $this->region, self::HOLIDAY2, diff --git a/tests/Denmark/SummerTimeTest.php b/tests/Denmark/SummerTimeTest.php index 57326385b..04e63ca8a 100644 --- a/tests/Denmark/SummerTimeTest.php +++ b/tests/Denmark/SummerTimeTest.php @@ -43,7 +43,7 @@ public function testSummerTime() $expectedDate = new DateTime("last sunday of march $year", new DateTimeZone(self::TIMEZONE)); // Since 1980 Summertime in Denmark starts on the last day of March. In 1980 itself however, it started on April, 6th. - if ($year === 1980) { + if (1980 === $year) { $expectedDate = new DateTime('1980-04-06', new DateTimeZone(self::TIMEZONE)); } diff --git a/tests/Finland/AllSaintsDayTest.php b/tests/Finland/AllSaintsDayTest.php index 0be10f3cd..01cfce9f4 100644 --- a/tests/Finland/AllSaintsDayTest.php +++ b/tests/Finland/AllSaintsDayTest.php @@ -61,7 +61,7 @@ public function HolidayDataProvider(): array // Check between 31 October and 6th of November the day that is a Saturday for ($d = 0; $d <= 7; ++$d) { - if ($date->format('l') === 'Saturday') { + if ('Saturday' === $date->format('l')) { $data[] = [$year, $date]; break; } diff --git a/tests/SouthAfrica/SouthAfricaTest.php b/tests/SouthAfrica/SouthAfricaTest.php index 78285e679..2700c64bd 100644 --- a/tests/SouthAfrica/SouthAfricaTest.php +++ b/tests/SouthAfrica/SouthAfricaTest.php @@ -50,7 +50,7 @@ public function testOfficialHolidays(): void 'secondChristmasDay' ]; - if ($this->year === 2016) { + if (2016 === $this->year) { $officialHolidays[] = '2016MunicipalElectionsDay'; $officialHolidays[] = 'substituteDayOfGoodwill'; } diff --git a/tests/Sweden/AllSaintsDayTest.php b/tests/Sweden/AllSaintsDayTest.php index 3d7a851ae..5dc9ba06b 100644 --- a/tests/Sweden/AllSaintsDayTest.php +++ b/tests/Sweden/AllSaintsDayTest.php @@ -61,7 +61,7 @@ public function HolidayDataProvider(): array // Check between 31 October and 6th of November the day that is a Saturday for ($d = 0; $d <= 7; ++$d) { - if ($date->format('l') === 'Saturday') { + if ('Saturday' === $date->format('l')) { $data[] = [$year, $date]; break; } diff --git a/tests/Sweden/AllSaintsEveTest.php b/tests/Sweden/AllSaintsEveTest.php index 2536295bf..da1ac438c 100644 --- a/tests/Sweden/AllSaintsEveTest.php +++ b/tests/Sweden/AllSaintsEveTest.php @@ -61,7 +61,7 @@ public function HolidayDataProvider(): array // Check between 30 October and 5th of November the day that is a Friday for ($d = 0; $d <= 7; ++$d) { - if ($date->format('l') === 'Friday') { + if ('Friday' === $date->format('l')) { $data[] = [$year, $date]; break; } diff --git a/tests/YasumiBase.php b/tests/YasumiBase.php index e2ea930c2..8677c9116 100644 --- a/tests/YasumiBase.php +++ b/tests/YasumiBase.php @@ -352,7 +352,7 @@ protected function calculateEaster(int $year, string $timezone): DateTime } // Corrected date of the Paschal full moon, - days after 21st March - if (($pfm === 29) || ($pfm === 28 && $golden > 11)) { + if ((29 === $pfm) || (28 === $pfm && $golden > 11)) { --$pfm; } From 475f55df6b523151eaa90057142354b96c87e240 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 30 Sep 2019 17:49:19 +0900 Subject: [PATCH 126/133] PHP7.1 support will definitely be dropped after December 2019. Added missing contributor name. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63e903af1..eb621931c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Replaced null checks by appropriate instance / type checks. - Moved default method values to method body as parameters should be nullable. - Applying the use of strict types. Strict typing allows for improved readability, maintainability, and less prone to bugs and security vulnerabilities. -- PHP 7.1 is allowed to fail for Travis-CI due to the fact PHPUnit 8 requires PHP >= 7.2. Likely 7.1 support will be dropped in Yasumi once 7.1 has reached its end of life (December 2019). +- PHP 7.1 is allowed to fail for Travis-CI due to the fact PHPUnit 8 requires PHP >= 7.2. PHP 7.1 support will be dropped in Yasumi once 7.1 has reached its end of life (December 2019). - Code using class imports rather than Fully Qualified Class names. - Upgraded to PHPUnit 8. - Replaced the standard 'InvalidArgumentException' when an invalid year or holiday provider are given by a new exception for each of these two situations separately ('InvalidYearException' and 'ProviderNotFoundException'). This allows you to better distinguish which exception may occur when instantiating the Yasumi class. [\#95](https://github.com/azuyalabs/yasumi/pull/95) ([qneyrat](https://github.com/qneyrat)) @@ -37,7 +37,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Late Summer Bank Holiday in 1968 and 1969 in United Kingdom [\#161](https://github.com/azuyalabs/yasumi/pull/161) ([c960657](https://github.com/c960657)) - Fixed one-off exceptions for May Day Bank Holiday in 1995 and 2020 and Spring Bank Holiday in 2002 and 2012 (United Kingdom) [\#160](https://github.com/azuyalabs/yasumi/pull/160) ([c960657](https://github.com/c960657)) - Fixed revoked holidays in Portugal in 2013-2015 [\#163](https://github.com/azuyalabs/yasumi/pull/163) ([c960657](https://github.com/c960657)) -- Fixed spelling issues in the Danish translation for Second Christmas Day. [\#167](https://github.com/azuyalabs/yasumi/pull/167) +- Fixed spelling issues in the Danish translation for Second Christmas Day. [\#167](https://github.com/azuyalabs/yasumi/pull/167) ([c960657](https://github.com/c960657)) - Corpus Christi is official in Poland [\#168](https://github.com/azuyalabs/yasumi/pull/168) ([c960657](https://github.com/c960657)) - Liberation Day is official in the Netherlands [\#169](https://github.com/azuyalabs/yasumi/pull/169) ([c960657](https://github.com/c960657)) - Typos in Easter Monday and Republic Day for the 'it_IT' locale [\#171](https://github.com/azuyalabs/yasumi/pull/171) ([c960657](https://github.com/c960657)) From 21742daddc0096d1b41f76013a84d21fda22e3b2 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Mon, 30 Sep 2019 21:58:40 +0900 Subject: [PATCH 127/133] Enforcing trailing comma in multi-line array definitions. This allows for cleaner commits and quicker adding new entries. Signed-off-by: Sacha Telgenhof --- .php_cs | 15 ++++++++------- .styleci.yml | 3 ++- src/Yasumi/Provider/Belgium.php | 2 +- src/Yasumi/Provider/Bosnia.php | 10 +++++----- src/Yasumi/Provider/Croatia.php | 8 ++++---- src/Yasumi/Provider/CzechRepublic.php | 10 +++++----- src/Yasumi/Provider/Estonia.php | 6 +++--- src/Yasumi/Provider/France.php | 2 +- src/Yasumi/Provider/Hungary.php | 6 +++--- src/Yasumi/Provider/Japan.php | 10 +++++----- src/Yasumi/Provider/Latvia.php | 6 +++--- src/Yasumi/Provider/Lithuania.php | 6 +++--- src/Yasumi/Provider/Poland.php | 4 ++-- src/Yasumi/Provider/Romania.php | 10 +++++----- src/Yasumi/Provider/Russia.php | 14 +++++++------- src/Yasumi/Provider/Slovakia.php | 12 ++++++------ src/Yasumi/Provider/SouthKorea.php | 10 +++++----- src/Yasumi/Provider/Spain/Galicia.php | 4 ++-- src/Yasumi/Provider/Spain/LaRioja.php | 2 +- src/Yasumi/Provider/Spain/RegionOfMurcia.php | 2 +- src/Yasumi/Provider/Spain/ValencianCommunity.php | 2 +- src/Yasumi/Provider/Switzerland.php | 4 ++-- src/Yasumi/Provider/Switzerland/Geneva.php | 2 +- src/Yasumi/Provider/Switzerland/Neuchatel.php | 2 +- src/Yasumi/Provider/Switzerland/Obwalden.php | 2 +- src/Yasumi/Provider/USA.php | 16 ++++++++-------- src/Yasumi/Provider/Ukraine.php | 2 +- src/Yasumi/Yasumi.php | 2 +- src/Yasumi/data/locales.php | 2 +- src/Yasumi/data/translations/allSaintsDay.php | 2 +- src/Yasumi/data/translations/allSaintsEve.php | 2 +- src/Yasumi/data/translations/anzacDay.php | 2 +- src/Yasumi/data/translations/armisticeDay.php | 2 +- src/Yasumi/data/translations/ascensionDay.php | 2 +- src/Yasumi/data/translations/ashWednesday.php | 2 +- .../data/translations/assumptionOfMary.php | 2 +- .../data/translations/carnationRevolutionDay.php | 2 +- src/Yasumi/data/translations/christmasDay.php | 2 +- src/Yasumi/data/translations/christmasEve.php | 2 +- src/Yasumi/data/translations/corpusChristi.php | 2 +- .../data/translations/dayAfterNewYearsDay.php | 2 +- .../data/translations/dayOfReformation.php | 2 +- src/Yasumi/data/translations/easter.php | 2 +- src/Yasumi/data/translations/easterMonday.php | 2 +- src/Yasumi/data/translations/epiphany.php | 2 +- src/Yasumi/data/translations/epiphanyEve.php | 2 +- src/Yasumi/data/translations/fathersDay.php | 2 +- src/Yasumi/data/translations/goodFriday.php | 2 +- .../data/translations/immaculateConception.php | 2 +- .../data/translations/internationalWomensDay.php | 2 +- .../translations/internationalWorkersDay.php | 2 +- src/Yasumi/data/translations/labourDay.php | 2 +- src/Yasumi/data/translations/maundyThursday.php | 2 +- src/Yasumi/data/translations/mothersDay.php | 2 +- src/Yasumi/data/translations/newYearsDay.php | 2 +- src/Yasumi/data/translations/newYearsEve.php | 2 +- src/Yasumi/data/translations/pentecost.php | 2 +- src/Yasumi/data/translations/pentecostMonday.php | 2 +- src/Yasumi/data/translations/portugalDay.php | 2 +- .../data/translations/portugueseRepublicDay.php | 2 +- src/Yasumi/data/translations/reformationDay.php | 2 +- .../data/translations/restorationOfIndepence.php | 2 +- .../data/translations/secondChristmasDay.php | 2 +- src/Yasumi/data/translations/stDavidsDay.php | 2 +- src/Yasumi/data/translations/stGeorgesDay.php | 2 +- src/Yasumi/data/translations/stJohnsDay.php | 2 +- src/Yasumi/data/translations/stJohnsEve.php | 2 +- src/Yasumi/data/translations/stJosephsDay.php | 2 +- src/Yasumi/data/translations/stStephensDay.php | 2 +- src/Yasumi/data/translations/summerTime.php | 2 +- src/Yasumi/data/translations/valentinesDay.php | 2 +- .../data/translations/victoryInEuropeDay.php | 2 +- src/Yasumi/data/translations/waitangiDay.php | 2 +- src/Yasumi/data/translations/walpurgisEve.php | 2 +- src/Yasumi/data/translations/winterTime.php | 2 +- src/Yasumi/data/translations/worldAnimalDay.php | 2 +- tests/Australia/ACT/ACTTest.php | 2 +- tests/Australia/ACT/CanberraDayTest.php | 2 +- tests/Australia/ACT/LabourDayTest.php | 2 +- tests/Australia/ACT/QueensBirthdayTest.php | 2 +- tests/Australia/ACT/ReconciliationDayTest.php | 2 +- tests/Australia/AnzacDayTest.php | 2 +- tests/Australia/AustraliaDayTest.php | 2 +- tests/Australia/AustraliaTest.php | 2 +- tests/Australia/BoxingDayTest.php | 2 +- tests/Australia/ChristmasDayTest.php | 2 +- tests/Australia/EasterMondayTest.php | 2 +- tests/Australia/NSW/BankHolidayTest.php | 2 +- tests/Australia/NSW/LabourDayTest.php | 2 +- tests/Australia/NSW/NSWTest.php | 4 ++-- tests/Australia/NSW/QueensBirthdayTest.php | 2 +- tests/Australia/NT/MayDayTest.php | 2 +- tests/Australia/NT/NTTest.php | 2 +- tests/Australia/NT/PicnicDayTest.php | 2 +- tests/Australia/NT/QueensBirthdayTest.php | 2 +- tests/Australia/NewYearsDayTest.php | 2 +- .../Queensland/Brisbane/BrisbaneTest.php | 2 +- .../Queensland/Brisbane/PeoplesDayTest.php | 2 +- tests/Australia/Queensland/LabourDayTest.php | 2 +- .../Australia/Queensland/QueensBirthdayTest.php | 2 +- tests/Australia/Queensland/QueenslandTest.php | 2 +- tests/Australia/SA/AdelaideCupDayTest.php | 2 +- tests/Australia/SA/ChristmasDayTest.php | 2 +- tests/Australia/SA/LabourDayTest.php | 2 +- tests/Australia/SA/ProclamationDayTest.php | 2 +- tests/Australia/SA/QueensBirthdayTest.php | 2 +- tests/Australia/SA/SATest.php | 2 +- .../Tasmania/CentralNorth/CentralNorthTest.php | 2 +- .../Tasmania/CentralNorth/DevonportShowTest.php | 2 +- tests/Australia/Tasmania/EightHourDayTest.php | 2 +- .../FlindersIsland/FlindersIslandShowTest.php | 2 +- .../FlindersIsland/FlindersIslandTest.php | 2 +- .../Tasmania/KingIsland/KingIslandShowTest.php | 2 +- .../Tasmania/KingIsland/KingIslandTest.php | 2 +- .../Tasmania/Northeast/LauncestonShowTest.php | 2 +- .../Tasmania/Northeast/NortheastTest.php | 2 +- .../Tasmania/Northwest/BurnieShowTest.php | 2 +- .../Northwest/CircularHead/AGFESTTest.php | 2 +- .../Northwest/CircularHead/CircularHeadTest.php | 2 +- .../Tasmania/Northwest/NorthwestTest.php | 2 +- tests/Australia/Tasmania/QueensBirthdayTest.php | 2 +- tests/Australia/Tasmania/RecreationDayTest.php | 2 +- .../Australia/Tasmania/South/HobartShowTest.php | 2 +- tests/Australia/Tasmania/South/SouthTest.php | 2 +- .../South/Southeast/HobartRegattaTest.php | 2 +- .../Tasmania/South/Southeast/SoutheastTest.php | 2 +- tests/Australia/Tasmania/TasmaniaTest.php | 2 +- .../Victoria/AFLGrandFinalFridayTest.php | 2 +- tests/Australia/Victoria/LabourDayTest.php | 2 +- tests/Australia/Victoria/MelbourneCupDayTest.php | 2 +- tests/Australia/Victoria/QueensBirthdayTest.php | 2 +- tests/Australia/Victoria/VictoriaTest.php | 2 +- tests/Australia/WA/LabourDayTest.php | 2 +- tests/Australia/WA/QueensBirthdayTest.php | 2 +- tests/Australia/WA/WATest.php | 2 +- tests/Australia/WA/WesternAustraliaDayTest.php | 2 +- tests/Austria/AustriaTest.php | 2 +- tests/Base/HolidayOnFilterTest.php | 4 ++-- tests/Base/HolidayTest.php | 8 ++++---- tests/Base/TranslationsTest.php | 6 +++--- tests/Belgium/BelgiumTest.php | 2 +- tests/Bosnia/BosniaTest.php | 2 +- tests/Brazil/BrazilTest.php | 4 ++-- tests/CzechRepublic/CzechRepublicTest.php | 2 +- tests/Denmark/DenmarkTest.php | 4 ++-- tests/Estonia/EstoniaTest.php | 2 +- tests/Finland/FinlandTest.php | 2 +- tests/France/BasRhin/BasRhinTest.php | 2 +- tests/France/FranceTest.php | 2 +- tests/France/HautRhin/HautRhinTest.php | 2 +- tests/France/Moselle/MoselleTest.php | 2 +- .../BadenWurttemberg/BadenWurttembergTest.php | 2 +- tests/Germany/Bavaria/BavariaTest.php | 2 +- tests/Germany/Berlin/BerlinTest.php | 2 +- tests/Germany/Brandenburg/BrandenburgTest.php | 2 +- tests/Germany/Bremen/BremenTest.php | 2 +- tests/Germany/GermanyTest.php | 2 +- tests/Germany/Hamburg/HamburgTest.php | 2 +- tests/Germany/Hesse/HesseTest.php | 2 +- tests/Germany/LowerSaxony/LowerSaxonyTest.php | 2 +- .../MecklenburgWesternPomeraniaTest.php | 2 +- .../NorthRhineWestphaliaTest.php | 2 +- .../RhinelandPalatinateTest.php | 2 +- tests/Germany/Saarland/SaarlandTest.php | 4 ++-- tests/Germany/Saxony/SaxonyTest.php | 2 +- tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php | 2 +- .../SchleswigHolstein/SchleswigHolsteinTest.php | 2 +- tests/Germany/Thuringia/ThuringiaTest.php | 2 +- tests/Greece/GreeceTest.php | 2 +- tests/Hungary/HungaryTest.php | 2 +- tests/Italy/ItalyTest.php | 2 +- tests/Japan/AutumnalEquinoxDayTest.php | 2 +- tests/Japan/JapanTest.php | 4 ++-- tests/Japan/VernalEquinoxDayTest.php | 2 +- tests/Latvia/LatviaTest.php | 2 +- .../ProclamationOfTheRepublicOfLatviaDayTest.php | 2 +- .../Latvia/RestorationOfIndependenceDayTest.php | 2 +- tests/Lithuania/LithuaniaTest.php | 2 +- tests/Netherlands/NetherlandsTest.php | 6 +++--- tests/NewZealand/NewZealandTest.php | 2 +- tests/Norway/NorwayTest.php | 2 +- tests/Poland/PolandTest.php | 2 +- tests/Portugal/PortugalTest.php | 2 +- tests/Romania/RomaniaTest.php | 2 +- tests/Russia/RussiaTest.php | 2 +- tests/Slovakia/EasterMondayTest.php | 2 +- tests/Slovakia/GoodFridayTest.php | 2 +- tests/Slovakia/SlovakiaTest.php | 4 ++-- tests/SouthAfrica/SouthAfricaTest.php | 2 +- tests/Spain/Andalusia/AndalusiaTest.php | 4 ++-- tests/Spain/Aragon/AragonTest.php | 4 ++-- tests/Spain/Asturias/AsturiasTest.php | 4 ++-- .../BalearicIslands/BalearicIslandsTest.php | 4 ++-- tests/Spain/BasqueCountry/BasqueCountryTest.php | 4 ++-- tests/Spain/CanaryIslands/CanaryIslandsTest.php | 4 ++-- tests/Spain/Cantabria/CantabriaTest.php | 4 ++-- .../Spain/CastileAndLeon/CastileAndLeonTest.php | 4 ++-- .../CastillaLaMancha/CastillaLaManchaTest.php | 4 ++-- tests/Spain/Catalonia/CataloniaTest.php | 4 ++-- tests/Spain/Ceuta/CeutaTest.php | 4 ++-- .../CommunityOfMadrid/CommunityOfMadridTest.php | 4 ++-- tests/Spain/Extremadura/ExtremaduraTest.php | 4 ++-- tests/Spain/Galicia/GaliciaTest.php | 4 ++-- tests/Spain/LaRioja/LaRiojaTest.php | 4 ++-- tests/Spain/Melilla/MelillaTest.php | 4 ++-- tests/Spain/Navarre/NavarreTest.php | 4 ++-- .../Spain/RegionOfMurcia/RegionOfMurciaTest.php | 4 ++-- tests/Spain/SpainTest.php | 2 +- .../ValencianCommunityTest.php | 4 ++-- tests/Sweden/SwedenTest.php | 4 ++-- tests/Switzerland/Aargau/AargauTest.php | 2 +- .../AppenzellAusserrhodenTest.php | 2 +- .../AppenzellInnerrhodenTest.php | 2 +- .../BaselLandschaft/BaselLandschaftTest.php | 2 +- tests/Switzerland/BaselStadt/BaselStadtTest.php | 2 +- tests/Switzerland/Bern/BernTest.php | 2 +- tests/Switzerland/Fribourg/FribourgTest.php | 2 +- tests/Switzerland/Geneva/GenevaTest.php | 2 +- tests/Switzerland/Glarus/GlarusTest.php | 2 +- tests/Switzerland/Grisons/GrisonsTest.php | 2 +- tests/Switzerland/Jura/JuraTest.php | 2 +- tests/Switzerland/Lucerne/LucerneTest.php | 2 +- tests/Switzerland/Neuchatel/NeuchatelTest.php | 2 +- tests/Switzerland/Nidwalden/NidwaldenTest.php | 2 +- tests/Switzerland/Obwalden/ObwaldenTest.php | 2 +- .../Schaffhausen/SchaffhausenTest.php | 2 +- tests/Switzerland/Schwyz/SchwyzTest.php | 2 +- tests/Switzerland/Solothurn/SolothurnTest.php | 2 +- tests/Switzerland/StGallen/StGallenTest.php | 2 +- tests/Switzerland/Thurgau/ThurgauTest.php | 2 +- tests/Switzerland/Ticino/TicinoTest.php | 2 +- tests/Switzerland/Uri/UriTest.php | 2 +- tests/Switzerland/Valais/ValaisTest.php | 2 +- tests/Switzerland/Vaud/VaudTest.php | 2 +- tests/Switzerland/Zug/ZugTest.php | 2 +- tests/Switzerland/Zurich/ZurichTest.php | 2 +- tests/USA/USATest.php | 2 +- tests/Ukraine/UkraineTest.php | 2 +- tests/UnitedKingdom/England/EnglandTest.php | 2 +- .../NorthernIreland/NorthernIrelandTest.php | 2 +- tests/UnitedKingdom/UnitedKingdomTest.php | 4 ++-- tests/UnitedKingdom/Wales/WalesTest.php | 2 +- 242 files changed, 337 insertions(+), 335 deletions(-) diff --git a/.php_cs b/.php_cs index c145f4e81..231c3b0a2 100644 --- a/.php_cs +++ b/.php_cs @@ -13,11 +13,12 @@ $finder = PhpCsFixer\Finder::create()->in(__DIR__); return PhpCsFixer\Config::create()->setRiskyAllowed(true)->setRules([ - '@PSR2' => true, - 'array_syntax' => ['syntax' => 'short'], - 'native_function_invocation' => true, - 'ordered_imports' => ['sortAlgorithm' => 'alpha'], - 'no_unused_imports' => true, - 'single_quote' => true, - 'space_after_semicolon' => true + '@PSR2' => true, + 'array_syntax' => ['syntax' => 'short'], + 'native_function_invocation' => true, + 'ordered_imports' => ['sortAlgorithm' => 'alpha'], + 'no_unused_imports' => true, + 'single_quote' => true, + 'space_after_semicolon' => true, + 'trailing_comma_in_multiline_array' => true ])->setLineEnding("\n")->setFinder($finder); \ No newline at end of file diff --git a/.styleci.yml b/.styleci.yml index 29d6b06ca..b508228b0 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -8,4 +8,5 @@ enabled: - alpha_ordered_imports - no_unused_imports - single_quote - - space_after_semicolon \ No newline at end of file + - space_after_semicolon + - trailing_comma_in_multiline_array \ No newline at end of file diff --git a/src/Yasumi/Provider/Belgium.php b/src/Yasumi/Provider/Belgium.php index b1059dcc8..720a68c56 100755 --- a/src/Yasumi/Provider/Belgium.php +++ b/src/Yasumi/Provider/Belgium.php @@ -66,7 +66,7 @@ public function initialize(): void $this->addHoliday(new Holiday('nationalDay', [ 'fr' => 'Fête nationale', 'en' => 'Belgian National Day', - 'nl' => 'Nationale feestdag' + 'nl' => 'Nationale feestdag', ], new DateTime("$this->year-7-21", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Bosnia.php b/src/Yasumi/Provider/Bosnia.php index c2b1524a6..5ec2b109a 100644 --- a/src/Yasumi/Provider/Bosnia.php +++ b/src/Yasumi/Provider/Bosnia.php @@ -58,7 +58,7 @@ public function initialize(): void $this->addHoliday(new Holiday('orthodoxChristmasDay', [ 'en' => 'Orthodox Christmas Day', - 'bs_Latn' => 'Pravoslavni Božić' + 'bs_Latn' => 'Pravoslavni Božić', ], new DateTime("{$this->year}-01-07", new DateTimeZone($this->timezone)))); /** @@ -67,7 +67,7 @@ public function initialize(): void if ($this->year >= 1992) { $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', - 'bs_Latn' => 'Dan Nezavisnosti' + 'bs_Latn' => 'Dan Nezavisnosti', ], new DateTime("$this->year-3-1", new DateTimeZone($this->timezone)), $this->locale)); } @@ -77,7 +77,7 @@ public function initialize(): void if ($this->year >= 1943) { $this->addHoliday(new Holiday('statehoodDay', [ 'en' => 'Statehood Day', - 'bs_Latn' => 'Dan državnosti' + 'bs_Latn' => 'Dan državnosti', ], new DateTime("$this->year-11-25", new DateTimeZone($this->timezone)), $this->locale)); } @@ -86,7 +86,7 @@ public function initialize(): void */ $this->addHoliday(new Holiday('dayAfterNewYearsDay', [ 'en' => 'Day after New Year\'s Day', - 'bs_Latn' => 'Nova godina - drugi dan' + 'bs_Latn' => 'Nova godina - drugi dan', ], new DateTime("$this->year-01-02", new DateTimeZone($this->timezone)), $this->locale)); /** @@ -94,7 +94,7 @@ public function initialize(): void */ $this->addHoliday(new Holiday('secondLabourDay', [ 'en' => 'Second Labour Day', - 'bs_Latn' => 'Praznik rada - drugi dan' + 'bs_Latn' => 'Praznik rada - drugi dan', ], new DateTime("$this->year-05-02", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Croatia.php b/src/Yasumi/Provider/Croatia.php index 87e219c03..c59ae4f2e 100644 --- a/src/Yasumi/Provider/Croatia.php +++ b/src/Yasumi/Provider/Croatia.php @@ -65,7 +65,7 @@ public function initialize(): void if ($this->year >= 1941) { $this->addHoliday(new Holiday('antifascistStruggleDay', [ 'en' => 'Day of Antifascist Struggle', - 'hr' => 'Dan antifašističke borbe' + 'hr' => 'Dan antifašističke borbe', ], new DateTime("$this->year-6-22", new DateTimeZone($this->timezone)), $this->locale)); } @@ -75,7 +75,7 @@ public function initialize(): void if ($this->year >= 1991) { $this->addHoliday(new Holiday('statehoodDay', [ 'en' => 'Statehood Day', - 'hr' => 'Dan državnosti' + 'hr' => 'Dan državnosti', ], new DateTime("$this->year-6-25", new DateTimeZone($this->timezone)), $this->locale)); } @@ -85,7 +85,7 @@ public function initialize(): void if ($this->year >= 1995) { $this->addHoliday(new Holiday('homelandThanksgiving', [ 'en' => 'Homeland Thanksgiving Day', - 'hr' => 'Dan domovinske zahvalnosti' + 'hr' => 'Dan domovinske zahvalnosti', ], new DateTime("$this->year-8-5", new DateTimeZone($this->timezone)), $this->locale)); } @@ -95,7 +95,7 @@ public function initialize(): void if ($this->year >= 1991) { $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', - 'hr' => 'Dan neovisnosti' + 'hr' => 'Dan neovisnosti', ], new DateTime("$this->year-10-8", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/CzechRepublic.php b/src/Yasumi/Provider/CzechRepublic.php index 74a652888..2e01b3b91 100644 --- a/src/Yasumi/Provider/CzechRepublic.php +++ b/src/Yasumi/Provider/CzechRepublic.php @@ -78,7 +78,7 @@ private function calculateRenewalOfCzechIndependenceDay(): void 'czechRenewalOfIndependentStateDay', [ 'cs' => 'Den obnovy samostatného českého státu', - 'en' => 'Day of renewal of the independent Czech state' + 'en' => 'Day of renewal of the independent Czech state', ], new DateTime($this->year . '-01-01', new \DateTimeZone($this->timezone)), $this->locale @@ -112,7 +112,7 @@ private function calculateSaintsCyrilAndMethodiusDay(): void 'saintsCyrilAndMethodiusDay', [ 'cs' => 'Den slovanských věrozvěstů Cyrila a Metoděje', - 'en' => 'Saints Cyril and Methodius Day' + 'en' => 'Saints Cyril and Methodius Day', ], new DateTime($this->year . '-07-5', new \DateTimeZone($this->timezone)), $this->locale @@ -168,7 +168,7 @@ private function calculateCzechStatehoodDay(): void 'czechStateHoodDay', [ 'cs' => 'Den české státnosti', - 'en' => 'St. Wenceslas Day (Czech Statehood Day)' + 'en' => 'St. Wenceslas Day (Czech Statehood Day)', ], new DateTime($this->year . '-09-28', new \DateTimeZone($this->timezone)), $this->locale @@ -189,7 +189,7 @@ private function calculateIndependentCzechoslovakStateDay(): void { $this->addHoliday(new Holiday('independentCzechoslovakStateDay', [ 'cs' => 'Den vzniku samostatného československého státu', - 'en' => 'Independent Czechoslovak State Day' + 'en' => 'Independent Czechoslovak State Day', ], new DateTime($this->year . '-10-28', new \DateTimeZone($this->timezone)), $this->locale)); } @@ -209,7 +209,7 @@ private function calculateStruggleForFreedomAndDemocracyDay(): void 'struggleForFreedomAndDemocracyDay', [ 'cs' => 'Den boje za svobodu a demokracii', - 'en' => 'Struggle for Freedom and Democracy Day' + 'en' => 'Struggle for Freedom and Democracy Day', ], new DateTime($this->year . '-11-17', new \DateTimeZone($this->timezone)), $this->locale diff --git a/src/Yasumi/Provider/Estonia.php b/src/Yasumi/Provider/Estonia.php index d863ecf5c..3a51713c7 100644 --- a/src/Yasumi/Provider/Estonia.php +++ b/src/Yasumi/Provider/Estonia.php @@ -70,7 +70,7 @@ private function addIndependenceDay(): void if ($this->year >= self::DECLARATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', - 'et' => 'Iseseisvuspäev' + 'et' => 'Iseseisvuspäev', ], new \DateTime("{$this->year}-02-24", new \DateTimeZone($this->timezone)))); } } @@ -84,7 +84,7 @@ private function addVictoryDay(): void if ($this->year >= self::VICTORY_DAY_START_YEAR) { $this->addHoliday(new Holiday('victoryDay', [ 'en' => 'Victory Day', - 'et' => 'Võidupüha' + 'et' => 'Võidupüha', ], new \DateTime("{$this->year}-06-23", new \DateTimeZone($this->timezone)))); } } @@ -98,7 +98,7 @@ private function addRestorationOfIndependenceDay(): void if ($this->year >= self::RESTORATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday('restorationOfIndependenceDay', [ 'en' => 'Day of Restoration of Independence', - 'et' => 'Tasiseseisvumispäev' + 'et' => 'Tasiseseisvumispäev', ], new \DateTime("{$this->year}-08-20", new \DateTimeZone($this->timezone)))); } } diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php index 8fa0c789e..a166907dd 100755 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -89,7 +89,7 @@ private function calculateBastilleDay(): void if ($this->year >= 1790) { $this->addHoliday(new Holiday('bastilleDay', [ 'en' => 'Bastille Day', - 'fr' => 'La Fête nationale' + 'fr' => 'La Fête nationale', ], new DateTime("$this->year-7-14", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Hungary.php b/src/Yasumi/Provider/Hungary.php index 11e8715ac..73c36cc53 100644 --- a/src/Yasumi/Provider/Hungary.php +++ b/src/Yasumi/Provider/Hungary.php @@ -67,7 +67,7 @@ public function initialize(): void if ($this->year >= 1927) { $this->addHoliday(new Holiday('memorialDay1848', [ 'en' => 'Memorial day of the 1848 Revolution', - 'hu' => 'Az 1848-as forradalom ünnepe' + 'hu' => 'Az 1848-as forradalom ünnepe', ], new DateTime("$this->year-3-15", new DateTimeZone($this->timezone)), $this->locale)); } @@ -77,7 +77,7 @@ public function initialize(): void if ($this->year >= 1891) { $this->addHoliday(new Holiday('stateFoundation', [ 'en' => 'State Foundation Day', - 'hu' => 'Az államalapítás ünnepe' + 'hu' => 'Az államalapítás ünnepe', ], new DateTime("$this->year-8-20", new DateTimeZone($this->timezone)), $this->locale)); } @@ -87,7 +87,7 @@ public function initialize(): void if ($this->year >= 1991) { $this->addHoliday(new Holiday('memorialDay1956', [ 'en' => 'Memorial day of the 1956 Revolution', - 'hu' => 'Az 1956-os forradalom ünnepe' + 'hu' => 'Az 1956-os forradalom ünnepe', ], new DateTime("$this->year-10-23", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Japan.php b/src/Yasumi/Provider/Japan.php index 0a7ce2bcc..60f187909 100755 --- a/src/Yasumi/Provider/Japan.php +++ b/src/Yasumi/Provider/Japan.php @@ -121,7 +121,7 @@ private function calculateNationalFoundationDay(): void 'nationalFoundationDay', [ 'en' => 'National Foundation Day', - 'ja' => '建国記念の日' + 'ja' => '建国記念の日', ], new DateTime("$this->year-2-11", new DateTimeZone($this->timezone)), $this->locale @@ -141,7 +141,7 @@ private function calculateShowaDay(): void 'showaDay', [ 'en' => 'Showa Day', - 'ja' => '昭和の日' + 'ja' => '昭和の日', ], new DateTime("$this->year-4-29", new DateTimeZone($this->timezone)), $this->locale @@ -161,7 +161,7 @@ private function calculateConstitutionMemorialDay(): void 'constitutionMemorialDay', [ 'en' => 'Constitution Memorial Day', - 'ja' => '憲法記念日' + 'ja' => '憲法記念日', ], new DateTime("$this->year-5-3", new DateTimeZone($this->timezone)), $this->locale @@ -181,7 +181,7 @@ private function calculateChildrensDay(): void 'childrensDay', [ 'en' => 'Children\'s Day', - 'ja' => 'こどもの日' + 'ja' => 'こどもの日', ], new DateTime("$this->year-5-5", new DateTimeZone($this->timezone)), $this->locale @@ -639,7 +639,7 @@ private function calculateBridgeHolidays(): void $this->addHoliday(new Holiday('bridgeDay' . $counter, [ 'en' => 'Bridge Public holiday', - 'ja' => '国民の休日' + 'ja' => '国民の休日', ], $bridgeDate, $this->locale)); $counter++; } diff --git a/src/Yasumi/Provider/Latvia.php b/src/Yasumi/Provider/Latvia.php index 08a6fd059..89b81bf0b 100644 --- a/src/Yasumi/Provider/Latvia.php +++ b/src/Yasumi/Provider/Latvia.php @@ -78,7 +78,7 @@ private function addRestorationOfIndependenceDay(): void $this->addHoliday(new Holiday('restorationOfIndependenceOfLatviaDay', [ 'en' => 'Restoration of Independence day', - 'lv' => 'Latvijas Republikas Neatkarības atjaunošanas diena' + 'lv' => 'Latvijas Republikas Neatkarības atjaunošanas diena', ], $date)); } } @@ -91,7 +91,7 @@ private function addMidsummerEveDay(): void { $this->addHoliday(new Holiday('midsummerEveDay', [ 'en' => 'Midsummer Eve', - 'lv' => 'Līgo Diena' + 'lv' => 'Līgo Diena', ], new \DateTime("{$this->year}-06-23", new \DateTimeZone($this->timezone)))); } @@ -113,7 +113,7 @@ private function addProclamationDay(): void $this->addHoliday(new Holiday('proclamationOfTheRepublicOfLatviaDay', [ 'en' => 'Proclamation Day of the Republic of Latvia', - 'lv' => 'Latvijas Republikas proklamēšanas diena' + 'lv' => 'Latvijas Republikas proklamēšanas diena', ], $date)); } } diff --git a/src/Yasumi/Provider/Lithuania.php b/src/Yasumi/Provider/Lithuania.php index 79a4b10ff..c112f4418 100644 --- a/src/Yasumi/Provider/Lithuania.php +++ b/src/Yasumi/Provider/Lithuania.php @@ -82,7 +82,7 @@ private function addRestorationOfTheStateDay(): void if ($this->year >= self::RESTORATION_OF_THE_STATE_YEAR) { $this->addHoliday(new Holiday('restorationOfTheStateOfLithuaniaDay', [ 'en' => 'Day of Restoration of the State of Lithuania', - 'lt' => 'Lietuvos valstybės atkūrimo diena' + 'lt' => 'Lietuvos valstybės atkūrimo diena', ], new \DateTime("{$this->year}-02-16", new \DateTimeZone($this->timezone)))); } } @@ -98,7 +98,7 @@ private function addRestorationOfIndependenceDay(): void if ($this->year >= self::RESTORATION_OF_INDEPENDENCE_YEAR) { $this->addHoliday(new Holiday('restorationOfIndependenceOfLithuaniaDay', [ 'en' => 'Day of Restoration of Independence of Lithuania', - 'lt' => 'Lietuvos nepriklausomybės atkūrimo diena' + 'lt' => 'Lietuvos nepriklausomybės atkūrimo diena', ], new \DateTime("{$this->year}-03-11", new \DateTimeZone($this->timezone)))); } } @@ -115,7 +115,7 @@ private function addStatehoodDay(): void if ($this->year >= self::STATEHOOD_YEAR) { $this->addHoliday(new Holiday('statehoodDay', [ 'en' => 'Statehood Day (Lithuania)', - 'lt' => 'Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena' + 'lt' => 'Valstybės (Lietuvos karaliaus Mindaugo karūnavimo) diena', ], new \DateTime("{$this->year}-07-06", new \DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Poland.php b/src/Yasumi/Provider/Poland.php index 4f9223877..8794aa0c1 100755 --- a/src/Yasumi/Provider/Poland.php +++ b/src/Yasumi/Provider/Poland.php @@ -87,7 +87,7 @@ private function calculateIndependenceDay(): void $this->addHoliday(new Holiday('independenceDay', [ 'en' => 'Independence Day', - 'pl' => 'Narodowe Święto Niepodległości' + 'pl' => 'Narodowe Święto Niepodległości', ], new DateTime("$this->year-11-11", new DateTimeZone($this->timezone)), $this->locale)); } @@ -115,7 +115,7 @@ private function calculateConstitutionDay(): void $this->addHoliday(new Holiday('constitutionDay', [ 'en' => 'Constitution Day', - 'pl' => 'Święto Narodowe Trzeciego Maja' + 'pl' => 'Święto Narodowe Trzeciego Maja', ], new DateTime("$this->year-5-3", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Romania.php b/src/Yasumi/Provider/Romania.php index 957b2f746..41f069077 100755 --- a/src/Yasumi/Provider/Romania.php +++ b/src/Yasumi/Provider/Romania.php @@ -117,7 +117,7 @@ private function calculateUnitedPrincipalitiesDay(): void if ($this->year > 2014) { $this->addHoliday(new Holiday('unitedPrincipalitiesDay', [ 'en' => 'Union Day / Small Union', - 'ro' => 'Unirea Principatelor Române / Mica Unire' + 'ro' => 'Unirea Principatelor Române / Mica Unire', ], new DateTime("$this->year-01-24", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -182,7 +182,7 @@ private function calculateNationalDay(): void if (\is_string($national_day)) { $this->addHoliday(new Holiday('nationalDay', [ 'en' => 'National Day', - 'ro' => 'Ziua Națională' + 'ro' => 'Ziua Națională', ], new DateTime($national_day, new DateTimeZone($this->timezone)), $this->locale)); } } @@ -205,7 +205,7 @@ private function calculateConstantinBrancusiDay(): void 'constantinBrancusiDay', [ 'en' => 'Constantin Brâncuși day', - 'ro' => 'Ziua Constantin Brâncuși' + 'ro' => 'Ziua Constantin Brâncuși', ], new DateTime("$this->year-02-19", new DateTimeZone($this->timezone)), $this->locale, @@ -234,7 +234,7 @@ private function calculateChildrensDay(): void 'childrensDay', [ 'en' => 'International Children\'s Day', - 'ro' => 'Ziua Copilului' + 'ro' => 'Ziua Copilului', ], new DateTime("$this->year-06-01", new DateTimeZone($this->timezone)), $this->locale, @@ -245,7 +245,7 @@ private function calculateChildrensDay(): void if ($this->year >= 2017) { $this->addHoliday(new Holiday('childrensDay', [ 'en' => 'International Children\'s Day', - 'ro' => 'Ziua Copilului' + 'ro' => 'Ziua Copilului', ], new DateTime("$this->year-06-01", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Russia.php b/src/Yasumi/Provider/Russia.php index 236cc6745..61393d8df 100644 --- a/src/Yasumi/Provider/Russia.php +++ b/src/Yasumi/Provider/Russia.php @@ -68,7 +68,7 @@ private function addNewYearsHolidays(): void foreach ($holidayDays as $day) { $this->addHoliday(new Holiday('newYearHolidaysDay' . $day, [ 'en' => 'New Year\'s holidays', - 'ru' => 'Новогодние каникулы' + 'ru' => 'Новогодние каникулы', ], new \DateTime("{$this->year}-01-{$day}", new \DateTimeZone($this->timezone)), $this->locale)); } } @@ -81,7 +81,7 @@ private function addOrthodoxChristmasDay(): void { $this->addHoliday(new Holiday('orthodoxChristmasDay', [ 'en' => 'Orthodox Christmas Day', - 'ru' => 'Рождество' + 'ru' => 'Рождество', ], new \DateTime("{$this->year}-01-07", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -97,7 +97,7 @@ private function addDefenceOfTheFatherlandDay(): void $this->addHoliday(new Holiday('defenceOfTheFatherlandDay', [ 'en' => 'Defence of the Fatherland Day', - 'ru' => 'День защитника Отечества' + 'ru' => 'День защитника Отечества', ], new \DateTime("{$this->year}-02-23", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -118,7 +118,7 @@ private function addSpringAndLabourDay(): void { $this->addHoliday(new Holiday('springAndLabourDay', [ 'en' => 'Spring and Labour Day', - 'ru' => 'Праздник Весны и Труда' + 'ru' => 'Праздник Весны и Труда', ], new \DateTime("{$this->year}-05-01", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -130,7 +130,7 @@ private function addVictoryDay(): void { $this->addHoliday(new Holiday('victoryDay', [ 'en' => 'Victory Day', - 'ru' => 'День Победы' + 'ru' => 'День Победы', ], new \DateTime("{$this->year}-05-09", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -146,7 +146,7 @@ private function addRussiaDay(): void $this->addHoliday(new Holiday('russiaDay', [ 'en' => 'Russia Day', - 'ru' => 'День России' + 'ru' => 'День России', ], new \DateTime("{$this->year}-06-12", new \DateTimeZone($this->timezone)), $this->locale)); } @@ -162,7 +162,7 @@ private function addUnityDay(): void $this->addHoliday(new Holiday('unityDay', [ 'en' => 'Unity Day', - 'ru' => 'День народного единства' + 'ru' => 'День народного единства', ], new \DateTime("{$this->year}-11-04", new \DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index c0b482d11..260f676c7 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -123,7 +123,7 @@ private function calculateSlovakIndependenceDay(): void 'slovakIndependenceDay', [ 'sk' => 'Deň vzniku Slovenskej republiky', - 'en' => 'Day of the Establishment of the Slovak Republic' + 'en' => 'Day of the Establishment of the Slovak Republic', ], new DateTime($this->year . '-01-01', new DateTimeZone($this->timezone)), $this->locale @@ -149,7 +149,7 @@ private function calculateSaintsCyrilAndMethodiusDay(): void [ 'sk' => 'Sviatok svätého Cyrila a Metoda', 'cs' => 'Den slovanských věrozvěstů Cyrila a Metoděje', - 'en' => 'Saints Cyril and Methodius Day' + 'en' => 'Saints Cyril and Methodius Day', ], new DateTime($this->year . '-07-05', new DateTimeZone($this->timezone)), $this->locale, @@ -173,7 +173,7 @@ private function calculateSlovakNationalUprisingDay(): void 'slovakNationalUprisingDay', [ 'sk' => 'Výročie Slovenského národného povstania', - 'en' => 'Slovak National Uprising Day' + 'en' => 'Slovak National Uprising Day', ], new DateTime($this->year . '-08-29', new DateTimeZone($this->timezone)), $this->locale, @@ -197,7 +197,7 @@ private function calculateSlovakConstitutionDay(): void 'slovakConstitutionDay', [ 'sk' => 'Deň Ústavy Slovenskej republiky', - 'en' => 'Day of the Constitution of the Slovak Republic' + 'en' => 'Day of the Constitution of the Slovak Republic', ], new DateTime($this->year . '-09-01', new DateTimeZone($this->timezone)), $this->locale, @@ -223,7 +223,7 @@ private function calculateOurLadyOfSorrowsDay(): void { $this->addHoliday(new Holiday('ourLadyOfSorrowsDay', [ 'sk' => 'Sviatok Sedembolestnej Panny Márie', - 'en' => 'Our Lady of Sorrows Day' + 'en' => 'Our Lady of Sorrows Day', ], new DateTime($this->year . '-09-15', new DateTimeZone($this->timezone)), $this->locale, Holiday::TYPE_BANK)); } @@ -244,7 +244,7 @@ private function calculateStruggleForFreedomAndDemocracyDay(): void [ 'sk' => 'Deň boja za slobodu a demokraciu', 'cs' => 'Den boje za svobodu a demokracii', - 'en' => 'Struggle for Freedom and Democracy Day' + 'en' => 'Struggle for Freedom and Democracy Day', ], new DateTime($this->year . '-11-17', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/SouthKorea.php b/src/Yasumi/Provider/SouthKorea.php index ef3111216..94886454a 100644 --- a/src/Yasumi/Provider/SouthKorea.php +++ b/src/Yasumi/Provider/SouthKorea.php @@ -68,7 +68,7 @@ class SouthKorea extends AbstractProvider 2035 => '2035-2-8', 2036 => '2036-1-28', 2037 => '2037-2-15', 2038 => '2038-2-4', 2039 => '2037-1-24', 2040 => '2040-2-12', 2041 => '2041-2-1', 2042 => '2042-1-22', 2043 => '2043-2-10', 2044 => '2044-1-30', 2045 => '2045-2-17', 2046 => '2046-2-6', 2047 => '2047-1-26', 2048 => '2048-2-14', 2049 => '2049-2-2', - 2050 => '2050-1-23' + 2050 => '2050-1-23', ], 'buddhasBirthday' => [ 1975 => '1975-5-18', 1976 => '1976-5-6', 1977 => '1977-5-25', 1978 => '1978-5-14', 1979 => '1979-5-3', @@ -86,7 +86,7 @@ class SouthKorea extends AbstractProvider 2035 => '2035-5-15', 2036 => '2036-5-3', 2037 => '2037-5-22', 2038 => '2038-5-11', 2039 => '2039-4-30', 2040 => '2040-5-18', 2041 => '2041-5-7', 2042 => '2042-5-26', 2043 => '2043-5-16', 2044 => '2044-5-5', 2045 => '2045-5-24', 2046 => '2046-5-13', 2047 => '2047-5-2', 2048 => '2048-5-20', 2049 => '2049-5-9', - 2050 => '2050-5-28' + 2050 => '2050-5-28', ], 'chuseok' => [ 1949 => '1949-10-6', 1950 => '1950-9-26', 1951 => '1951-9-15', 1952 => '1952-10-3', 1953 => '1953-9-22', @@ -109,8 +109,8 @@ class SouthKorea extends AbstractProvider 2034 => '2034-9-27', 2035 => '2035-9-16', 2036 => '2036-10-4', 2037 => '2037-9-24', 2038 => '2038-9-13', 2039 => '2039-10-2', 2040 => '2040-9-21', 2041 => '2041-9-10', 2042 => '2042-9-28', 2043 => '2043-9-17', 2044 => '2044-10-5', 2045 => '2045-9-25', 2046 => '2046-9-15', 2047 => '2047-10-4', 2048 => '2048-9-22', - 2049 => '2049-9-11', 2050 => '2050-9-30' - ] + 2049 => '2049-9-11', 2050 => '2050-9-30', + ], ]; /** @@ -475,7 +475,7 @@ public function calculateSubstituteHolidays(): void $acceptedHolidays = [ 'dayBeforeSeollal', 'seollal', 'dayAfterSeollal', 'dayBeforeChuseok', 'chuseok', 'dayAfterChuseok', - 'childrensDay' + 'childrensDay', ]; // Loop through all holidays diff --git a/src/Yasumi/Provider/Spain/Galicia.php b/src/Yasumi/Provider/Spain/Galicia.php index 470725923..2b05bb4f9 100755 --- a/src/Yasumi/Provider/Spain/Galicia.php +++ b/src/Yasumi/Provider/Spain/Galicia.php @@ -81,7 +81,7 @@ private function calculateGalicianLiteratureDay(): void if ($this->year >= 1991) { $this->addHoliday(new Holiday('galicianLiteratureDay', [ 'es' => 'Día de las Letras Gallegas', - 'gl' => 'Día das Letras Galegas' + 'gl' => 'Día das Letras Galegas', ], new DateTime("$this->year-5-17", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -108,7 +108,7 @@ private function calculateStJamesDay(): void { if ($this->year >= 2000) { $this->addHoliday(new Holiday('stJamesDay', [ - 'es' => 'Santiago Apostol' + 'es' => 'Santiago Apostol', ], new DateTime("$this->year-7-25", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Spain/LaRioja.php b/src/Yasumi/Provider/Spain/LaRioja.php index b3bc121b2..0673b6aa7 100755 --- a/src/Yasumi/Provider/Spain/LaRioja.php +++ b/src/Yasumi/Provider/Spain/LaRioja.php @@ -76,7 +76,7 @@ private function calculateLaRiojaDay(): void { if ($this->year >= 1983) { $this->addHoliday(new Holiday('laRiojaDay', [ - 'es' => 'Día de La Rioja' + 'es' => 'Día de La Rioja', ], new DateTime("$this->year-6-9", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Spain/RegionOfMurcia.php b/src/Yasumi/Provider/Spain/RegionOfMurcia.php index da3abb174..b54a0449d 100755 --- a/src/Yasumi/Provider/Spain/RegionOfMurcia.php +++ b/src/Yasumi/Provider/Spain/RegionOfMurcia.php @@ -77,7 +77,7 @@ private function calculateDayOfMurcia(): void { if ($this->year >= 1983) { $this->addHoliday(new Holiday('murciaDay', [ - 'es' => 'Día de la Región de Murcia' + 'es' => 'Día de la Región de Murcia', ], new DateTime("$this->year-6-9", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Spain/ValencianCommunity.php b/src/Yasumi/Provider/Spain/ValencianCommunity.php index 5ed7930a6..9385a73c9 100755 --- a/src/Yasumi/Provider/Spain/ValencianCommunity.php +++ b/src/Yasumi/Provider/Spain/ValencianCommunity.php @@ -84,7 +84,7 @@ private function calculateValencianCommunityDay(): void { if ($this->year >= 1239) { $this->addHoliday(new Holiday('valencianCommunityDay', [ - 'es' => 'Día de la Comunidad Valenciana' + 'es' => 'Día de la Comunidad Valenciana', ], new DateTime("$this->year-10-9", new DateTimeZone($this->timezone)), $this->locale)); } } diff --git a/src/Yasumi/Provider/Switzerland.php b/src/Yasumi/Provider/Switzerland.php index 9232a179f..f0c0d268c 100644 --- a/src/Yasumi/Provider/Switzerland.php +++ b/src/Yasumi/Provider/Switzerland.php @@ -69,7 +69,7 @@ private function calculateNationalDay(): void 'fr' => 'Jour de la fête nationale', 'de' => 'Bundesfeiertag', 'it' => 'Giorno festivo federale', - 'rm' => 'Fiasta naziunala' + 'rm' => 'Fiasta naziunala', ]; if ($this->year >= 1994) { $this->addHoliday(new Holiday( @@ -111,7 +111,7 @@ public function calculateBerchtoldsTag(): void [ 'de' => 'Berchtoldstag', 'fr' => 'Jour de la Saint-Berthold', - 'en' => 'Berchtoldstag' + 'en' => 'Berchtoldstag', ], new DateTime($this->year . '-01-02', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/Switzerland/Geneva.php b/src/Yasumi/Provider/Switzerland/Geneva.php index 6c14781f3..0a4b08c9d 100644 --- a/src/Yasumi/Provider/Switzerland/Geneva.php +++ b/src/Yasumi/Provider/Switzerland/Geneva.php @@ -111,7 +111,7 @@ private function calculateRestaurationGenevoise(): void $this->addHoliday(new Holiday( 'restaurationGenevoise', [ - 'fr' => 'Restauration de la République' + 'fr' => 'Restauration de la République', ], new DateTime($this->year . '-12-31', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/Switzerland/Neuchatel.php b/src/Yasumi/Provider/Switzerland/Neuchatel.php index 88fca00e2..2c5e85342 100644 --- a/src/Yasumi/Provider/Switzerland/Neuchatel.php +++ b/src/Yasumi/Provider/Switzerland/Neuchatel.php @@ -81,7 +81,7 @@ private function calculateInstaurationRepublique(): void $this->addHoliday(new Holiday( 'instaurationRepublique', [ - 'fr' => 'Instauration de la République' + 'fr' => 'Instauration de la République', ], new DateTime($this->year . '-03-01', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/Switzerland/Obwalden.php b/src/Yasumi/Provider/Switzerland/Obwalden.php index 51b1cf306..32ed25a09 100644 --- a/src/Yasumi/Provider/Switzerland/Obwalden.php +++ b/src/Yasumi/Provider/Switzerland/Obwalden.php @@ -85,7 +85,7 @@ private function calculateBruderKlausenFest(): void $this->addHoliday(new Holiday( 'bruderKlausenFest', [ - 'de' => 'Bruder-Klausen-Fest' + 'de' => 'Bruder-Klausen-Fest', ], new DateTime($this->year . '-09-25', new DateTimeZone($this->timezone)), $this->locale, diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 134b688be..855061de0 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -78,7 +78,7 @@ private function calculateMartinLutherKingday(): void { if ($this->year >= 1986) { $this->addHoliday(new Holiday('martinLutherKingDay', [ - 'en' => 'Dr. Martin Luther King Jr\'s Birthday' + 'en' => 'Dr. Martin Luther King Jr\'s Birthday', ], new DateTime("third monday of january $this->year", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -106,7 +106,7 @@ private function calculateWashingtonsBirthday(): void $date = new DateTime("third monday of february $this->year", new DateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('washingtonsBirthday', [ - 'en' => 'Washington\'s Birthday' + 'en' => 'Washington\'s Birthday', ], $date, $this->locale)); } } @@ -131,7 +131,7 @@ private function calculateMemorialDay(): void $date = new DateTime("last monday of may $this->year", new DateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('memorialDay', [ - 'en' => 'Memorial Day' + 'en' => 'Memorial Day', ], $date, $this->locale)); } } @@ -152,7 +152,7 @@ private function calculateIndependenceDay(): void { if ($this->year >= 1776) { $this->addHoliday(new Holiday('independenceDay', [ - 'en' => 'Independence Day' + 'en' => 'Independence Day', ], new DateTime("$this->year-7-4", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -173,7 +173,7 @@ private function calculateLabourDay(): void $this->addHoliday(new Holiday( 'labourDay', [ - 'en' => 'Labour Day' + 'en' => 'Labour Day', ], new DateTime("first monday of september $this->year", new DateTimeZone($this->timezone)), $this->locale @@ -202,7 +202,7 @@ private function calculateColumbusDay(): void $date = new DateTime("second monday of october $this->year", new DateTimeZone($this->timezone)); } $this->addHoliday(new Holiday('columbusDay', [ - 'en' => 'Columbus Day' + 'en' => 'Columbus Day', ], $date, $this->locale)); } } @@ -224,7 +224,7 @@ private function calculateVeteransDay(): void $name = $this->year < 1954 ? 'Armistice Day' : 'Veterans Day'; $this->addHoliday(new Holiday('veteransDay', [ - 'en' => $name + 'en' => $name, ], new DateTime("$this->year-11-11", new DateTimeZone($this->timezone)), $this->locale)); } } @@ -247,7 +247,7 @@ private function calculateThanksgivingDay(): void $this->addHoliday(new Holiday( 'thanksgivingDay', [ - 'en' => 'Thanksgiving Day' + 'en' => 'Thanksgiving Day', ], new DateTime("fourth thursday of november $this->year", new DateTimeZone($this->timezone)), $this->locale diff --git a/src/Yasumi/Provider/Ukraine.php b/src/Yasumi/Provider/Ukraine.php index 778a184f8..4a18bfe6d 100644 --- a/src/Yasumi/Provider/Ukraine.php +++ b/src/Yasumi/Provider/Ukraine.php @@ -96,7 +96,7 @@ private function calculateSecondInternationalWorkersDay(): void { $this->addHoliday(new Holiday('secondInternationalWorkersDay', [ 'uk' => 'День міжнародної солідарності трудящих', - 'ru' => 'День международной солидарности трудящихся' + 'ru' => 'День международной солидарности трудящихся', ], new \DateTime("$this->year-05-02", new \DateTimeZone($this->timezone)), $this->locale)); } diff --git a/src/Yasumi/Yasumi.php b/src/Yasumi/Yasumi.php index 0524519dd..e9280365a 100755 --- a/src/Yasumi/Yasumi.php +++ b/src/Yasumi/Yasumi.php @@ -54,7 +54,7 @@ class Yasumi private static $ignoredProvider = [ 'AbstractProvider.php', 'CommonHolidays.php', - 'ChristianHolidays.php' + 'ChristianHolidays.php', ]; /** diff --git a/src/Yasumi/data/locales.php b/src/Yasumi/data/locales.php index ca370f6be..e4cd6102d 100644 --- a/src/Yasumi/data/locales.php +++ b/src/Yasumi/data/locales.php @@ -756,5 +756,5 @@ 'zh_Hant_MO', 'zh_Hant_TW', 'zu', - 'zu_ZA' + 'zu_ZA', ]; diff --git a/src/Yasumi/data/translations/allSaintsDay.php b/src/Yasumi/data/translations/allSaintsDay.php index 3c9effb5c..b7e2f2cc7 100755 --- a/src/Yasumi/data/translations/allSaintsDay.php +++ b/src/Yasumi/data/translations/allSaintsDay.php @@ -29,5 +29,5 @@ 'pt' => 'Dia de todos os Santos', 'ro' => 'Ziua tuturor sfinților', 'sk' => 'Sviatok Všetkých svätých', - 'sv' => 'alla helgons dag' + 'sv' => 'alla helgons dag', ]; diff --git a/src/Yasumi/data/translations/allSaintsEve.php b/src/Yasumi/data/translations/allSaintsEve.php index f579546d7..27a222c7e 100755 --- a/src/Yasumi/data/translations/allSaintsEve.php +++ b/src/Yasumi/data/translations/allSaintsEve.php @@ -14,5 +14,5 @@ return [ 'da' => 'Allehelgensaften', 'en' => 'All Saints\' Eve', - 'sv' => 'alla helgons afton' + 'sv' => 'alla helgons afton', ]; diff --git a/src/Yasumi/data/translations/anzacDay.php b/src/Yasumi/data/translations/anzacDay.php index 547d38a5c..632b1bec9 100644 --- a/src/Yasumi/data/translations/anzacDay.php +++ b/src/Yasumi/data/translations/anzacDay.php @@ -12,5 +12,5 @@ // Translations for ANZAC Day return [ - 'en' => 'ANZAC Day' + 'en' => 'ANZAC Day', ]; diff --git a/src/Yasumi/data/translations/armisticeDay.php b/src/Yasumi/data/translations/armisticeDay.php index 6acfb7958..f9cb906b4 100644 --- a/src/Yasumi/data/translations/armisticeDay.php +++ b/src/Yasumi/data/translations/armisticeDay.php @@ -16,5 +16,5 @@ 'en' => 'Armistice Day', 'fr' => 'Armistice', 'fr_FR' => 'Armistice 1918', - 'nl' => 'Wapenstilstand' + 'nl' => 'Wapenstilstand', ]; diff --git a/src/Yasumi/data/translations/ascensionDay.php b/src/Yasumi/data/translations/ascensionDay.php index f0e7cd368..8e2f97906 100644 --- a/src/Yasumi/data/translations/ascensionDay.php +++ b/src/Yasumi/data/translations/ascensionDay.php @@ -22,5 +22,5 @@ 'it' => 'Ascensione', 'nb' => 'Kristi himmelfartsdag', 'nl' => 'Hemelvaart', - 'sv' => 'Kristi himmelsfärdsdag' + 'sv' => 'Kristi himmelsfärdsdag', ]; diff --git a/src/Yasumi/data/translations/ashWednesday.php b/src/Yasumi/data/translations/ashWednesday.php index 9a4015336..7f15e9ee5 100644 --- a/src/Yasumi/data/translations/ashWednesday.php +++ b/src/Yasumi/data/translations/ashWednesday.php @@ -18,5 +18,5 @@ 'fr' => 'Mercredi des Cendres', 'it' => 'Mercoledi delle Ceneri', 'nl' => 'Aswoensdag', - 'pt' => 'Quarta-feira de Cinzas' + 'pt' => 'Quarta-feira de Cinzas', ]; diff --git a/src/Yasumi/data/translations/assumptionOfMary.php b/src/Yasumi/data/translations/assumptionOfMary.php index 059d12b5c..2659f2bf2 100755 --- a/src/Yasumi/data/translations/assumptionOfMary.php +++ b/src/Yasumi/data/translations/assumptionOfMary.php @@ -25,5 +25,5 @@ 'pl' => 'Wniebowzięcie Najświętszej Marii Panny', 'pt' => 'Assunção de Nossa Senhora', 'ro' => 'Adormirea Maicii Domnului', - 'sk' => 'Nanebovzatie Panny Márie' + 'sk' => 'Nanebovzatie Panny Márie', ]; diff --git a/src/Yasumi/data/translations/carnationRevolutionDay.php b/src/Yasumi/data/translations/carnationRevolutionDay.php index fced9aef3..b223b2d9c 100644 --- a/src/Yasumi/data/translations/carnationRevolutionDay.php +++ b/src/Yasumi/data/translations/carnationRevolutionDay.php @@ -13,5 +13,5 @@ // Translations for Freedom Day return [ 'en' => 'Freedom Day', - 'pt' => 'Dia da Liberdade' + 'pt' => 'Dia da Liberdade', ]; diff --git a/src/Yasumi/data/translations/christmasDay.php b/src/Yasumi/data/translations/christmasDay.php index b9fe61979..04332e431 100755 --- a/src/Yasumi/data/translations/christmasDay.php +++ b/src/Yasumi/data/translations/christmasDay.php @@ -41,5 +41,5 @@ 'ru' => 'Рождество', 'sk' => 'Prvý sviatok vianočný', 'sv' => 'juldagen', - 'uk' => 'Різдво' + 'uk' => 'Різдво', ]; diff --git a/src/Yasumi/data/translations/christmasEve.php b/src/Yasumi/data/translations/christmasEve.php index 9f4e48885..9315fcd27 100755 --- a/src/Yasumi/data/translations/christmasEve.php +++ b/src/Yasumi/data/translations/christmasEve.php @@ -26,5 +26,5 @@ 'pt' => 'Véspera de Natal', 'ro' => 'Ajunul Crãciunului', 'sk' => 'Štedrý deň', - 'sv' => 'julafton' + 'sv' => 'julafton', ]; diff --git a/src/Yasumi/data/translations/corpusChristi.php b/src/Yasumi/data/translations/corpusChristi.php index 0a456fc6a..4506cea6d 100644 --- a/src/Yasumi/data/translations/corpusChristi.php +++ b/src/Yasumi/data/translations/corpusChristi.php @@ -19,5 +19,5 @@ 'it' => 'Corpus Domini', 'pl' => 'Boże Ciało', 'pt' => 'Corpus Christi', - 'pt_PT' => 'Corpo de Deus' + 'pt_PT' => 'Corpo de Deus', ]; diff --git a/src/Yasumi/data/translations/dayAfterNewYearsDay.php b/src/Yasumi/data/translations/dayAfterNewYearsDay.php index 8648e89fc..53c0692dd 100644 --- a/src/Yasumi/data/translations/dayAfterNewYearsDay.php +++ b/src/Yasumi/data/translations/dayAfterNewYearsDay.php @@ -14,5 +14,5 @@ return [ 'en' => 'Day after New Year\'s Day', 'ko' => '새해 연휴', - 'ro' => 'A doua zi după Anul Nou' + 'ro' => 'A doua zi după Anul Nou', ]; diff --git a/src/Yasumi/data/translations/dayOfReformation.php b/src/Yasumi/data/translations/dayOfReformation.php index 07621e861..acbac8543 100755 --- a/src/Yasumi/data/translations/dayOfReformation.php +++ b/src/Yasumi/data/translations/dayOfReformation.php @@ -13,5 +13,5 @@ // Translations for Day of Reformation return [ 'de' => 'Tag der Reformation', - 'en' => 'Day of Reformation' + 'en' => 'Day of Reformation', ]; diff --git a/src/Yasumi/data/translations/easter.php b/src/Yasumi/data/translations/easter.php index 39362cb98..4c431f116 100644 --- a/src/Yasumi/data/translations/easter.php +++ b/src/Yasumi/data/translations/easter.php @@ -35,5 +35,5 @@ 'ro' => 'Paștele', 'ru' => 'Пасха', 'sv' => 'påskdagen', - 'uk' => 'Великдень' + 'uk' => 'Великдень', ]; diff --git a/src/Yasumi/data/translations/easterMonday.php b/src/Yasumi/data/translations/easterMonday.php index 4e5a36559..ce6d42379 100644 --- a/src/Yasumi/data/translations/easterMonday.php +++ b/src/Yasumi/data/translations/easterMonday.php @@ -34,5 +34,5 @@ 'pl' => 'Poniedziałek Wielkanocny', 'ro' => 'A doua zi de Paște', 'sk' => 'Veľkonočný pondelok', - 'sv' => 'annandag påsk' + 'sv' => 'annandag påsk', ]; diff --git a/src/Yasumi/data/translations/epiphany.php b/src/Yasumi/data/translations/epiphany.php index 398ab297e..6f882d100 100644 --- a/src/Yasumi/data/translations/epiphany.php +++ b/src/Yasumi/data/translations/epiphany.php @@ -26,5 +26,5 @@ 'nl' => 'Drie Koningen', 'pl' => 'Święto Trzech Króli', 'sk' => 'Zjavenie Pána / Traja králi', - 'sv' => 'trettondedag jul' + 'sv' => 'trettondedag jul', ]; diff --git a/src/Yasumi/data/translations/epiphanyEve.php b/src/Yasumi/data/translations/epiphanyEve.php index dfc44f11d..5b24ddaff 100644 --- a/src/Yasumi/data/translations/epiphanyEve.php +++ b/src/Yasumi/data/translations/epiphanyEve.php @@ -14,5 +14,5 @@ return [ 'da' => 'Helligtrekongersaften', 'en' => 'Epiphany Eve', - 'sv' => 'trettondagsafton' + 'sv' => 'trettondagsafton', ]; diff --git a/src/Yasumi/data/translations/fathersDay.php b/src/Yasumi/data/translations/fathersDay.php index 20f0f4615..9d8b68cd8 100755 --- a/src/Yasumi/data/translations/fathersDay.php +++ b/src/Yasumi/data/translations/fathersDay.php @@ -20,5 +20,5 @@ 'nl' => 'Vaderdag', 'pt' => 'Dia do Pai', 'ro' => 'Ziua Tatălui', - 'sk' => 'Deň otcov' + 'sk' => 'Deň otcov', ]; diff --git a/src/Yasumi/data/translations/goodFriday.php b/src/Yasumi/data/translations/goodFriday.php index 8384896e5..3fc7edb8e 100644 --- a/src/Yasumi/data/translations/goodFriday.php +++ b/src/Yasumi/data/translations/goodFriday.php @@ -33,5 +33,5 @@ 'pt' => 'Sexta feira santa', 'pt_PT' => 'Sexta-feira Santa', 'sk' => 'Veľký piatok', - 'sv' => 'långfredagen' + 'sv' => 'långfredagen', ]; diff --git a/src/Yasumi/data/translations/immaculateConception.php b/src/Yasumi/data/translations/immaculateConception.php index 7ad1c9c60..bace8be7f 100644 --- a/src/Yasumi/data/translations/immaculateConception.php +++ b/src/Yasumi/data/translations/immaculateConception.php @@ -18,5 +18,5 @@ 'es' => 'Inmaculada Concepción', 'fr' => 'Immaculée Conception', 'it' => 'Immacolata Concezione', - 'pt' => 'Dia da Imaculada Conceição' + 'pt' => 'Dia da Imaculada Conceição', ]; diff --git a/src/Yasumi/data/translations/internationalWomensDay.php b/src/Yasumi/data/translations/internationalWomensDay.php index 34b47c696..a1ea9c00a 100755 --- a/src/Yasumi/data/translations/internationalWomensDay.php +++ b/src/Yasumi/data/translations/internationalWomensDay.php @@ -16,5 +16,5 @@ 'en' => 'International Women\'s Day', 'ko' => '국제 여성의 날', 'ru' => 'Международный женский день', - 'uk' => 'Міжнародний жіночий день' + 'uk' => 'Міжнародний жіночий день', ]; diff --git a/src/Yasumi/data/translations/internationalWorkersDay.php b/src/Yasumi/data/translations/internationalWorkersDay.php index a9f35c31e..267337b3e 100755 --- a/src/Yasumi/data/translations/internationalWorkersDay.php +++ b/src/Yasumi/data/translations/internationalWorkersDay.php @@ -41,5 +41,5 @@ 'ru' => 'День международной солидарности трудящихся', 'sk' => 'Sviatok práce', 'sv' => 'Första maj', - 'uk' => 'День міжнародної солідарності трудящих' + 'uk' => 'День міжнародної солідарності трудящих', ]; diff --git a/src/Yasumi/data/translations/labourDay.php b/src/Yasumi/data/translations/labourDay.php index 3079a9338..5c7a060df 100644 --- a/src/Yasumi/data/translations/labourDay.php +++ b/src/Yasumi/data/translations/labourDay.php @@ -16,5 +16,5 @@ 'ja' => '労働の日', 'ko' => '노동절', 'nl' => 'Dag van de arbeid', - 'sk' => 'Sviatok práce' + 'sk' => 'Sviatok práce', ]; diff --git a/src/Yasumi/data/translations/maundyThursday.php b/src/Yasumi/data/translations/maundyThursday.php index 44f6f2844..4c1f321d4 100644 --- a/src/Yasumi/data/translations/maundyThursday.php +++ b/src/Yasumi/data/translations/maundyThursday.php @@ -16,5 +16,5 @@ 'el' => 'Μεγάλη Πέμπτη', 'en' => 'Maundy Thursday', 'es' => 'Jueves Santo', - 'nb' => 'Skjærtorsdag' + 'nb' => 'Skjærtorsdag', ]; diff --git a/src/Yasumi/data/translations/mothersDay.php b/src/Yasumi/data/translations/mothersDay.php index 374460a3a..0ee75170c 100755 --- a/src/Yasumi/data/translations/mothersDay.php +++ b/src/Yasumi/data/translations/mothersDay.php @@ -20,5 +20,5 @@ 'nl' => 'Moederdag', 'pt' => 'Dia da Mãe', 'ro' => 'Ziua Mamei', - 'sk' => 'Deň matiek' + 'sk' => 'Deň matiek', ]; diff --git a/src/Yasumi/data/translations/newYearsDay.php b/src/Yasumi/data/translations/newYearsDay.php index 1fd9f5d9e..5a787ffac 100755 --- a/src/Yasumi/data/translations/newYearsDay.php +++ b/src/Yasumi/data/translations/newYearsDay.php @@ -42,5 +42,5 @@ 'ru' => 'Новый год', 'sk' => 'Nový rok', 'sv' => 'nyårsdagen', - 'uk' => 'Новий Рік' + 'uk' => 'Новий Рік', ]; diff --git a/src/Yasumi/data/translations/newYearsEve.php b/src/Yasumi/data/translations/newYearsEve.php index ea9f6a9c8..995e8dc01 100755 --- a/src/Yasumi/data/translations/newYearsEve.php +++ b/src/Yasumi/data/translations/newYearsEve.php @@ -16,5 +16,5 @@ 'en' => 'New Year\'s Eve', 'ko' => '신년전야', 'lv' => 'Vecgada vakars', - 'sv' => 'nyårsafton' + 'sv' => 'nyårsafton', ]; diff --git a/src/Yasumi/data/translations/pentecost.php b/src/Yasumi/data/translations/pentecost.php index b2f28426c..345feabd1 100755 --- a/src/Yasumi/data/translations/pentecost.php +++ b/src/Yasumi/data/translations/pentecost.php @@ -30,5 +30,5 @@ 'ro' => 'Rusaliile', 'ru' => 'Троица', 'sv' => 'Pingstdagen', - 'uk' => 'Трійця' + 'uk' => 'Трійця', ]; diff --git a/src/Yasumi/data/translations/pentecostMonday.php b/src/Yasumi/data/translations/pentecostMonday.php index 5e1f965cd..dc592f80f 100755 --- a/src/Yasumi/data/translations/pentecostMonday.php +++ b/src/Yasumi/data/translations/pentecostMonday.php @@ -23,5 +23,5 @@ 'nb' => 'Andre pinsedag', 'nl' => 'Tweede pinksterdag', 'nl_BE' => 'Pinkstermaandag', - 'ro' => 'A doua zi de Rusalii' + 'ro' => 'A doua zi de Rusalii', ]; diff --git a/src/Yasumi/data/translations/portugalDay.php b/src/Yasumi/data/translations/portugalDay.php index 952d07a1a..456677086 100644 --- a/src/Yasumi/data/translations/portugalDay.php +++ b/src/Yasumi/data/translations/portugalDay.php @@ -13,5 +13,5 @@ // Translations for Portugal Day return [ 'en' => 'Portugal Day', - 'pt' => 'Dia de Portugal' + 'pt' => 'Dia de Portugal', ]; diff --git a/src/Yasumi/data/translations/portugueseRepublicDay.php b/src/Yasumi/data/translations/portugueseRepublicDay.php index 9539dc414..a05c1ad48 100644 --- a/src/Yasumi/data/translations/portugueseRepublicDay.php +++ b/src/Yasumi/data/translations/portugueseRepublicDay.php @@ -13,5 +13,5 @@ // Translations for Implantation of the Portuguese Republic return [ 'en' => 'Implantation of the Portuguese Republic', - 'pt' => 'Implantação da República Portuguesa' + 'pt' => 'Implantação da República Portuguesa', ]; diff --git a/src/Yasumi/data/translations/reformationDay.php b/src/Yasumi/data/translations/reformationDay.php index 4a1812165..1cdfb1e25 100755 --- a/src/Yasumi/data/translations/reformationDay.php +++ b/src/Yasumi/data/translations/reformationDay.php @@ -13,5 +13,5 @@ // Translations for Reformation Day return [ 'de' => 'Reformationstag', - 'en' => 'Reformation Day' + 'en' => 'Reformation Day', ]; diff --git a/src/Yasumi/data/translations/restorationOfIndepence.php b/src/Yasumi/data/translations/restorationOfIndepence.php index 37cf8a240..725850a39 100644 --- a/src/Yasumi/data/translations/restorationOfIndepence.php +++ b/src/Yasumi/data/translations/restorationOfIndepence.php @@ -13,5 +13,5 @@ // Translations for Restoration of Independence return [ 'en' => 'Restoration of Independence', - 'pt' => 'Restauração da Independência' + 'pt' => 'Restauração da Independência', ]; diff --git a/src/Yasumi/data/translations/secondChristmasDay.php b/src/Yasumi/data/translations/secondChristmasDay.php index 7165110dc..252abc852 100755 --- a/src/Yasumi/data/translations/secondChristmasDay.php +++ b/src/Yasumi/data/translations/secondChristmasDay.php @@ -31,5 +31,5 @@ 'pl' => 'drugi dzień Bożego Narodzenia', 'ro' => 'A doua zi de Crăciun', 'sk' => 'Druhý sviatok vianočný', - 'sv' => 'annandag jul' + 'sv' => 'annandag jul', ]; diff --git a/src/Yasumi/data/translations/stDavidsDay.php b/src/Yasumi/data/translations/stDavidsDay.php index 5a603b18c..564b88b8f 100644 --- a/src/Yasumi/data/translations/stDavidsDay.php +++ b/src/Yasumi/data/translations/stDavidsDay.php @@ -13,5 +13,5 @@ // Translations for St. David's Day return [ 'cy' => 'Dydd Gŵyl Dewi', - 'en' => 'St. David\'s Day' + 'en' => 'St. David\'s Day', ]; diff --git a/src/Yasumi/data/translations/stGeorgesDay.php b/src/Yasumi/data/translations/stGeorgesDay.php index ecca83052..c8ab6e1a4 100644 --- a/src/Yasumi/data/translations/stGeorgesDay.php +++ b/src/Yasumi/data/translations/stGeorgesDay.php @@ -14,5 +14,5 @@ return [ 'el' => 'Αγίου Γεωργίου', 'en' => 'St. George\'s Day', - 'es' => 'San Jorge' + 'es' => 'San Jorge', ]; diff --git a/src/Yasumi/data/translations/stJohnsDay.php b/src/Yasumi/data/translations/stJohnsDay.php index 98a08bed1..50a4e577c 100644 --- a/src/Yasumi/data/translations/stJohnsDay.php +++ b/src/Yasumi/data/translations/stJohnsDay.php @@ -20,5 +20,5 @@ 'fi' => 'Juhannuspäivä', 'lt' => 'Rasos ir Joninių diena', 'lv' => 'Jāņi', - 'sv' => 'midsommardagen' + 'sv' => 'midsommardagen', ]; diff --git a/src/Yasumi/data/translations/stJohnsEve.php b/src/Yasumi/data/translations/stJohnsEve.php index 8111bc79a..0027bd417 100644 --- a/src/Yasumi/data/translations/stJohnsEve.php +++ b/src/Yasumi/data/translations/stJohnsEve.php @@ -14,5 +14,5 @@ return [ 'da' => 'Sankthansaften', 'en' => 'St. John\'s Eve', - 'sv' => 'midsommarafton' + 'sv' => 'midsommarafton', ]; diff --git a/src/Yasumi/data/translations/stJosephsDay.php b/src/Yasumi/data/translations/stJosephsDay.php index 652fcae9f..61f45db59 100644 --- a/src/Yasumi/data/translations/stJosephsDay.php +++ b/src/Yasumi/data/translations/stJosephsDay.php @@ -16,5 +16,5 @@ 'en' => 'St. Joseph\'s Day', 'es' => 'San José', 'fr' => 'Saint-Joseph', - 'it' => 'San Giuseppe' + 'it' => 'San Giuseppe', ]; diff --git a/src/Yasumi/data/translations/stStephensDay.php b/src/Yasumi/data/translations/stStephensDay.php index e04553796..6259a6ed7 100644 --- a/src/Yasumi/data/translations/stStephensDay.php +++ b/src/Yasumi/data/translations/stStephensDay.php @@ -19,5 +19,5 @@ 'fr' => 'Saint-Étienne', 'ga' => 'Lá Fhéile Stiofáin', 'hr' => 'Sveti Stjepan', - 'it' => 'Santo Stefano' + 'it' => 'Santo Stefano', ]; diff --git a/src/Yasumi/data/translations/summerTime.php b/src/Yasumi/data/translations/summerTime.php index 5d42dd4cc..5a6df066c 100644 --- a/src/Yasumi/data/translations/summerTime.php +++ b/src/Yasumi/data/translations/summerTime.php @@ -15,5 +15,5 @@ 'da' => 'Sommertid starter', 'en' => 'Summertime', 'ko' => '서머타임', - 'nl' => 'Zomertijd' + 'nl' => 'Zomertijd', ]; diff --git a/src/Yasumi/data/translations/valentinesDay.php b/src/Yasumi/data/translations/valentinesDay.php index 3beaa573a..fbd6db79d 100644 --- a/src/Yasumi/data/translations/valentinesDay.php +++ b/src/Yasumi/data/translations/valentinesDay.php @@ -22,5 +22,5 @@ 'ko' => '발렌타인 데이', 'nl' => 'Valentijnsdag', 'pl' => 'Walentynki', - 'pt' => 'Dia dos Namorados' + 'pt' => 'Dia dos Namorados', ]; diff --git a/src/Yasumi/data/translations/victoryInEuropeDay.php b/src/Yasumi/data/translations/victoryInEuropeDay.php index 33a04fbd5..6222f5f5a 100644 --- a/src/Yasumi/data/translations/victoryInEuropeDay.php +++ b/src/Yasumi/data/translations/victoryInEuropeDay.php @@ -15,5 +15,5 @@ 'cs' => 'Den vítězství', 'en' => 'Victory in Europe Day', 'fr' => 'Victoire 1945', - 'sk' => 'Deň víťazstva nad fašizmom' + 'sk' => 'Deň víťazstva nad fašizmom', ]; diff --git a/src/Yasumi/data/translations/waitangiDay.php b/src/Yasumi/data/translations/waitangiDay.php index 76ab28edb..a91cf8c31 100644 --- a/src/Yasumi/data/translations/waitangiDay.php +++ b/src/Yasumi/data/translations/waitangiDay.php @@ -12,5 +12,5 @@ // Translations for Waitangi Day return [ - 'en' => 'Waitangi Day' + 'en' => 'Waitangi Day', ]; diff --git a/src/Yasumi/data/translations/walpurgisEve.php b/src/Yasumi/data/translations/walpurgisEve.php index 2e2f1448f..67efc4b2e 100755 --- a/src/Yasumi/data/translations/walpurgisEve.php +++ b/src/Yasumi/data/translations/walpurgisEve.php @@ -13,5 +13,5 @@ // Translations for Walpurgis Night return [ 'en' => 'Walpurgis Night', - 'sv' => 'valborgsmässoafton' + 'sv' => 'valborgsmässoafton', ]; diff --git a/src/Yasumi/data/translations/winterTime.php b/src/Yasumi/data/translations/winterTime.php index f173fccdc..5c702cdc1 100644 --- a/src/Yasumi/data/translations/winterTime.php +++ b/src/Yasumi/data/translations/winterTime.php @@ -14,5 +14,5 @@ return [ 'da' => 'Sommertid slutter', 'en' => 'Wintertime', - 'nl' => 'Wintertijd' + 'nl' => 'Wintertijd', ]; diff --git a/src/Yasumi/data/translations/worldAnimalDay.php b/src/Yasumi/data/translations/worldAnimalDay.php index 79b615731..5a4106beb 100644 --- a/src/Yasumi/data/translations/worldAnimalDay.php +++ b/src/Yasumi/data/translations/worldAnimalDay.php @@ -13,5 +13,5 @@ // Translations for World Animal Day return [ 'en' => 'World Animal Day', - 'nl' => 'Werelddierendag' + 'nl' => 'Werelddierendag', ]; diff --git a/tests/Australia/ACT/ACTTest.php b/tests/Australia/ACT/ACTTest.php index 6d471edfb..5ccde3761 100644 --- a/tests/Australia/ACT/ACTTest.php +++ b/tests/Australia/ACT/ACTTest.php @@ -44,7 +44,7 @@ public function testOfficialHolidays(): void 'queensBirthday', 'labourDay', 'canberraDay', - 'reconciliationDay' + 'reconciliationDay', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/ACT/CanberraDayTest.php b/tests/Australia/ACT/CanberraDayTest.php index 1fff046e7..a03efe9cc 100644 --- a/tests/Australia/ACT/CanberraDayTest.php +++ b/tests/Australia/ACT/CanberraDayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-03-13'], [2018, '2018-03-12'], [2019, '2019-03-11'], - [2020, '2020-03-09'] + [2020, '2020-03-09'], ]; return $data; diff --git a/tests/Australia/ACT/LabourDayTest.php b/tests/Australia/ACT/LabourDayTest.php index 44dfa2b89..859bae64d 100644 --- a/tests/Australia/ACT/LabourDayTest.php +++ b/tests/Australia/ACT/LabourDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-10-02'], [2018, '2018-10-01'], [2019, '2019-10-07'], - [2020, '2020-10-05'] + [2020, '2020-10-05'], ]; return $data; diff --git a/tests/Australia/ACT/QueensBirthdayTest.php b/tests/Australia/ACT/QueensBirthdayTest.php index 8eaad0599..1fef2369c 100644 --- a/tests/Australia/ACT/QueensBirthdayTest.php +++ b/tests/Australia/ACT/QueensBirthdayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-06-12'], [2018, '2018-06-11'], [2019, '2019-06-10'], - [2020, '2020-06-08'] + [2020, '2020-06-08'], ]; return $data; diff --git a/tests/Australia/ACT/ReconciliationDayTest.php b/tests/Australia/ACT/ReconciliationDayTest.php index 90acae466..aaba8f4f9 100644 --- a/tests/Australia/ACT/ReconciliationDayTest.php +++ b/tests/Australia/ACT/ReconciliationDayTest.php @@ -75,7 +75,7 @@ public function HolidayDataProvider(): array [2027, '2027-05-31'], [2028, '2028-05-29'], [2029, '2029-05-28'], - [2030, '2030-05-27'] + [2030, '2030-05-27'], ]; return $data; diff --git a/tests/Australia/AnzacDayTest.php b/tests/Australia/AnzacDayTest.php index 487dfafa4..89eedd963 100644 --- a/tests/Australia/AnzacDayTest.php +++ b/tests/Australia/AnzacDayTest.php @@ -83,7 +83,7 @@ public function HolidayDataProvider(): array [2018, '2018-04-25'], [2019, '2019-04-25'], [2019, '2019-04-25'], - [2020, '2020-04-25'] + [2020, '2020-04-25'], ]; return $data; diff --git a/tests/Australia/AustraliaDayTest.php b/tests/Australia/AustraliaDayTest.php index 1f4cc352e..4d1f0f05d 100644 --- a/tests/Australia/AustraliaDayTest.php +++ b/tests/Australia/AustraliaDayTest.php @@ -92,7 +92,7 @@ public function HolidayDataProvider(): array [2017, '2017-01-26'], [2018, '2018-01-26'], [2019, '2019-01-28'], - [2020, '2020-01-27'] + [2020, '2020-01-27'], ]; return $data; diff --git a/tests/Australia/AustraliaTest.php b/tests/Australia/AustraliaTest.php index acfa36222..3dbdc168c 100644 --- a/tests/Australia/AustraliaTest.php +++ b/tests/Australia/AustraliaTest.php @@ -38,7 +38,7 @@ public function testOfficialHolidays(): void 'christmasDay', 'secondChristmasDay', 'australiaDay', - 'anzacDay' + 'anzacDay', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/BoxingDayTest.php b/tests/Australia/BoxingDayTest.php index 3fe4b54b3..3ab1e7e2c 100644 --- a/tests/Australia/BoxingDayTest.php +++ b/tests/Australia/BoxingDayTest.php @@ -84,7 +84,7 @@ public function HolidayDataProvider(): array [2017, '2017-12-26', null], [2018, '2018-12-26', null], [2019, '2019-12-26', null], - [2020, '2020-12-26', '2020-12-28'] + [2020, '2020-12-26', '2020-12-28'], ]; return $data; diff --git a/tests/Australia/ChristmasDayTest.php b/tests/Australia/ChristmasDayTest.php index 97fecad9c..25e8fa41b 100644 --- a/tests/Australia/ChristmasDayTest.php +++ b/tests/Australia/ChristmasDayTest.php @@ -84,7 +84,7 @@ public function HolidayDataProvider(): array [2017, '2017-12-25', null], [2018, '2018-12-25', null], [2019, '2019-12-25', null], - [2020, '2020-12-25', null] + [2020, '2020-12-25', null], ]; return $data; diff --git a/tests/Australia/EasterMondayTest.php b/tests/Australia/EasterMondayTest.php index 851d34d2b..a1f4e9a13 100644 --- a/tests/Australia/EasterMondayTest.php +++ b/tests/Australia/EasterMondayTest.php @@ -105,7 +105,7 @@ public function HolidayDataProvider2(): array [2011, '2011-04-26'], [2038, '2038-04-27'], [2095, '2095-04-26'], - [2163, '2163-04-26'] + [2163, '2163-04-26'], ]; return $data; diff --git a/tests/Australia/NSW/BankHolidayTest.php b/tests/Australia/NSW/BankHolidayTest.php index 591e305de..0325527c7 100644 --- a/tests/Australia/NSW/BankHolidayTest.php +++ b/tests/Australia/NSW/BankHolidayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-08-07'], [2018, '2018-08-06'], [2019, '2019-08-05'], - [2020, '2020-08-03'] + [2020, '2020-08-03'], ]; return $data; diff --git a/tests/Australia/NSW/LabourDayTest.php b/tests/Australia/NSW/LabourDayTest.php index 19c1bb483..f0ed1e675 100644 --- a/tests/Australia/NSW/LabourDayTest.php +++ b/tests/Australia/NSW/LabourDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-10-02'], [2018, '2018-10-01'], [2019, '2019-10-07'], - [2020, '2020-10-05'] + [2020, '2020-10-05'], ]; return $data; diff --git a/tests/Australia/NSW/NSWTest.php b/tests/Australia/NSW/NSWTest.php index b5458f102..d773a970f 100644 --- a/tests/Australia/NSW/NSWTest.php +++ b/tests/Australia/NSW/NSWTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'easter', 'easterSaturday', 'queensBirthday', - 'labourDay' + 'labourDay', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } @@ -53,7 +53,7 @@ public function testOfficialHolidays(): void public function testBankHolidays(): void { $this->assertDefinedHolidays([ - 'bankHoliday' + 'bankHoliday', ], $this->region, $this->year, Holiday::TYPE_BANK); } diff --git a/tests/Australia/NSW/QueensBirthdayTest.php b/tests/Australia/NSW/QueensBirthdayTest.php index 3b80349d9..4d1fd6d4b 100644 --- a/tests/Australia/NSW/QueensBirthdayTest.php +++ b/tests/Australia/NSW/QueensBirthdayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-06-12'], [2018, '2018-06-11'], [2019, '2019-06-10'], - [2020, '2020-06-08'] + [2020, '2020-06-08'], ]; return $data; diff --git a/tests/Australia/NT/MayDayTest.php b/tests/Australia/NT/MayDayTest.php index 3c19b9551..ea37aafc7 100644 --- a/tests/Australia/NT/MayDayTest.php +++ b/tests/Australia/NT/MayDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-05-01'], [2018, '2018-05-07'], [2019, '2019-05-06'], - [2020, '2020-05-04'] + [2020, '2020-05-04'], ]; return $data; diff --git a/tests/Australia/NT/NTTest.php b/tests/Australia/NT/NTTest.php index 829642517..fda09c5a3 100644 --- a/tests/Australia/NT/NTTest.php +++ b/tests/Australia/NT/NTTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'easterSaturday', 'queensBirthday', 'mayDay', - 'picnicDay' + 'picnicDay', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/NT/PicnicDayTest.php b/tests/Australia/NT/PicnicDayTest.php index bfb88996c..490d33c34 100644 --- a/tests/Australia/NT/PicnicDayTest.php +++ b/tests/Australia/NT/PicnicDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-08-07'], [2018, '2018-08-06'], [2019, '2019-08-05'], - [2020, '2020-08-03'] + [2020, '2020-08-03'], ]; return $data; diff --git a/tests/Australia/NT/QueensBirthdayTest.php b/tests/Australia/NT/QueensBirthdayTest.php index 78de1ebfe..936823ad4 100644 --- a/tests/Australia/NT/QueensBirthdayTest.php +++ b/tests/Australia/NT/QueensBirthdayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-06-12'], [2018, '2018-06-11'], [2019, '2019-06-10'], - [2020, '2020-06-08'] + [2020, '2020-06-08'], ]; return $data; diff --git a/tests/Australia/NewYearsDayTest.php b/tests/Australia/NewYearsDayTest.php index 0b0e38f61..f4dca22f0 100644 --- a/tests/Australia/NewYearsDayTest.php +++ b/tests/Australia/NewYearsDayTest.php @@ -84,7 +84,7 @@ public function HolidayDataProvider(): array [2017, '2017-01-01', '2017-01-02'], [2018, '2018-01-01', null], [2019, '2019-01-01', null], - [2020, '2020-01-01', null] + [2020, '2020-01-01', null], ]; return $data; diff --git a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php index fccf140fa..083ca1b29 100644 --- a/tests/Australia/Queensland/Brisbane/BrisbaneTest.php +++ b/tests/Australia/Queensland/Brisbane/BrisbaneTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'anzacDay', 'queensBirthday', 'labourDay', - 'peoplesDay' + 'peoplesDay', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php index 8918b21a1..fb93510ad 100644 --- a/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php +++ b/tests/Australia/Queensland/Brisbane/PeoplesDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-08-16'], [2018, '2018-08-15'], [2019, '2019-08-14'], - [2020, '2020-08-12'] + [2020, '2020-08-12'], ]; return $data; diff --git a/tests/Australia/Queensland/LabourDayTest.php b/tests/Australia/Queensland/LabourDayTest.php index c433f98e1..e938513d7 100644 --- a/tests/Australia/Queensland/LabourDayTest.php +++ b/tests/Australia/Queensland/LabourDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-05-01'], [2018, '2018-05-07'], [2019, '2019-05-06'], - [2020, '2020-05-04'] + [2020, '2020-05-04'], ]; return $data; diff --git a/tests/Australia/Queensland/QueensBirthdayTest.php b/tests/Australia/Queensland/QueensBirthdayTest.php index 74484e377..bdb214d9e 100644 --- a/tests/Australia/Queensland/QueensBirthdayTest.php +++ b/tests/Australia/Queensland/QueensBirthdayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-10-02'], [2018, '2018-10-01'], [2019, '2019-10-07'], - [2020, '2020-10-05'] + [2020, '2020-10-05'], ]; return $data; diff --git a/tests/Australia/Queensland/QueenslandTest.php b/tests/Australia/Queensland/QueenslandTest.php index 0b75c6f4c..4340c3ab0 100644 --- a/tests/Australia/Queensland/QueenslandTest.php +++ b/tests/Australia/Queensland/QueenslandTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'australiaDay', 'anzacDay', 'queensBirthday', - 'labourDay' + 'labourDay', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/SA/AdelaideCupDayTest.php b/tests/Australia/SA/AdelaideCupDayTest.php index ebf9ca7a2..35c5a1ea7 100644 --- a/tests/Australia/SA/AdelaideCupDayTest.php +++ b/tests/Australia/SA/AdelaideCupDayTest.php @@ -83,7 +83,7 @@ public function HolidayDataProvider(): array [2017, '2017-03-13'], [2018, '2018-03-12'], [2019, '2019-03-11'], - [2020, '2020-03-09'] + [2020, '2020-03-09'], ]; return $data; diff --git a/tests/Australia/SA/ChristmasDayTest.php b/tests/Australia/SA/ChristmasDayTest.php index eea76245e..d5a5c247c 100644 --- a/tests/Australia/SA/ChristmasDayTest.php +++ b/tests/Australia/SA/ChristmasDayTest.php @@ -84,7 +84,7 @@ public function HolidayDataProvider(): array [2017, '2017-12-25', null], [2018, '2018-12-25', null], [2019, '2019-12-25', null], - [2020, '2020-12-25', null] + [2020, '2020-12-25', null], ]; return $data; diff --git a/tests/Australia/SA/LabourDayTest.php b/tests/Australia/SA/LabourDayTest.php index 4d3b921af..f045656c0 100644 --- a/tests/Australia/SA/LabourDayTest.php +++ b/tests/Australia/SA/LabourDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-10-02'], [2018, '2018-10-01'], [2019, '2019-10-07'], - [2020, '2020-10-05'] + [2020, '2020-10-05'], ]; return $data; diff --git a/tests/Australia/SA/ProclamationDayTest.php b/tests/Australia/SA/ProclamationDayTest.php index feadcb62e..90971bfb5 100644 --- a/tests/Australia/SA/ProclamationDayTest.php +++ b/tests/Australia/SA/ProclamationDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-12-26'], [2018, '2018-12-26'], [2019, '2019-12-26'], - [2020, '2020-12-28'] + [2020, '2020-12-28'], ]; return $data; diff --git a/tests/Australia/SA/QueensBirthdayTest.php b/tests/Australia/SA/QueensBirthdayTest.php index 862dd5329..21df3e7a9 100644 --- a/tests/Australia/SA/QueensBirthdayTest.php +++ b/tests/Australia/SA/QueensBirthdayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-06-12'], [2018, '2018-06-11'], [2019, '2019-06-10'], - [2020, '2020-06-08'] + [2020, '2020-06-08'], ]; return $data; diff --git a/tests/Australia/SA/SATest.php b/tests/Australia/SA/SATest.php index dd240e08c..cf4d3c301 100644 --- a/tests/Australia/SA/SATest.php +++ b/tests/Australia/SA/SATest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'easterSaturday', 'queensBirthday', 'labourDay', - 'adelaideCup' + 'adelaideCup', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php index 0fe1d95aa..08a673d62 100644 --- a/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php +++ b/tests/Australia/Tasmania/CentralNorth/CentralNorthTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'queensBirthday', 'eightHourDay', 'recreationDay', - 'devonportShow' + 'devonportShow', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php index c9522f792..ad560b65f 100644 --- a/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php +++ b/tests/Australia/Tasmania/CentralNorth/DevonportShowTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-12-01'], [2018, '2018-11-30'], [2019, '2019-11-29'], - [2020, '2020-11-27'] + [2020, '2020-11-27'], ]; return $data; diff --git a/tests/Australia/Tasmania/EightHourDayTest.php b/tests/Australia/Tasmania/EightHourDayTest.php index 41dd8d7ac..afc49189b 100644 --- a/tests/Australia/Tasmania/EightHourDayTest.php +++ b/tests/Australia/Tasmania/EightHourDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-03-13'], [2018, '2018-03-12'], [2019, '2019-03-11'], - [2020, '2020-03-09'] + [2020, '2020-03-09'], ]; return $data; diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php index c50006798..b63d43e06 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandShowTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-10-20'], [2018, '2018-10-19'], [2019, '2019-10-18'], - [2020, '2020-10-16'] + [2020, '2020-10-16'], ]; return $data; diff --git a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php index 4d1a0320b..2e560e42e 100644 --- a/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php +++ b/tests/Australia/Tasmania/FlindersIsland/FlindersIslandTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'queensBirthday', 'eightHourDay', 'recreationDay', - 'flindersIslandShow' + 'flindersIslandShow', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php index aef199839..7b9451736 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandShowTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-03-07'], [2018, '2018-03-06'], [2019, '2019-03-05'], - [2020, '2020-03-03'] + [2020, '2020-03-03'], ]; return $data; diff --git a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php index a636462dc..45d3ed623 100644 --- a/tests/Australia/Tasmania/KingIsland/KingIslandTest.php +++ b/tests/Australia/Tasmania/KingIsland/KingIslandTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'queensBirthday', 'eightHourDay', 'recreationDay', - 'kingIslandShow' + 'kingIslandShow', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php index 69afb772b..59514437d 100644 --- a/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php +++ b/tests/Australia/Tasmania/Northeast/LauncestonShowTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-10-12'], [2018, '2018-10-11'], [2019, '2019-10-10'], - [2020, '2020-10-08'] + [2020, '2020-10-08'], ]; return $data; diff --git a/tests/Australia/Tasmania/Northeast/NortheastTest.php b/tests/Australia/Tasmania/Northeast/NortheastTest.php index ceeee167d..ab36b2f94 100644 --- a/tests/Australia/Tasmania/Northeast/NortheastTest.php +++ b/tests/Australia/Tasmania/Northeast/NortheastTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'queensBirthday', 'eightHourDay', 'recreationDay', - 'launcestonShow' + 'launcestonShow', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php index 38a6a3bbe..2c9d4ac89 100644 --- a/tests/Australia/Tasmania/Northwest/BurnieShowTest.php +++ b/tests/Australia/Tasmania/Northwest/BurnieShowTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-10-06'], [2018, '2018-10-05'], [2019, '2019-10-04'], - [2020, '2020-10-02'] + [2020, '2020-10-02'], ]; return $data; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php index f1f2e7724..4eaa837da 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/AGFESTTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-05-05'], [2018, '2018-05-04'], [2019, '2019-05-03'], - [2020, '2020-05-08'] + [2020, '2020-05-08'], ]; return $data; diff --git a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php index 0d3eb0ebb..3fd9a9507 100644 --- a/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php +++ b/tests/Australia/Tasmania/Northwest/CircularHead/CircularHeadTest.php @@ -44,7 +44,7 @@ public function testOfficialHolidays(): void 'eightHourDay', 'recreationDay', 'burnieShow', - 'agfest' + 'agfest', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/Tasmania/Northwest/NorthwestTest.php b/tests/Australia/Tasmania/Northwest/NorthwestTest.php index 36644172a..f702cd78d 100644 --- a/tests/Australia/Tasmania/Northwest/NorthwestTest.php +++ b/tests/Australia/Tasmania/Northwest/NorthwestTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'queensBirthday', 'eightHourDay', 'recreationDay', - 'burnieShow' + 'burnieShow', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/Tasmania/QueensBirthdayTest.php b/tests/Australia/Tasmania/QueensBirthdayTest.php index 9660704bd..7a8443fbe 100644 --- a/tests/Australia/Tasmania/QueensBirthdayTest.php +++ b/tests/Australia/Tasmania/QueensBirthdayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-06-12'], [2018, '2018-06-11'], [2019, '2019-06-10'], - [2020, '2020-06-08'] + [2020, '2020-06-08'], ]; return $data; diff --git a/tests/Australia/Tasmania/RecreationDayTest.php b/tests/Australia/Tasmania/RecreationDayTest.php index e05aa4f1e..5ef1b6912 100644 --- a/tests/Australia/Tasmania/RecreationDayTest.php +++ b/tests/Australia/Tasmania/RecreationDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-11-06'], [2018, '2018-11-05'], [2019, '2019-11-04'], - [2020, '2020-11-02'] + [2020, '2020-11-02'], ]; return $data; diff --git a/tests/Australia/Tasmania/South/HobartShowTest.php b/tests/Australia/Tasmania/South/HobartShowTest.php index 80a0ee992..a7b35c5a2 100644 --- a/tests/Australia/Tasmania/South/HobartShowTest.php +++ b/tests/Australia/Tasmania/South/HobartShowTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-10-26'], [2018, '2018-10-25'], [2019, '2019-10-24'], - [2020, '2020-10-22'] + [2020, '2020-10-22'], ]; return $data; diff --git a/tests/Australia/Tasmania/South/SouthTest.php b/tests/Australia/Tasmania/South/SouthTest.php index 6301c27df..f3dce3271 100644 --- a/tests/Australia/Tasmania/South/SouthTest.php +++ b/tests/Australia/Tasmania/South/SouthTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'queensBirthday', 'eightHourDay', 'recreationDay', - 'hobartShow' + 'hobartShow', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php index 46b688734..3431403d1 100644 --- a/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php +++ b/tests/Australia/Tasmania/South/Southeast/HobartRegattaTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-02-13'], [2018, '2018-02-12'], [2019, '2019-02-11'], - [2020, '2020-02-10'] + [2020, '2020-02-10'], ]; return $data; diff --git a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php index 0100fa5a7..9ac91057a 100644 --- a/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php +++ b/tests/Australia/Tasmania/South/Southeast/SoutheastTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'queensBirthday', 'eightHourDay', 'hobartShow', - 'hobartRegatta' + 'hobartRegatta', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/Tasmania/TasmaniaTest.php b/tests/Australia/Tasmania/TasmaniaTest.php index 5bd9473df..38639bc89 100644 --- a/tests/Australia/Tasmania/TasmaniaTest.php +++ b/tests/Australia/Tasmania/TasmaniaTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'anzacDay', 'queensBirthday', 'eightHourDay', - 'recreationDay' + 'recreationDay', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php index 6277b015f..303ce70aa 100644 --- a/tests/Australia/Victoria/AFLGrandFinalFridayTest.php +++ b/tests/Australia/Victoria/AFLGrandFinalFridayTest.php @@ -102,7 +102,7 @@ public function HolidayDataProvider(): array [2015, '2015-10-02'], [2016, '2016-09-30'], [2017, '2017-09-29'], - [2018, '2018-09-28'] + [2018, '2018-09-28'], ]; return $data; diff --git a/tests/Australia/Victoria/LabourDayTest.php b/tests/Australia/Victoria/LabourDayTest.php index 2b470e98f..0cff91fc7 100644 --- a/tests/Australia/Victoria/LabourDayTest.php +++ b/tests/Australia/Victoria/LabourDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-03-13'], [2018, '2018-03-12'], [2019, '2019-03-11'], - [2020, '2020-03-09'] + [2020, '2020-03-09'], ]; return $data; diff --git a/tests/Australia/Victoria/MelbourneCupDayTest.php b/tests/Australia/Victoria/MelbourneCupDayTest.php index 266fa06aa..cfdedd5ee 100644 --- a/tests/Australia/Victoria/MelbourneCupDayTest.php +++ b/tests/Australia/Victoria/MelbourneCupDayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-11-07'], [2018, '2018-11-06'], [2019, '2019-11-05'], - [2020, '2020-11-03'] + [2020, '2020-11-03'], ]; return $data; diff --git a/tests/Australia/Victoria/QueensBirthdayTest.php b/tests/Australia/Victoria/QueensBirthdayTest.php index d7a21ac38..edabf8864 100644 --- a/tests/Australia/Victoria/QueensBirthdayTest.php +++ b/tests/Australia/Victoria/QueensBirthdayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-06-12'], [2018, '2018-06-11'], [2019, '2019-06-10'], - [2020, '2020-06-08'] + [2020, '2020-06-08'], ]; return $data; diff --git a/tests/Australia/Victoria/VictoriaTest.php b/tests/Australia/Victoria/VictoriaTest.php index 172f99506..8794c7f71 100644 --- a/tests/Australia/Victoria/VictoriaTest.php +++ b/tests/Australia/Victoria/VictoriaTest.php @@ -45,7 +45,7 @@ public function testOfficialHolidays(): void 'queensBirthday', 'labourDay', 'aflGrandFinalFriday', - 'melbourneCup' + 'melbourneCup', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/WA/LabourDayTest.php b/tests/Australia/WA/LabourDayTest.php index dcbb32736..6f866e73a 100644 --- a/tests/Australia/WA/LabourDayTest.php +++ b/tests/Australia/WA/LabourDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-03-06'], [2018, '2018-03-05'], [2019, '2019-03-04'], - [2020, '2020-03-02'] + [2020, '2020-03-02'], ]; return $data; diff --git a/tests/Australia/WA/QueensBirthdayTest.php b/tests/Australia/WA/QueensBirthdayTest.php index 410fd4345..69c4d1c3d 100644 --- a/tests/Australia/WA/QueensBirthdayTest.php +++ b/tests/Australia/WA/QueensBirthdayTest.php @@ -73,7 +73,7 @@ public function HolidayDataProvider(): array [2017, '2017-09-25'], [2018, '2018-09-24'], [2019, '2019-09-30'], - [2020, '2020-09-28'] + [2020, '2020-09-28'], ]; return $data; diff --git a/tests/Australia/WA/WATest.php b/tests/Australia/WA/WATest.php index 285b377e3..56b5a941b 100644 --- a/tests/Australia/WA/WATest.php +++ b/tests/Australia/WA/WATest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'anzacDay', 'queensBirthday', 'labourDay', - 'westernAustraliaDay' + 'westernAustraliaDay', ], $this->region, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Australia/WA/WesternAustraliaDayTest.php b/tests/Australia/WA/WesternAustraliaDayTest.php index 7e71bded5..406767267 100644 --- a/tests/Australia/WA/WesternAustraliaDayTest.php +++ b/tests/Australia/WA/WesternAustraliaDayTest.php @@ -68,7 +68,7 @@ public function HolidayDataProvider(): array [2017, '2017-06-05'], [2018, '2018-06-04'], [2019, '2019-06-03'], - [2020, '2020-06-01'] + [2020, '2020-06-01'], ]; return $data; diff --git a/tests/Austria/AustriaTest.php b/tests/Austria/AustriaTest.php index f9e5be276..25dd8b6d6 100644 --- a/tests/Austria/AustriaTest.php +++ b/tests/Austria/AustriaTest.php @@ -44,7 +44,7 @@ public function testOfficialHolidays(): void 'pentecostMonday', 'christmasDay', 'secondChristmasDay', - 'nationalDay' + 'nationalDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Base/HolidayOnFilterTest.php b/tests/Base/HolidayOnFilterTest.php index 13fc7bf5f..b895041bd 100644 --- a/tests/Base/HolidayOnFilterTest.php +++ b/tests/Base/HolidayOnFilterTest.php @@ -43,7 +43,7 @@ public function testHolidaysOnDate(): void $holidayDates = [ 'goodFriday' => new DateTime('03/25/2016', new DateTimeZone($timezone)), 'easter' => new DateTime('03/27/2016', new DateTimeZone($timezone)), - 'summerTime' => new DateTime('03/27/2016', new DateTimeZone($timezone)) + 'summerTime' => new DateTime('03/27/2016', new DateTimeZone($timezone)), ]; foreach ($holidayDates as $name => $date) { @@ -67,7 +67,7 @@ public function testHolidaysNotOnDate(): void $holidayWrongDates = [ 'goodFriday' => new DateTime('04/25/2016', new DateTimeZone($timezone)), 'easter' => new DateTime('03/22/2016', new DateTimeZone($timezone)), - 'summerTime' => new DateTime('12/27/2016', new DateTimeZone($timezone)) + 'summerTime' => new DateTime('12/27/2016', new DateTimeZone($timezone)), ]; foreach ($holidayWrongDates as $name => $date) { diff --git a/tests/Base/HolidayTest.php b/tests/Base/HolidayTest.php index 9263eb6e7..4a1972051 100644 --- a/tests/Base/HolidayTest.php +++ b/tests/Base/HolidayTest.php @@ -157,7 +157,7 @@ public function testHolidayGetNameWithGlobalTranslations(): void $translations = [ 'en_US' => 'New Year\'s Day', - 'pl_PL' => 'Nowy Rok' + 'pl_PL' => 'Nowy Rok', ]; $translationsStub->expects($this->once())->method('getTranslations')->with($this->equalTo('newYearsDay'))->willReturn($translations); @@ -183,7 +183,7 @@ public function testHolidayGetNameWithGlobalParentLocaleTranslations(): void $translations = [ 'en_US' => 'New Year\'s Day', - 'pl' => 'Nowy Rok' + 'pl' => 'Nowy Rok', ]; $translationsStub->expects($this->once())->method('getTranslations')->with($this->equalTo('newYearsDay'))->willReturn($translations); @@ -209,7 +209,7 @@ public function testHolidayGetNameWithGlobalAndCustomTranslations(): void $translations = [ 'en_US' => 'New Year\'s Day', - 'pl_PL' => 'Nowy Rok' + 'pl_PL' => 'Nowy Rok', ]; $translationsStub->expects($this->once())->method('getTranslations')->with($this->equalTo('newYearsDay'))->willReturn($translations); @@ -241,7 +241,7 @@ public function testHolidayGetNameWithOverridenGlobalTranslations(): void $translations = [ 'en_US' => 'New Year\'s Day', - 'pl_PL' => 'Nowy Rok' + 'pl_PL' => 'Nowy Rok', ]; $translationsStub->expects($this->once())->method('getTranslations')->with($this->equalTo('newYearsDay'))->willReturn($translations); diff --git a/tests/Base/TranslationsTest.php b/tests/Base/TranslationsTest.php index 87aafc935..77c983ea1 100644 --- a/tests/Base/TranslationsTest.php +++ b/tests/Base/TranslationsTest.php @@ -28,7 +28,7 @@ class TranslationsTest extends TestCase public const LOCALES = [ 'en_US', 'nl_NL', - 'pl_PL' + 'pl_PL', ]; /** @@ -280,8 +280,8 @@ public function testLoadingMultipleTranslationsFromDirectory(): void vfsStream::setup('root', null, [ 'lang' => [ $firstShortName . '.php' => $firstFileContents, - $secondShortName . '.php' => $secondFileContents - ] + $secondShortName . '.php' => $secondFileContents, + ], ]); $translations = new Translations(self::LOCALES); diff --git a/tests/Belgium/BelgiumTest.php b/tests/Belgium/BelgiumTest.php index ad7dcb786..cc02d7e04 100644 --- a/tests/Belgium/BelgiumTest.php +++ b/tests/Belgium/BelgiumTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'nationalDay', 'allSaintsDay', 'armisticeDay', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Bosnia/BosniaTest.php b/tests/Bosnia/BosniaTest.php index bcd9dfe6b..cf2452911 100644 --- a/tests/Bosnia/BosniaTest.php +++ b/tests/Bosnia/BosniaTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'statehoodDay', 'independenceDay', - 'orthodoxChristmasDay' + 'orthodoxChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Brazil/BrazilTest.php b/tests/Brazil/BrazilTest.php index 3dbbc32d8..d30d362b2 100644 --- a/tests/Brazil/BrazilTest.php +++ b/tests/Brazil/BrazilTest.php @@ -39,7 +39,7 @@ public function testOfficialHolidays(): void 'ourLadyOfAparecidaDay', 'allSoulsDay', 'proclamationOfRepublicDay', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -55,7 +55,7 @@ public function testObservedHolidays(): void 'goodFriday', 'easter', 'corpusChristi', - 'ashWednesday' + 'ashWednesday', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/CzechRepublic/CzechRepublicTest.php b/tests/CzechRepublic/CzechRepublicTest.php index d3f448968..10eaaca3f 100644 --- a/tests/CzechRepublic/CzechRepublicTest.php +++ b/tests/CzechRepublic/CzechRepublicTest.php @@ -48,7 +48,7 @@ public function testOfficialHolidays(): void 'janHusDay', 'czechStateHoodDay', 'independentCzechoslovakStateDay', - 'struggleForFreedomAndDemocracyDay' + 'struggleForFreedomAndDemocracyDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Denmark/DenmarkTest.php b/tests/Denmark/DenmarkTest.php index 2b81f357e..f1b2d741b 100644 --- a/tests/Denmark/DenmarkTest.php +++ b/tests/Denmark/DenmarkTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'pentecost', 'pentecostMonday', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -56,7 +56,7 @@ public function testObservedHolidays(): void 'internationalWorkersDay', 'constitutionDay', 'christmasEve', - 'newYearsEve' + 'newYearsEve', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Estonia/EstoniaTest.php b/tests/Estonia/EstoniaTest.php index ec8764c60..e0512973d 100644 --- a/tests/Estonia/EstoniaTest.php +++ b/tests/Estonia/EstoniaTest.php @@ -39,7 +39,7 @@ public function testOfficialHolidays(): void 'newYearsDay', 'pentecost', 'secondChristmasDay', - 'stJohnsDay' + 'stJohnsDay', ]; $year = $this->generateRandomYear(); diff --git a/tests/Finland/FinlandTest.php b/tests/Finland/FinlandTest.php index 8c2ff0ae1..fdb321168 100644 --- a/tests/Finland/FinlandTest.php +++ b/tests/Finland/FinlandTest.php @@ -44,7 +44,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'independenceDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/France/BasRhin/BasRhinTest.php b/tests/France/BasRhin/BasRhinTest.php index c3a102753..703858060 100644 --- a/tests/France/BasRhin/BasRhinTest.php +++ b/tests/France/BasRhin/BasRhinTest.php @@ -44,7 +44,7 @@ public function testOfficialHolidays(): void 'armisticeDay', 'christmasDay', 'stStephensDay', - 'bastilleDay' + 'bastilleDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/France/FranceTest.php b/tests/France/FranceTest.php index c28e21a66..973006c19 100644 --- a/tests/France/FranceTest.php +++ b/tests/France/FranceTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'armisticeDay', 'christmasDay', - 'bastilleDay' + 'bastilleDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/France/HautRhin/HautRhinTest.php b/tests/France/HautRhin/HautRhinTest.php index 91e8bd578..c22359657 100644 --- a/tests/France/HautRhin/HautRhinTest.php +++ b/tests/France/HautRhin/HautRhinTest.php @@ -44,7 +44,7 @@ public function testOfficialHolidays(): void 'armisticeDay', 'christmasDay', 'stStephensDay', - 'bastilleDay' + 'bastilleDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/France/Moselle/MoselleTest.php b/tests/France/Moselle/MoselleTest.php index cade49f45..fe394b24a 100644 --- a/tests/France/Moselle/MoselleTest.php +++ b/tests/France/Moselle/MoselleTest.php @@ -44,7 +44,7 @@ public function testOfficialHolidays(): void 'armisticeDay', 'christmasDay', 'stStephensDay', - 'bastilleDay' + 'bastilleDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php index 400ab39d8..df9839523 100644 --- a/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php +++ b/tests/Germany/BadenWurttemberg/BadenWurttembergTest.php @@ -40,7 +40,7 @@ public function testOfficialHolidays(): void 'pentecostMonday', 'germanUnityDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Germany/Bavaria/BavariaTest.php b/tests/Germany/Bavaria/BavariaTest.php index 67a831ee9..c24b53e8b 100644 --- a/tests/Germany/Bavaria/BavariaTest.php +++ b/tests/Germany/Bavaria/BavariaTest.php @@ -40,7 +40,7 @@ public function testOfficialHolidays(): void 'pentecostMonday', 'germanUnityDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Germany/Berlin/BerlinTest.php b/tests/Germany/Berlin/BerlinTest.php index 8e71020ef..72d398b02 100644 --- a/tests/Germany/Berlin/BerlinTest.php +++ b/tests/Germany/Berlin/BerlinTest.php @@ -40,7 +40,7 @@ public function testOfficialHolidays(): void 'pentecostMonday', 'germanUnityDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Germany/Brandenburg/BrandenburgTest.php b/tests/Germany/Brandenburg/BrandenburgTest.php index bd6a985be..fb0d3a30d 100644 --- a/tests/Germany/Brandenburg/BrandenburgTest.php +++ b/tests/Germany/Brandenburg/BrandenburgTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'pentecost', 'pentecostMonday', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ]; if ($this->year >= 1990) { diff --git a/tests/Germany/Bremen/BremenTest.php b/tests/Germany/Bremen/BremenTest.php index dfb08c80c..4c3bbfa10 100644 --- a/tests/Germany/Bremen/BremenTest.php +++ b/tests/Germany/Bremen/BremenTest.php @@ -40,7 +40,7 @@ public function testOfficialHolidays(): void 'pentecostMonday', 'germanUnityDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Germany/GermanyTest.php b/tests/Germany/GermanyTest.php index 4c2773f45..9bd522eb8 100644 --- a/tests/Germany/GermanyTest.php +++ b/tests/Germany/GermanyTest.php @@ -40,7 +40,7 @@ public function testOfficialHolidays(): void 'internationalWorkersDay', 'newYearsDay', 'pentecostMonday', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Germany/Hamburg/HamburgTest.php b/tests/Germany/Hamburg/HamburgTest.php index e148625d4..166bdf723 100644 --- a/tests/Germany/Hamburg/HamburgTest.php +++ b/tests/Germany/Hamburg/HamburgTest.php @@ -40,7 +40,7 @@ public function testOfficialHolidays(): void 'pentecostMonday', 'germanUnityDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Germany/Hesse/HesseTest.php b/tests/Germany/Hesse/HesseTest.php index ed1ad26c2..56c451bc6 100644 --- a/tests/Germany/Hesse/HesseTest.php +++ b/tests/Germany/Hesse/HesseTest.php @@ -40,7 +40,7 @@ public function testOfficialHolidays(): void 'pentecostMonday', 'germanUnityDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Germany/LowerSaxony/LowerSaxonyTest.php b/tests/Germany/LowerSaxony/LowerSaxonyTest.php index 2a9fdf212..d0a82f31b 100644 --- a/tests/Germany/LowerSaxony/LowerSaxonyTest.php +++ b/tests/Germany/LowerSaxony/LowerSaxonyTest.php @@ -40,7 +40,7 @@ public function testOfficialHolidays(): void 'pentecostMonday', 'germanUnityDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php index 8602bcba3..dbff7ca3f 100644 --- a/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php +++ b/tests/Germany/MecklenburgWesternPomerania/MecklenburgWesternPomeraniaTest.php @@ -39,7 +39,7 @@ public function testOfficialHolidays(): void 'ascensionDay', 'pentecostMonday', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ]; if ($this->year >= 1990) { diff --git a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php index e13f42804..c275b29b3 100644 --- a/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php +++ b/tests/Germany/NorthRhineWestphalia/NorthRhineWestphaliaTest.php @@ -40,7 +40,7 @@ public function testOfficialHolidays(): void 'pentecostMonday', 'germanUnityDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php index c38db8ed8..fb2e3f982 100644 --- a/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php +++ b/tests/Germany/RhinelandPalatinate/RhinelandPalatinateTest.php @@ -40,7 +40,7 @@ public function testOfficialHolidays(): void 'pentecostMonday', 'germanUnityDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Germany/Saarland/SaarlandTest.php b/tests/Germany/Saarland/SaarlandTest.php index f33516aee..bff89901c 100644 --- a/tests/Germany/Saarland/SaarlandTest.php +++ b/tests/Germany/Saarland/SaarlandTest.php @@ -40,7 +40,7 @@ public function testOfficialHolidays(): void 'pentecostMonday', 'germanUnityDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -80,7 +80,7 @@ public function testOtherHolidays(): void $this->assertDefinedHolidays([ 'corpusChristi', 'assumptionOfMary', - 'allSaintsDay' + 'allSaintsDay', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Germany/Saxony/SaxonyTest.php b/tests/Germany/Saxony/SaxonyTest.php index 9dc564ef9..4e0bfccb0 100644 --- a/tests/Germany/Saxony/SaxonyTest.php +++ b/tests/Germany/Saxony/SaxonyTest.php @@ -39,7 +39,7 @@ public function testOfficialHolidays(): void 'ascensionDay', 'pentecostMonday', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ]; if ($this->year >= 1990) { diff --git a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php index b27daab43..47c01d4c1 100644 --- a/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php +++ b/tests/Germany/SaxonyAnhalt/SaxonyAnhaltTest.php @@ -39,7 +39,7 @@ public function testOfficialHolidays(): void 'ascensionDay', 'pentecostMonday', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ]; if ($this->year >= 1990) { diff --git a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php index 2d0acdc47..64fe32c0f 100644 --- a/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php +++ b/tests/Germany/SchleswigHolstein/SchleswigHolsteinTest.php @@ -40,7 +40,7 @@ public function testOfficialHolidays(): void 'pentecostMonday', 'germanUnityDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Germany/Thuringia/ThuringiaTest.php b/tests/Germany/Thuringia/ThuringiaTest.php index 579e91173..00e7e2cc7 100644 --- a/tests/Germany/Thuringia/ThuringiaTest.php +++ b/tests/Germany/Thuringia/ThuringiaTest.php @@ -39,7 +39,7 @@ public function testOfficialHolidays(): void 'ascensionDay', 'pentecostMonday', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ]; if ($this->year >= 1990) { diff --git a/tests/Greece/GreeceTest.php b/tests/Greece/GreeceTest.php index 506a2510b..96414bf85 100644 --- a/tests/Greece/GreeceTest.php +++ b/tests/Greece/GreeceTest.php @@ -46,7 +46,7 @@ public function testOfficialHolidays(): void 'christmasDay', 'cleanMonday', 'independenceDay', - 'ohiDay' + 'ohiDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Hungary/HungaryTest.php b/tests/Hungary/HungaryTest.php index d78fcddf1..05decc0fa 100644 --- a/tests/Hungary/HungaryTest.php +++ b/tests/Hungary/HungaryTest.php @@ -39,7 +39,7 @@ public function testOfficialHolidays(): void 'internationalWorkersDay', 'pentecostMonday', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ]; if ($this->year >= 1891) { diff --git a/tests/Italy/ItalyTest.php b/tests/Italy/ItalyTest.php index 1b3057aea..5f18b4c34 100644 --- a/tests/Italy/ItalyTest.php +++ b/tests/Italy/ItalyTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'christmasDay', 'stStephensDay', 'liberationDay', - 'republicDay' + 'republicDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Japan/AutumnalEquinoxDayTest.php b/tests/Japan/AutumnalEquinoxDayTest.php index 4093c0f32..0e962d950 100644 --- a/tests/Japan/AutumnalEquinoxDayTest.php +++ b/tests/Japan/AutumnalEquinoxDayTest.php @@ -85,7 +85,7 @@ public function autumnalEquinoxHolidaysProvider(): array [1999, 9, 23], [2013, 9, 23], [2016, 9, 22], - [2122, 9, 23] + [2122, 9, 23], ]; } diff --git a/tests/Japan/JapanTest.php b/tests/Japan/JapanTest.php index 5539f9c15..a311ab825 100644 --- a/tests/Japan/JapanTest.php +++ b/tests/Japan/JapanTest.php @@ -47,7 +47,7 @@ public function testOfficialHolidays(): void 'sportsDay', 'cultureDay', 'laborThanksgivingDay', - 'emperorsBirthday' + 'emperorsBirthday', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -74,7 +74,7 @@ public function testOfficialHolidaysAt2019(): void 'cultureDay', 'laborThanksgivingDay', 'coronationDay', - 'enthronementProclamationCeremony' + 'enthronementProclamationCeremony', ], self::REGION, 2019, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Japan/VernalEquinoxDayTest.php b/tests/Japan/VernalEquinoxDayTest.php index eed2ac7f7..b5f24bae0 100644 --- a/tests/Japan/VernalEquinoxDayTest.php +++ b/tests/Japan/VernalEquinoxDayTest.php @@ -86,7 +86,7 @@ public function vernalEquinoxHolidaysProvider(): array [2013, 3, 20], [2016, 3, 20], [2025, 3, 20], - [2143, 3, 21] + [2143, 3, 21], ]; } diff --git a/tests/Latvia/LatviaTest.php b/tests/Latvia/LatviaTest.php index a1a629d59..dc89c0407 100644 --- a/tests/Latvia/LatviaTest.php +++ b/tests/Latvia/LatviaTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'christmasEve', 'christmasDay', 'secondChristmasDay', - 'newYearsEve' + 'newYearsEve', ]; $year = $this->generateRandomYear(); diff --git a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php index 27465641c..da73f2125 100644 --- a/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php +++ b/tests/Latvia/ProclamationOfTheRepublicOfLatviaDayTest.php @@ -94,7 +94,7 @@ public function testTranslation(): void $this->generateRandomYear(Latvia::PROCLAMATION_OF_INDEPENDENCE_YEAR), [ self::LOCALE => 'Latvijas Republikas proklamēšanas diena', - 'en' => 'Proclamation Day of the Republic of Latvia' + 'en' => 'Proclamation Day of the Republic of Latvia', ] ); } diff --git a/tests/Latvia/RestorationOfIndependenceDayTest.php b/tests/Latvia/RestorationOfIndependenceDayTest.php index 6d5ac1c8f..13c91b7fe 100644 --- a/tests/Latvia/RestorationOfIndependenceDayTest.php +++ b/tests/Latvia/RestorationOfIndependenceDayTest.php @@ -94,7 +94,7 @@ public function testTranslation(): void $this->generateRandomYear(Latvia::RESTORATION_OF_INDEPENDENCE_YEAR), [ self::LOCALE => 'Latvijas Republikas Neatkarības atjaunošanas diena', - 'en' => 'Restoration of Independence day' + 'en' => 'Restoration of Independence day', ] ); } diff --git a/tests/Lithuania/LithuaniaTest.php b/tests/Lithuania/LithuaniaTest.php index 18664fa86..f1ce85678 100644 --- a/tests/Lithuania/LithuaniaTest.php +++ b/tests/Lithuania/LithuaniaTest.php @@ -40,7 +40,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'christmasEve', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ]; $year = $this->generateRandomYear(); diff --git a/tests/Netherlands/NetherlandsTest.php b/tests/Netherlands/NetherlandsTest.php index 9b266db06..410247746 100644 --- a/tests/Netherlands/NetherlandsTest.php +++ b/tests/Netherlands/NetherlandsTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'pentecostMonday', 'liberationDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -60,7 +60,7 @@ public function testObservedHolidays(): void 'stNicholasDay', 'carnivalDay', 'secondCarnivalDay', - 'thirdCarnivalDay' + 'thirdCarnivalDay', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } @@ -96,7 +96,7 @@ public function testOtherHolidays(): void 'fathersDay', 'mothersDay', 'epiphany', - 'princesDay' + 'princesDay', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/NewZealand/NewZealandTest.php b/tests/NewZealand/NewZealandTest.php index 56b4d6edb..6dcf3e716 100644 --- a/tests/NewZealand/NewZealandTest.php +++ b/tests/NewZealand/NewZealandTest.php @@ -40,7 +40,7 @@ public function testOfficialHolidays(): void 'waitangiDay', 'anzacDay', 'queensBirthday', - 'labourDay' + 'labourDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Norway/NorwayTest.php b/tests/Norway/NorwayTest.php index 1a4bc0e10..10871ce95 100644 --- a/tests/Norway/NorwayTest.php +++ b/tests/Norway/NorwayTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'pentecostMonday', 'constitutionDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Poland/PolandTest.php b/tests/Poland/PolandTest.php index 5ccdb8b92..a9eab30ef 100644 --- a/tests/Poland/PolandTest.php +++ b/tests/Poland/PolandTest.php @@ -44,7 +44,7 @@ public function testOfficialHolidays(): void 'corpusChristi', 'secondChristmasDay', 'constitutionDay', - 'independenceDay' + 'independenceDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Portugal/PortugalTest.php b/tests/Portugal/PortugalTest.php index e87238464..e247be2aa 100644 --- a/tests/Portugal/PortugalTest.php +++ b/tests/Portugal/PortugalTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void '25thApril', 'portugueseRepublic', 'restorationOfIndependence', - 'portugalDay' + 'portugalDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Romania/RomaniaTest.php b/tests/Romania/RomaniaTest.php index d01fb9f46..806cd74f4 100755 --- a/tests/Romania/RomaniaTest.php +++ b/tests/Romania/RomaniaTest.php @@ -46,7 +46,7 @@ public function testOfficialHolidays(): void 'stAndrewsDay', 'nationalDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ]; if ($this->year >= 2017) { diff --git a/tests/Russia/RussiaTest.php b/tests/Russia/RussiaTest.php index 957d4b9db..925536d93 100644 --- a/tests/Russia/RussiaTest.php +++ b/tests/Russia/RussiaTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'orthodoxChristmasDay', 'internationalWomensDay', 'springAndLabourDay', - 'victoryDay' + 'victoryDay', ]; $year = $this->generateRandomYear(); diff --git a/tests/Slovakia/EasterMondayTest.php b/tests/Slovakia/EasterMondayTest.php index a57f1eacc..51db336c9 100644 --- a/tests/Slovakia/EasterMondayTest.php +++ b/tests/Slovakia/EasterMondayTest.php @@ -70,7 +70,7 @@ public function HolidayDataProvider(): array [2018, new DateTime('2018-4-2', new DateTimeZone($timezone))], [2019, new DateTime('2019-4-22', new DateTimeZone($timezone))], [2020, new DateTime('2020-4-13', new DateTimeZone($timezone))], - [2050, new DateTime('2050-4-11', new DateTimeZone($timezone))] + [2050, new DateTime('2050-4-11', new DateTimeZone($timezone))], ]; } diff --git a/tests/Slovakia/GoodFridayTest.php b/tests/Slovakia/GoodFridayTest.php index 1fe83bec6..d294f9e60 100644 --- a/tests/Slovakia/GoodFridayTest.php +++ b/tests/Slovakia/GoodFridayTest.php @@ -70,7 +70,7 @@ public function HolidayDataProvider(): array [2018, new DateTime('2018-3-30', new DateTimeZone($timezone))], [2019, new DateTime('2019-4-19', new DateTimeZone($timezone))], [2020, new DateTime('2020-4-10', new DateTimeZone($timezone))], - [2050, new DateTime('2050-4-8', new DateTimeZone($timezone))] + [2050, new DateTime('2050-4-8', new DateTimeZone($timezone))], ]; } diff --git a/tests/Slovakia/SlovakiaTest.php b/tests/Slovakia/SlovakiaTest.php index 28aa34c6f..dc40b2a75 100644 --- a/tests/Slovakia/SlovakiaTest.php +++ b/tests/Slovakia/SlovakiaTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'slovakConstitutionDay', 'slovakNationalUprisingDay', 'saintsCyrilAndMethodiusDay', - 'struggleForFreedomAndDemocracyDay' + 'struggleForFreedomAndDemocracyDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -64,7 +64,7 @@ public function testBankHolidays(): void 'christmasDay', 'secondChristmasDay', 'goodFriday', - 'easterMonday' + 'easterMonday', ], self::REGION, $this->year, Holiday::TYPE_BANK); } diff --git a/tests/SouthAfrica/SouthAfricaTest.php b/tests/SouthAfrica/SouthAfricaTest.php index 2700c64bd..76c2985f1 100644 --- a/tests/SouthAfrica/SouthAfricaTest.php +++ b/tests/SouthAfrica/SouthAfricaTest.php @@ -47,7 +47,7 @@ public function testOfficialHolidays(): void 'heritageDay', 'reconciliationDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ]; if (2016 === $this->year) { diff --git a/tests/Spain/Andalusia/AndalusiaTest.php b/tests/Spain/Andalusia/AndalusiaTest.php index 9ffeddd99..71be400f8 100644 --- a/tests/Spain/Andalusia/AndalusiaTest.php +++ b/tests/Spain/Andalusia/AndalusiaTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void { $this->assertDefinedHolidays([ 'maundyThursday', - 'easter' + 'easter', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Aragon/AragonTest.php b/tests/Spain/Aragon/AragonTest.php index 38df67d82..25fa90d5d 100644 --- a/tests/Spain/Aragon/AragonTest.php +++ b/tests/Spain/Aragon/AragonTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'maundyThursday', 'easter', - 'stGeorgesDay' + 'stGeorgesDay', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Asturias/AsturiasTest.php b/tests/Spain/Asturias/AsturiasTest.php index cc5adb36e..ab84f2b65 100644 --- a/tests/Spain/Asturias/AsturiasTest.php +++ b/tests/Spain/Asturias/AsturiasTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -55,7 +55,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'stJosephsDay', 'maundyThursday', - 'easter' + 'easter', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/BalearicIslands/BalearicIslandsTest.php b/tests/Spain/BalearicIslands/BalearicIslandsTest.php index f7ab0e397..cc6c97d30 100644 --- a/tests/Spain/BalearicIslands/BalearicIslandsTest.php +++ b/tests/Spain/BalearicIslands/BalearicIslandsTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -57,7 +57,7 @@ public function testObservedHolidays(): void 'maundyThursday', 'easter', 'easterMonday', - 'stStephensDay' + 'stStephensDay', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/BasqueCountry/BasqueCountryTest.php b/tests/Spain/BasqueCountry/BasqueCountryTest.php index f10a7e3f2..928074d9f 100644 --- a/tests/Spain/BasqueCountry/BasqueCountryTest.php +++ b/tests/Spain/BasqueCountry/BasqueCountryTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -55,7 +55,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'maundyThursday', 'easter', - 'easterMonday' + 'easterMonday', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/CanaryIslands/CanaryIslandsTest.php b/tests/Spain/CanaryIslands/CanaryIslandsTest.php index 09d9c18b9..462c6ae2f 100644 --- a/tests/Spain/CanaryIslands/CanaryIslandsTest.php +++ b/tests/Spain/CanaryIslands/CanaryIslandsTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void { $this->assertDefinedHolidays([ 'maundyThursday', - 'easter' + 'easter', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Cantabria/CantabriaTest.php b/tests/Spain/Cantabria/CantabriaTest.php index e1892f9b5..29081edfe 100644 --- a/tests/Spain/Cantabria/CantabriaTest.php +++ b/tests/Spain/Cantabria/CantabriaTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void { $this->assertDefinedHolidays([ 'maundyThursday', - 'easter' + 'easter', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php index b1bbd61ea..28cb06e5c 100644 --- a/tests/Spain/CastileAndLeon/CastileAndLeonTest.php +++ b/tests/Spain/CastileAndLeon/CastileAndLeonTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void { $this->assertDefinedHolidays([ 'maundyThursday', - 'easter' + 'easter', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php index 0965fb42e..7c708ce4b 100644 --- a/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php +++ b/tests/Spain/CastillaLaMancha/CastillaLaManchaTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -55,7 +55,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'stJosephsDay', 'maundyThursday', - 'easter' + 'easter', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Catalonia/CataloniaTest.php b/tests/Spain/Catalonia/CataloniaTest.php index 84b0cd7c7..44ca20e70 100644 --- a/tests/Spain/Catalonia/CataloniaTest.php +++ b/tests/Spain/Catalonia/CataloniaTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -56,7 +56,7 @@ public function testObservedHolidays(): void 'easter', 'easterMonday', 'stJohnsDay', - 'stStephensDay' + 'stStephensDay', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Ceuta/CeutaTest.php b/tests/Spain/Ceuta/CeutaTest.php index d7adbdd2c..fa1258216 100644 --- a/tests/Spain/Ceuta/CeutaTest.php +++ b/tests/Spain/Ceuta/CeutaTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void { $this->assertDefinedHolidays([ 'maundyThursday', - 'easter' + 'easter', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php index 72d673830..8bb8bcae1 100644 --- a/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php +++ b/tests/Spain/CommunityOfMadrid/CommunityOfMadridTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -56,7 +56,7 @@ public function testObservedHolidays(): void 'stJosephsDay', 'maundyThursday', 'easter', - 'corpusChristi' + 'corpusChristi', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Extremadura/ExtremaduraTest.php b/tests/Spain/Extremadura/ExtremaduraTest.php index 41386d0c3..f80dbeb61 100644 --- a/tests/Spain/Extremadura/ExtremaduraTest.php +++ b/tests/Spain/Extremadura/ExtremaduraTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void { $this->assertDefinedHolidays([ 'maundyThursday', - 'easter' + 'easter', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Galicia/GaliciaTest.php b/tests/Spain/Galicia/GaliciaTest.php index c539fd8a3..22164492d 100644 --- a/tests/Spain/Galicia/GaliciaTest.php +++ b/tests/Spain/Galicia/GaliciaTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -56,7 +56,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'stJosephsDay', 'maundyThursday', - 'easter' + 'easter', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/LaRioja/LaRiojaTest.php b/tests/Spain/LaRioja/LaRiojaTest.php index 47b6cb2f5..29ffdc795 100644 --- a/tests/Spain/LaRioja/LaRiojaTest.php +++ b/tests/Spain/LaRioja/LaRiojaTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void { $this->assertDefinedHolidays([ 'maundyThursday', - 'easter' + 'easter', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Melilla/MelillaTest.php b/tests/Spain/Melilla/MelillaTest.php index 7a3c781aa..e6b682221 100644 --- a/tests/Spain/Melilla/MelillaTest.php +++ b/tests/Spain/Melilla/MelillaTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -54,7 +54,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'stJosephsDay', 'maundyThursday', - 'easter' + 'easter', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/Navarre/NavarreTest.php b/tests/Spain/Navarre/NavarreTest.php index ef3752571..b4be42db1 100644 --- a/tests/Spain/Navarre/NavarreTest.php +++ b/tests/Spain/Navarre/NavarreTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -55,7 +55,7 @@ public function testObservedHolidays(): void 'stJosephsDay', 'maundyThursday', 'easter', - 'easterMonday' + 'easterMonday', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php index 4eae6f999..d2155a520 100644 --- a/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php +++ b/tests/Spain/RegionOfMurcia/RegionOfMurciaTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -55,7 +55,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'stJosephsDay', 'maundyThursday', - 'easter' + 'easter', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Spain/SpainTest.php b/tests/Spain/SpainTest.php index a00a1e2d1..41a392158 100644 --- a/tests/Spain/SpainTest.php +++ b/tests/Spain/SpainTest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php index 8da5d00f4..83c198ffd 100644 --- a/tests/Spain/ValencianCommunity/ValencianCommunityTest.php +++ b/tests/Spain/ValencianCommunity/ValencianCommunityTest.php @@ -42,7 +42,7 @@ public function testOfficialHolidays(): void 'allSaintsDay', 'constitutionDay', 'immaculateConception', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -55,7 +55,7 @@ public function testObservedHolidays(): void $this->assertDefinedHolidays([ 'stJosephsDay', 'easterMonday', - 'easter' + 'easter', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Sweden/SwedenTest.php b/tests/Sweden/SwedenTest.php index 57abeb722..2a7974eef 100644 --- a/tests/Sweden/SwedenTest.php +++ b/tests/Sweden/SwedenTest.php @@ -44,7 +44,7 @@ public function testOfficialHolidays(): void 'stJohnsDay', // Midsummer's Day 'allSaintsDay', 'christmasDay', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -60,7 +60,7 @@ public function testObservedHolidays(): void 'stJohnsEve', 'allSaintsEve', 'christmasEve', - 'newYearsEve' + 'newYearsEve', ], self::REGION, $this->year, Holiday::TYPE_OBSERVANCE); } diff --git a/tests/Switzerland/Aargau/AargauTest.php b/tests/Switzerland/Aargau/AargauTest.php index 4358acd15..962f8d6aa 100644 --- a/tests/Switzerland/Aargau/AargauTest.php +++ b/tests/Switzerland/Aargau/AargauTest.php @@ -50,7 +50,7 @@ public function testRegionalHolidays(): void 'goodFriday', 'newYearsDay', 'christmasDay', - 'ascensionDay' + 'ascensionDay', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php index 50fc48fc3..3f3989248 100644 --- a/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php +++ b/tests/Switzerland/AppenzellAusserrhoden/AppenzellAusserrhodenTest.php @@ -51,7 +51,7 @@ public function testRegionalHolidays(): void 'christmasDay', 'ascensionDay', 'easterMonday', - 'pentecostMonday' + 'pentecostMonday', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php index c37ec4576..c7aae43a1 100644 --- a/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php +++ b/tests/Switzerland/AppenzellInnerrhoden/AppenzellInnerrhodenTest.php @@ -55,7 +55,7 @@ public function testRegionalHolidays(): void 'christmasDay', 'ascensionDay', 'easterMonday', - 'pentecostMonday' + 'pentecostMonday', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php index 3d037d28e..b0d8d2dda 100644 --- a/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php +++ b/tests/Switzerland/BaselLandschaft/BaselLandschaftTest.php @@ -52,7 +52,7 @@ public function testRegionalHolidays(): void 'christmasDay', 'ascensionDay', 'easterMonday', - 'pentecostMonday' + 'pentecostMonday', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/BaselStadt/BaselStadtTest.php b/tests/Switzerland/BaselStadt/BaselStadtTest.php index 86b24a483..2c0357799 100644 --- a/tests/Switzerland/BaselStadt/BaselStadtTest.php +++ b/tests/Switzerland/BaselStadt/BaselStadtTest.php @@ -52,7 +52,7 @@ public function testRegionalHolidays(): void 'christmasDay', 'ascensionDay', 'easterMonday', - 'pentecostMonday' + 'pentecostMonday', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Bern/BernTest.php b/tests/Switzerland/Bern/BernTest.php index 98d11127c..9916b59f2 100644 --- a/tests/Switzerland/Bern/BernTest.php +++ b/tests/Switzerland/Bern/BernTest.php @@ -52,7 +52,7 @@ public function testRegionalHolidays(): void 'ascensionDay', 'easterMonday', 'pentecostMonday', - 'berchtoldsTag' + 'berchtoldsTag', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Fribourg/FribourgTest.php b/tests/Switzerland/Fribourg/FribourgTest.php index df80b83b0..d4cdf155f 100644 --- a/tests/Switzerland/Fribourg/FribourgTest.php +++ b/tests/Switzerland/Fribourg/FribourgTest.php @@ -50,7 +50,7 @@ public function testRegionalHolidays(): void 'christmasDay', 'ascensionDay', 'easterMonday', - 'pentecostMonday' + 'pentecostMonday', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Geneva/GenevaTest.php b/tests/Switzerland/Geneva/GenevaTest.php index 6ed4533ce..dd0bdb1e5 100644 --- a/tests/Switzerland/Geneva/GenevaTest.php +++ b/tests/Switzerland/Geneva/GenevaTest.php @@ -50,7 +50,7 @@ public function testRegionalHolidays(): void 'christmasDay', 'ascensionDay', 'easterMonday', - 'pentecostMonday' + 'pentecostMonday', ]; if ($this->year > 1813) { diff --git a/tests/Switzerland/Glarus/GlarusTest.php b/tests/Switzerland/Glarus/GlarusTest.php index e4c943f23..564e6e5a9 100644 --- a/tests/Switzerland/Glarus/GlarusTest.php +++ b/tests/Switzerland/Glarus/GlarusTest.php @@ -54,7 +54,7 @@ public function testRegionalHolidays(): void 'easterMonday', 'pentecostMonday', 'berchtoldsTag', - 'nafelserFahrt' + 'nafelserFahrt', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Grisons/GrisonsTest.php b/tests/Switzerland/Grisons/GrisonsTest.php index e31a172d3..aac1be88a 100644 --- a/tests/Switzerland/Grisons/GrisonsTest.php +++ b/tests/Switzerland/Grisons/GrisonsTest.php @@ -51,7 +51,7 @@ public function testRegionalHolidays(): void 'christmasDay', 'ascensionDay', 'easterMonday', - 'pentecostMonday' + 'pentecostMonday', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Jura/JuraTest.php b/tests/Switzerland/Jura/JuraTest.php index aeecdabaa..c9c924c40 100644 --- a/tests/Switzerland/Jura/JuraTest.php +++ b/tests/Switzerland/Jura/JuraTest.php @@ -56,7 +56,7 @@ public function testRegionalHolidays(): void 'easterMonday', 'pentecostMonday', 'berchtoldsTag', - 'plebisciteJurassien' + 'plebisciteJurassien', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Lucerne/LucerneTest.php b/tests/Switzerland/Lucerne/LucerneTest.php index 37acdd170..a54963080 100644 --- a/tests/Switzerland/Lucerne/LucerneTest.php +++ b/tests/Switzerland/Lucerne/LucerneTest.php @@ -56,7 +56,7 @@ public function testRegionalHolidays(): void 'ascensionDay', 'easterMonday', 'pentecostMonday', - 'berchtoldsTag' + 'berchtoldsTag', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Neuchatel/NeuchatelTest.php b/tests/Switzerland/Neuchatel/NeuchatelTest.php index 61367c62b..7f9682a67 100644 --- a/tests/Switzerland/Neuchatel/NeuchatelTest.php +++ b/tests/Switzerland/Neuchatel/NeuchatelTest.php @@ -54,7 +54,7 @@ public function testRegionalHolidays(): void 'internationalWorkersDay', 'berchtoldsTag', 'bettagsMontag', - 'instaurationRepublique' + 'instaurationRepublique', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Nidwalden/NidwaldenTest.php b/tests/Switzerland/Nidwalden/NidwaldenTest.php index f1aecc32c..6adff25ca 100644 --- a/tests/Switzerland/Nidwalden/NidwaldenTest.php +++ b/tests/Switzerland/Nidwalden/NidwaldenTest.php @@ -56,7 +56,7 @@ public function testRegionalHolidays(): void 'christmasDay', 'ascensionDay', 'easterMonday', - 'pentecostMonday' + 'pentecostMonday', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Obwalden/ObwaldenTest.php b/tests/Switzerland/Obwalden/ObwaldenTest.php index 949f94c32..5dd21aec5 100644 --- a/tests/Switzerland/Obwalden/ObwaldenTest.php +++ b/tests/Switzerland/Obwalden/ObwaldenTest.php @@ -57,7 +57,7 @@ public function testRegionalHolidays(): void 'easterMonday', 'pentecostMonday', 'berchtoldsTag', - 'bruderKlausenFest' + 'bruderKlausenFest', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php index adb2d87cf..93c16bbe3 100644 --- a/tests/Switzerland/Schaffhausen/SchaffhausenTest.php +++ b/tests/Switzerland/Schaffhausen/SchaffhausenTest.php @@ -53,7 +53,7 @@ public function testRegionalHolidays(): void 'ascensionDay', 'easterMonday', 'pentecostMonday', - 'berchtoldsTag' + 'berchtoldsTag', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Schwyz/SchwyzTest.php b/tests/Switzerland/Schwyz/SchwyzTest.php index fc64713b2..9c89225c4 100644 --- a/tests/Switzerland/Schwyz/SchwyzTest.php +++ b/tests/Switzerland/Schwyz/SchwyzTest.php @@ -57,7 +57,7 @@ public function testRegionalHolidays(): void 'christmasDay', 'ascensionDay', 'easterMonday', - 'pentecostMonday' + 'pentecostMonday', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Solothurn/SolothurnTest.php b/tests/Switzerland/Solothurn/SolothurnTest.php index 63f5fdd48..51f13f1a8 100644 --- a/tests/Switzerland/Solothurn/SolothurnTest.php +++ b/tests/Switzerland/Solothurn/SolothurnTest.php @@ -50,7 +50,7 @@ public function testRegionalHolidays(): void 'newYearsDay', 'christmasDay', 'ascensionDay', - 'berchtoldsTag' + 'berchtoldsTag', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/StGallen/StGallenTest.php b/tests/Switzerland/StGallen/StGallenTest.php index 6545373cc..25ef3f378 100644 --- a/tests/Switzerland/StGallen/StGallenTest.php +++ b/tests/Switzerland/StGallen/StGallenTest.php @@ -52,7 +52,7 @@ public function testRegionalHolidays(): void 'christmasDay', 'ascensionDay', 'easterMonday', - 'pentecostMonday' + 'pentecostMonday', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Thurgau/ThurgauTest.php b/tests/Switzerland/Thurgau/ThurgauTest.php index 7d0222abb..f214114dd 100644 --- a/tests/Switzerland/Thurgau/ThurgauTest.php +++ b/tests/Switzerland/Thurgau/ThurgauTest.php @@ -53,7 +53,7 @@ public function testRegionalHolidays(): void 'ascensionDay', 'easterMonday', 'pentecostMonday', - 'berchtoldsTag' + 'berchtoldsTag', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Ticino/TicinoTest.php b/tests/Switzerland/Ticino/TicinoTest.php index 4ccbac920..bd2e521d6 100644 --- a/tests/Switzerland/Ticino/TicinoTest.php +++ b/tests/Switzerland/Ticino/TicinoTest.php @@ -58,7 +58,7 @@ public function testRegionalHolidays(): void 'epiphany', 'stJosephsDay', 'internationalWorkersDay', - 'stPeterPaul' + 'stPeterPaul', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Uri/UriTest.php b/tests/Switzerland/Uri/UriTest.php index 8b605af83..8d4095b64 100644 --- a/tests/Switzerland/Uri/UriTest.php +++ b/tests/Switzerland/Uri/UriTest.php @@ -57,7 +57,7 @@ public function testRegionalHolidays(): void 'easterMonday', 'pentecostMonday', 'stJosephsDay', - 'epiphany' + 'epiphany', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Valais/ValaisTest.php b/tests/Switzerland/Valais/ValaisTest.php index a442af4ac..67500efb9 100644 --- a/tests/Switzerland/Valais/ValaisTest.php +++ b/tests/Switzerland/Valais/ValaisTest.php @@ -52,7 +52,7 @@ public function testRegionalHolidays(): void 'assumptionOfMary', 'allSaintsDay', 'immaculateConception', - 'stJosephsDay' + 'stJosephsDay', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Vaud/VaudTest.php b/tests/Switzerland/Vaud/VaudTest.php index e41fc4bc4..2ef4757c7 100644 --- a/tests/Switzerland/Vaud/VaudTest.php +++ b/tests/Switzerland/Vaud/VaudTest.php @@ -52,7 +52,7 @@ public function testRegionalHolidays(): void 'easterMonday', 'pentecostMonday', 'berchtoldsTag', - 'bettagsMontag' + 'bettagsMontag', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Zug/ZugTest.php b/tests/Switzerland/Zug/ZugTest.php index 6827d77fc..21a5db80b 100644 --- a/tests/Switzerland/Zug/ZugTest.php +++ b/tests/Switzerland/Zug/ZugTest.php @@ -56,7 +56,7 @@ public function testRegionalHolidays(): void 'ascensionDay', 'easterMonday', 'pentecostMonday', - 'berchtoldsTag' + 'berchtoldsTag', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/Switzerland/Zurich/ZurichTest.php b/tests/Switzerland/Zurich/ZurichTest.php index b941876dd..730f6c7a1 100644 --- a/tests/Switzerland/Zurich/ZurichTest.php +++ b/tests/Switzerland/Zurich/ZurichTest.php @@ -53,7 +53,7 @@ public function testRegionalHolidays(): void 'ascensionDay', 'easterMonday', 'pentecostMonday', - 'berchtoldsTag' + 'berchtoldsTag', ], self::REGION, $this->year, Holiday::TYPE_OTHER); } diff --git a/tests/USA/USATest.php b/tests/USA/USATest.php index 45719d4d4..2b9008fcd 100644 --- a/tests/USA/USATest.php +++ b/tests/USA/USATest.php @@ -41,7 +41,7 @@ public function testOfficialHolidays(): void 'columbusDay', 'veteransDay', 'thanksgivingDay', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/Ukraine/UkraineTest.php b/tests/Ukraine/UkraineTest.php index 0bfd21e60..880a99836 100644 --- a/tests/Ukraine/UkraineTest.php +++ b/tests/Ukraine/UkraineTest.php @@ -43,7 +43,7 @@ public function testOfficialHolidays(): void 'victoryDay', 'constitutionDay', 'independenceDay', - 'defenderOfUkraineDay' + 'defenderOfUkraineDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } diff --git a/tests/UnitedKingdom/England/EnglandTest.php b/tests/UnitedKingdom/England/EnglandTest.php index 8df037b0a..b5bb2c4cd 100644 --- a/tests/UnitedKingdom/England/EnglandTest.php +++ b/tests/UnitedKingdom/England/EnglandTest.php @@ -65,7 +65,7 @@ public function testBankHolidays(): void 'easterMonday', 'mayDayBankHoliday', 'springBankHoliday', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_BANK); } diff --git a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php index 5ada4d3b4..745c2f0b5 100644 --- a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php @@ -66,7 +66,7 @@ public function testBankHolidays(): void 'mayDayBankHoliday', 'springBankHoliday', 'battleOfTheBoyne', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_BANK); } diff --git a/tests/UnitedKingdom/UnitedKingdomTest.php b/tests/UnitedKingdom/UnitedKingdomTest.php index 7f4016a4a..fd9ecf93b 100644 --- a/tests/UnitedKingdom/UnitedKingdomTest.php +++ b/tests/UnitedKingdom/UnitedKingdomTest.php @@ -33,7 +33,7 @@ public function testOfficialHolidays(): void { $this->assertDefinedHolidays([ 'goodFriday', - 'christmasDay' + 'christmasDay', ], self::REGION, $this->year, Holiday::TYPE_OFFICIAL); } @@ -66,7 +66,7 @@ public function testBankHolidays(): void 'easterMonday', 'mayDayBankHoliday', 'springBankHoliday', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_BANK); } diff --git a/tests/UnitedKingdom/Wales/WalesTest.php b/tests/UnitedKingdom/Wales/WalesTest.php index 211faf019..04ede843e 100644 --- a/tests/UnitedKingdom/Wales/WalesTest.php +++ b/tests/UnitedKingdom/Wales/WalesTest.php @@ -65,7 +65,7 @@ public function testBankHolidays(): void 'easterMonday', 'mayDayBankHoliday', 'springBankHoliday', - 'secondChristmasDay' + 'secondChristmasDay', ], self::REGION, $this->year, Holiday::TYPE_BANK); } From 0f1b028b8d69d91c5c1c16ce086186abac4638d4 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Fri, 4 Oct 2019 13:57:34 +0200 Subject: [PATCH 128/133] Change http to https links (#177) * Change http to https links * Fix broken links --- CHANGELOG.md | 4 +-- CODE_OF_CONDUCT.md | 6 ++-- CONTRIBUTING.md | 6 ++-- src/Yasumi/Provider/Australia/ACT.php | 4 +-- src/Yasumi/Provider/Australia/NSW.php | 2 +- src/Yasumi/Provider/Australia/NT.php | 2 +- src/Yasumi/Provider/Australia/SA.php | 2 +- src/Yasumi/Provider/Australia/Victoria.php | 4 +-- src/Yasumi/Provider/ChristianHolidays.php | 30 +++++++++---------- src/Yasumi/Provider/CommonHolidays.php | 20 ++++++------- src/Yasumi/Provider/France.php | 2 +- src/Yasumi/Provider/Ireland.php | 2 +- src/Yasumi/Provider/Italy.php | 4 +-- src/Yasumi/Provider/NewZealand.php | 20 ++++++------- src/Yasumi/Provider/Slovakia.php | 2 +- src/Yasumi/Provider/SouthAfrica.php | 28 ++++++++--------- src/Yasumi/Provider/Spain.php | 4 +-- src/Yasumi/Provider/Spain/Andalusia.php | 4 +-- src/Yasumi/Provider/Spain/Aragon.php | 2 +- src/Yasumi/Provider/Spain/Asturias.php | 4 +-- src/Yasumi/Provider/Spain/BalearicIslands.php | 4 +-- src/Yasumi/Provider/Spain/BasqueCountry.php | 4 +-- src/Yasumi/Provider/Spain/CanaryIslands.php | 4 +-- src/Yasumi/Provider/Spain/Cantabria.php | 4 +-- src/Yasumi/Provider/Spain/CastileAndLeon.php | 4 +-- .../Provider/Spain/CastillaLaMancha.php | 4 +-- src/Yasumi/Provider/Spain/Catalonia.php | 2 +- src/Yasumi/Provider/Spain/Ceuta.php | 4 +-- .../Provider/Spain/CommunityOfMadrid.php | 4 +-- src/Yasumi/Provider/Spain/Extremadura.php | 4 +-- src/Yasumi/Provider/Spain/Galicia.php | 6 ++-- src/Yasumi/Provider/Spain/LaRioja.php | 4 +-- src/Yasumi/Provider/Spain/Melilla.php | 2 +- src/Yasumi/Provider/Spain/Navarre.php | 2 +- src/Yasumi/Provider/Spain/RegionOfMurcia.php | 4 +-- .../Provider/Spain/ValencianCommunity.php | 4 +-- src/Yasumi/Provider/Sweden.php | 2 +- src/Yasumi/Provider/USA.php | 16 +++++----- src/Yasumi/Provider/UnitedKingdom.php | 10 +++---- .../Provider/UnitedKingdom/Scotland.php | 2 +- tests/Italy/LiberationDayTest.php | 2 +- tests/Italy/RepublicDayTest.php | 2 +- 42 files changed, 123 insertions(+), 123 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb621931c..aa913711c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # Change Log All notable changes to this project will be documented in this file. -The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org). +The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org). ## [Unreleased] @@ -143,7 +143,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p ## [1.7.0] - 2017-12-11 ### Added -- All filters implement the [Countable](http://php.net/manual/en/class.countable.php) interface allowing you to use the ->count() method. [\#77](https://github.com/azuyalabs/yasumi/issues/77) +- All filters implement the [Countable](https://php.net/manual/en/class.countable.php) interface allowing you to use the ->count() method. [\#77](https://github.com/azuyalabs/yasumi/issues/77) - Holiday Provider for Latvia. [\#70](https://github.com/azuyalabs/yasumi/pull/70) ([lukosius](https://github.com/lukosius)) - Holiday Provider for Lithuania. [\#67](https://github.com/azuyalabs/yasumi/pull/67) ([lukosius](https://github.com/lukosius)) - Sometimes it is more convenient to be able to create a Yasumi instance by ISO3166 code rather than Yasumi's Holiday Provider name. A new function `createByISO3166_2` has been added to allow for that. [\#62](https://github.com/azuyalabs/yasumi/pull/62) ([huehnerhose](https://github.com/huehnerhose)) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 4bc9e7d97..cb48dfbfe 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -40,7 +40,7 @@ Project maintainers who do not follow or enforce the Code of Conduct in good fai ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version] -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ +[homepage]: https://contributor-covenant.org +[version]: https://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c8df34d53..882e2db80 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,7 @@ When contributing there are a few guidelines we'd like you to keep in mind: $ composer format ``` - This will check/correct all the code for the PSR-2 Coding Standard using the wonderful [php-cs-fixer](http://cs.sensiolabs.org/) . + This will check/correct all the code for the PSR-2 Coding Standard using the wonderful [php-cs-fixer](https://cs.symfony.com). - **Add unit tests!** - Your Pull Request won't be accepted if it doesn't have tests: @@ -30,7 +30,7 @@ When contributing there are a few guidelines we'd like you to keep in mind: - **One pull request per feature** - If you want to contribute more than one thing, send multiple pull requests. -- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. +- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#_changing_multiple) before submitting. ## Running Tests @@ -43,4 +43,4 @@ or alternatively run with: ``` bash $ vendor/bin/phpunit -``` \ No newline at end of file +``` diff --git a/src/Yasumi/Provider/Australia/ACT.php b/src/Yasumi/Provider/Australia/ACT.php index 6a51099ed..4fc035f2e 100644 --- a/src/Yasumi/Provider/Australia/ACT.php +++ b/src/Yasumi/Provider/Australia/ACT.php @@ -59,7 +59,7 @@ public function initialize(): void * on a date based on a certain number of days after March 21st. The date of Easter Day was defined by the Council * of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the Spring Equinox. * - * @link http://en.wikipedia.org/wiki/Easter + * @link https://en.wikipedia.org/wiki/Easter * * @param int $year the year for which Easter Saturday need to be created * @param string $timezone the timezone in which Easter Saturday is celebrated @@ -91,7 +91,7 @@ private function easterSunday($year, $timezone, $locale, $type = null): Holiday * on a date based on a certain number of days after March 21st. The date of Easter Day was defined by the Council * of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the Spring Equinox. * - * @link http://en.wikipedia.org/wiki/Easter + * @link https://en.wikipedia.org/wiki/Easter * * @param int $year the year for which Easter Saturday need to be created * @param string $timezone the timezone in which Easter Saturday is celebrated diff --git a/src/Yasumi/Provider/Australia/NSW.php b/src/Yasumi/Provider/Australia/NSW.php index d1adb1ecb..df5c7567e 100644 --- a/src/Yasumi/Provider/Australia/NSW.php +++ b/src/Yasumi/Provider/Australia/NSW.php @@ -58,7 +58,7 @@ public function initialize(): void * on a date based on a certain number of days after March 21st. The date of Easter Day was defined by the Council * of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the Spring Equinox. * - * @link http://en.wikipedia.org/wiki/Easter + * @link https://en.wikipedia.org/wiki/Easter * * @param int $year the year for which Easter Saturday need to be created * @param string $timezone the timezone in which Easter Saturday is celebrated diff --git a/src/Yasumi/Provider/Australia/NT.php b/src/Yasumi/Provider/Australia/NT.php index c8423879b..53444460c 100644 --- a/src/Yasumi/Provider/Australia/NT.php +++ b/src/Yasumi/Provider/Australia/NT.php @@ -57,7 +57,7 @@ public function initialize(): void * on a date based on a certain number of days after March 21st. The date of Easter Day was defined by the Council * of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the Spring Equinox. * - * @link http://en.wikipedia.org/wiki/Easter + * @link https://en.wikipedia.org/wiki/Easter * * @param int $year the year for which Easter Saturday need to be created * @param string $timezone the timezone in which Easter Saturday is celebrated diff --git a/src/Yasumi/Provider/Australia/SA.php b/src/Yasumi/Provider/Australia/SA.php index d8b500413..1f337c229 100644 --- a/src/Yasumi/Provider/Australia/SA.php +++ b/src/Yasumi/Provider/Australia/SA.php @@ -65,7 +65,7 @@ public function initialize(): void * on a date based on a certain number of days after March 21st. The date of Easter Day was defined by the Council * of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the Spring Equinox. * - * @link http://en.wikipedia.org/wiki/Easter + * @link https://en.wikipedia.org/wiki/Easter * * @param int $year the year for which Easter Saturday need to be created * @param string $timezone the timezone in which Easter Saturday is celebrated diff --git a/src/Yasumi/Provider/Australia/Victoria.php b/src/Yasumi/Provider/Australia/Victoria.php index 9deb59faf..88a9a2ccf 100644 --- a/src/Yasumi/Provider/Australia/Victoria.php +++ b/src/Yasumi/Provider/Australia/Victoria.php @@ -59,7 +59,7 @@ public function initialize(): void * on a date based on a certain number of days after March 21st. The date of Easter Day was defined by the Council * of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the Spring Equinox. * - * @link http://en.wikipedia.org/wiki/Easter + * @link https://en.wikipedia.org/wiki/Easter * * @param int $year the year for which Easter Saturday need to be created * @param string $timezone the timezone in which Easter Saturday is celebrated @@ -91,7 +91,7 @@ private function easterSunday($year, $timezone, $locale, $type = null): Holiday * on a date based on a certain number of days after March 21st. The date of Easter Day was defined by the Council * of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the Spring Equinox. * - * @link http://en.wikipedia.org/wiki/Easter + * @link https://en.wikipedia.org/wiki/Easter * * @param int $year the year for which Easter Saturday need to be created * @param string $timezone the timezone in which Easter Saturday is celebrated diff --git a/src/Yasumi/Provider/ChristianHolidays.php b/src/Yasumi/Provider/ChristianHolidays.php index 151f3b2e2..17fe0aa28 100644 --- a/src/Yasumi/Provider/ChristianHolidays.php +++ b/src/Yasumi/Provider/ChristianHolidays.php @@ -34,7 +34,7 @@ trait ChristianHolidays * on a date based on a certain number of days after March 21st. The date of Easter Day was defined by the Council * of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the Spring Equinox. * - * @link http://en.wikipedia.org/wiki/Easter + * @link https://en.wikipedia.org/wiki/Easter * * @param int $year the year for which Easter need to be created * @param string $timezone the timezone in which Easter is celebrated @@ -75,7 +75,7 @@ public function easter(int $year, string $timezone, string $locale, string $type * * @link https://github.com/php/php-src/blob/c8aa6f3a9a3d2c114d0c5e0c9fdd0a465dbb54a5/ext/calendar/easter.c * @link http://www.gmarts.org/index.php?go=415#EasterMallen - * @link http://www.tondering.dk/claus/cal/easter.php + * @link https://www.tondering.dk/claus/cal/easter.php * */ protected function calculateEaster(int $year, string $timezone): DateTime @@ -140,7 +140,7 @@ protected function calculateEaster(int $year, string $timezone): DateTime * on a date based on a certain number of days after March 21st. The date of Easter Day was defined by the Council * of Nicaea in AD325 as the Sunday after the first full moon which falls on or after the Spring Equinox. * - * @link http://en.wikipedia.org/wiki/Easter + * @link https://en.wikipedia.org/wiki/Easter * * @param int $year the year for which Easter Monday need to be created * @param string $timezone the timezone in which Easter Monday is celebrated @@ -177,7 +177,7 @@ public function easterMonday( * Christian churches. Ascension Day is traditionally celebrated on a Thursday, the fortieth day of Easter although * some Catholic provinces have moved the observance to the following Sunday. * - * @link http://en.wikipedia.org/wiki/Feast_of_the_Ascension + * @link https://en.wikipedia.org/wiki/Feast_of_the_Ascension * * @param int $year the year for which Ascension need to be created * @param string $timezone the timezone in which Ascension is celebrated @@ -428,7 +428,7 @@ public function secondChristmasDay( * after Pentecost in Eastern Catholicism and Eastern Orthodoxy, in honour of all the saints, known and unknown. * The liturgical celebration begins at Vespers on the evening of 31 October and ends at the close of 1 November. * - * @link http://en.wikipedia.org/wiki/All_Saints%27_Day + * @link https://en.wikipedia.org/wiki/All_Saints%27_Day * * @param int $year the year for which All Saints' Day need to be created * @param string $timezone the timezone in which All Saints' Day is celebrated @@ -459,7 +459,7 @@ public function allSaintsDay( * of the Virgin Mary into Heaven at the end of her earthly life. In the churches that observe it, the * Assumption is a major feast day, commonly celebrated on August 15. * - * @link http://en.wikipedia.org/wiki/Assumption_of_Mary + * @link https://en.wikipedia.org/wiki/Assumption_of_Mary * * @param int $year the year for which the day of the Assumption of Mary need to be created * @param string $timezone the timezone in which the day of the Assumption of Mary is celebrated @@ -533,7 +533,7 @@ public function goodFriday( * for most countries is January 19 because of the 13-day difference today between that calendar and the generally * used Gregorian calendar. * - * @link http://en.wikipedia.org/wiki/Epiphany_(holiday) + * @link https://en.wikipedia.org/wiki/Epiphany_(holiday) * * @param int $year the year for which Epiphany need to be created * @param string $timezone the timezone in which Epiphany is celebrated @@ -564,7 +564,7 @@ public function epiphany( * days, if the 6 Sundays, which are not days of fast, are excluded) before Easter and can fall as early as 4 * February or as late as 10 March. * - * @link http://en.wikipedia.org/wiki/Ash_Wednesday + * @link https://en.wikipedia.org/wiki/Ash_Wednesday * * @param int $year the year for which Ash Wednesday need to be created * @param string $timezone the timezone in which Ash Wednesday is celebrated @@ -602,7 +602,7 @@ public function ashWednesday( * which is celebrated on September 8. It is one of the most important Marian feasts celebrated in the liturgical * calendar of the Roman Catholic Church. * - * @link http://en.wikipedia.org/wiki/Feast_of_the_Immaculate_Conception + * @link https://en.wikipedia.org/wiki/Feast_of_the_Immaculate_Conception * * @param int $year the year for which Immaculate Conception need to be created * @param string $timezone the timezone in which Immaculate Conception is celebrated @@ -641,7 +641,7 @@ public function immaculateConception( * December according to that calendar, which places it on 8 January of the Gregorian calendar used in secular * contexts. * - * @link http://en.wikipedia.org/wiki/St._Stephen%27s_Day + * @link https://en.wikipedia.org/wiki/St._Stephen%27s_Day * * @param int $year the year for which St. Stephen's Day need to be created * @param string $timezone the timezone in which St. Stephen's Day is celebrated @@ -680,7 +680,7 @@ public function stStephensDay( * Pope St. Pius V extended its use to the entire Roman Rite by his Apostolic Constitution Quo primum * (July 14, 1570). Since 1969, Episcopal Conferences may, if they wish, transfer it to a date outside Lent. * - * @link http://en.wikipedia.org/wiki/St_Joseph's_Day + * @link https://en.wikipedia.org/wiki/St_Joseph's_Day * * @param int $year the year for which St. Joseph's Day need to be created * @param string $timezone the timezone in which St. Joseph's Day is celebrated @@ -712,7 +712,7 @@ public function stJosephsDay( * Maundy and Last Supper of Jesus Christ with the Apostles as described in the Canonical gospels. It is the fifth * day of Holy Week, and is preceded by Holy Wednesday and followed by Good Friday. * - * @link http://en.wikipedia.org/wiki/Maundy_Thursday + * @link https://en.wikipedia.org/wiki/Maundy_Thursday * * @param int $year the year for which Maundy Thursday need to be created * @param string $timezone the timezone in which Maundy Thursday is celebrated @@ -750,7 +750,7 @@ public function maundyThursday( * celebrated on 23 April, the traditionally accepted date of Saint George's death in 303 AD. For Eastern Orthodox * Churches (which use the Julian calendar), '23 April' currently falls on 6 May of the Gregorian calendar. * - * @link http://en.wikipedia.org/wiki/St_George%27s_Day + * @link https://en.wikipedia.org/wiki/St_George%27s_Day * * @param int $year the year for which St. George's Day need to be created * @param string $timezone the timezone in which St. George's Day is celebrated @@ -855,8 +855,8 @@ public function annunciation( * @return DateTime date of Orthodox Easter * * @throws \Exception - * @link https://en.wikipedia.org/wiki/Computus#Adaptation_for_Western_Easter_of_Meeus.27_Julian_algorithm - * @link http://php.net/manual/en/function.easter-date.php#83794 + * @link https://en.wikipedia.org/wiki/Computus#Meeus.27s_Julian_algorithm + * @link https://www.php.net/manual/en/function.easter-date.php#83794 */ public function calculateOrthodoxEaster(int $year, string $timezone): DateTime { diff --git a/src/Yasumi/Provider/CommonHolidays.php b/src/Yasumi/Provider/CommonHolidays.php index a417c6ab6..a5481722e 100644 --- a/src/Yasumi/Provider/CommonHolidays.php +++ b/src/Yasumi/Provider/CommonHolidays.php @@ -33,7 +33,7 @@ trait CommonHolidays * calendar, New Year's Eve is probably the most celebrated holiday, often observed with fireworks at the stroke of * midnight as the new year starts in each time zone. * - * @link http://en.wikipedia.org/wiki/New_Year%27s_Eve + * @link https://en.wikipedia.org/wiki/New_Year%27s_Eve * * @param int $year the year for which New Year's Eve need to be created * @param string $timezone the timezone in which New Year's Eve is celebrated @@ -67,7 +67,7 @@ public function newYearsEve( * is probably the most celebrated public holiday, often observed with fireworks at the stroke of midnight as the * new year starts in each time zone. * - * @link http://en.wikipedia.org/wiki/New_Year%27s_Day + * @link https://en.wikipedia.org/wiki/New_Year%27s_Day * * @param int $year the year for which New Year's Day need to be created * @param string $timezone the timezone in which New Year's Day is celebrated @@ -100,7 +100,7 @@ public function newYearsDay( * Workers' Day by the Socialists and Communists of the Second International to commemorate the Haymarket affair in * Chicago that occurred on 4 May, 1886. * - * @link http://en.wikipedia.org/wiki/International_Workers%27_Day + * @link https://en.wikipedia.org/wiki/International_Workers%27_Day * * @param int $year the year for which International Workers' Day need to be created * @param string $timezone the timezone in which International Workers' Day is celebrated @@ -139,7 +139,7 @@ public function internationalWorkersDay( * love for each other by presenting flowers, offering confectionery, and sending greeting cards (known as * "valentines"). * - * @link http://en.wikipedia.org/wiki/Valentine%27s_Day + * @link https://en.wikipedia.org/wiki/Valentine%27s_Day * * @param int $year the year for which Valentine's Day need to be created * @param string $timezone the timezone in which Valentine's Day is celebrated @@ -176,7 +176,7 @@ public function valentinesDay( * 4, the Feast Day of St Francis of Assisi, the patron saint of animals. It started in 1931 at a convention of * ecologists in Florence, Italy who wished to highlight the plight of endangered species. * - * @link http://en.wikipedia.org/wiki/World_Animal_Day + * @link https://en.wikipedia.org/wiki/World_Animal_Day * * @param int $year the year for which World Animal Day need to be created * @param string $timezone the timezone in which World Animal Day is celebrated @@ -215,7 +215,7 @@ public function worldAnimalDay( * held where farm laborers would seek new posts. November 11 is the feast day of St. Martin of Tours, who started * out as a Roman soldier. * - * @link http://en.wikipedia.org/wiki/St._Martin%27s_Day + * @link https://en.wikipedia.org/wiki/St._Martin%27s_Day * * @param int $year the year for which St. Martin's Day need to be created * @param string $timezone the timezone in which St. Martin's Day is celebrated @@ -253,7 +253,7 @@ public function stMartinsDay( * on other days by many other countries. Father's Day was created to complement Mother's Day, a celebration that * honors mothers and motherhood. * - * @link http://en.wikipedia.org/wiki/Father%27s_Day + * @link https://en.wikipedia.org/wiki/Father%27s_Day * * @param int $year the year for which Father's Day need to be created * @param string $timezone the timezone in which Father's Day is celebrated @@ -291,7 +291,7 @@ public function fathersDay( * the months of March or May. It complements similar celebrations honoring family members, such as Father's Day and * Siblings Day. * - * @link http://en.wikipedia.org/wiki/Mother%27s_Day + * @link https://en.wikipedia.org/wiki/Mother%27s_Day * * @param int $year the year for which Mother's Day need to be created * @param string $timezone the timezone in which Mother's Day is celebrated @@ -329,7 +329,7 @@ public function mothersDay( * Germany's unconditional surrender of its armed forces. It thus marked the end of World War II in Europe. Some * countries commemorate the end of the war on a different date. * - * @link http://en.wikipedia.org/wiki/Victory_in_Europe_Day + * @link https://en.wikipedia.org/wiki/Victory_in_Europe_Day * * @param int $year the year for which Victory in Europe Day need to be created * @param string $timezone the timezone in which Victory in Europe Day is celebrated @@ -369,7 +369,7 @@ public function victoryInEuropeDay( * day of the Armistice of Villa Giusti. In the Netherlands, Denmark and Norway World War I is not commemorated as * the three countries all remained neutral. * - * @link http://en.wikipedia.org/wiki/Armistice_Day + * @link https://en.wikipedia.org/wiki/Armistice_Day * * @param int $year the year for which Armistice Day need to be created * @param string $timezone the timezone in which Armistice Day is celebrated diff --git a/src/Yasumi/Provider/France.php b/src/Yasumi/Provider/France.php index a166907dd..b6668b6a9 100755 --- a/src/Yasumi/Provider/France.php +++ b/src/Yasumi/Provider/France.php @@ -77,7 +77,7 @@ public function initialize(): void * is held on the morning of 14 July, on the Champs-Élysées in Paris in front of the President of the Republic, * French officials and foreign guests. * - * @link http://en.wikipedia.org/wiki/Bastille_Day + * @link https://en.wikipedia.org/wiki/Bastille_Day * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Ireland.php b/src/Yasumi/Provider/Ireland.php index 4bf000ba4..0fd211222 100644 --- a/src/Yasumi/Provider/Ireland.php +++ b/src/Yasumi/Provider/Ireland.php @@ -82,7 +82,7 @@ public function initialize(): void * Ireland. It became a public holiday following the Holidays (Employees) Act 1973. The public holiday was first * observed in 1974. * - * @link http://www.timeanddate.com/holidays/ireland/new-year-day + * @link https://www.timeanddate.com/holidays/ireland/new-year-day * @link http://www.irishstatutebook.ie/eli/1974/si/341 * * @TODO : Check substitution of New Years Day when it falls on a Saturday. The Holidays (Employees) Act 1973 diff --git a/src/Yasumi/Provider/Italy.php b/src/Yasumi/Provider/Italy.php index 6f98cfd18..1e4bd58ac 100755 --- a/src/Yasumi/Provider/Italy.php +++ b/src/Yasumi/Provider/Italy.php @@ -71,7 +71,7 @@ public function initialize(): void * Nazi occupation of the country. On May 27, 1949, bill 260 made the anniversary a permanent, annual national * holiday. * - * @link http://en.wikipedia.org/wiki/Liberation_Day_%28Italy%29 + * @link https://en.wikipedia.org/wiki/Liberation_Day_%28Italy%29 * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -99,7 +99,7 @@ private function calculateLiberationDay(): void * in 1946, in which the Italian people were called to the polls to decide on the form of government, following * the Second World War and the fall of Fascism. * - * @link http://en.wikipedia.org/wiki/Festa_della_Repubblica + * @link https://en.wikipedia.org/wiki/Festa_della_Repubblica * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/NewZealand.php b/src/Yasumi/Provider/NewZealand.php index 3c3e7b7df..f190cc6fe 100644 --- a/src/Yasumi/Provider/NewZealand.php +++ b/src/Yasumi/Provider/NewZealand.php @@ -64,9 +64,9 @@ public function initialize(): void * if either of these holidays occur on a weekend, the dates need to be adjusted. * * @link https://en.wikipedia.org/wiki/Public_holidays_in_New_Zealand#Statutory_holidays - * @link http://www.timeanddate.com/holidays/new-zealand/new-year-day - * @link http://www.timeanddate.com/holidays/new-zealand/day-after-new-years-day - * @link http://employment.govt.nz/er/holidaysandleave/publicholidays/mondayisation.asp + * @link https://www.timeanddate.com/holidays/new-zealand/new-year-day + * @link https://www.timeanddate.com/holidays/new-zealand/day-after-new-years-day + * @link https://www.employment.govt.nz/leave-and-holidays/public-holidays/public-holidays-falling-on-a-weekend/ * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -106,7 +106,7 @@ private function calculateNewYearHolidays(): void * the Monday that immediately follows becomes a public holiday. * * @link https://en.wikipedia.org/wiki/Waitangi_Day - * @link http://employment.govt.nz/er/holidaysandleave/publicholidays/mondayisation.asp + * @link https://www.employment.govt.nz/leave-and-holidays/public-holidays/public-holidays-falling-on-a-weekend/ * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -136,7 +136,7 @@ private function calculateWaitangiDay(): void * Observed on 25 April each year. * * @link https://en.wikipedia.org/wiki/Anzac_Day - * @link http://employment.govt.nz/er/holidaysandleave/publicholidays/mondayisation.asp + * @link https://www.employment.govt.nz/leave-and-holidays/public-holidays/public-holidays-falling-on-a-weekend/ * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -169,7 +169,7 @@ private function calculateAnzacDay(): void * * Her actual birthday is on April 21, but it's celebrated as a public holiday on the first Monday of June. * - * @link http://www.timeanddate.com/holidays/new-zealand/queen-birthday + * @link https://www.timeanddate.com/holidays/new-zealand/queen-birthday * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -202,7 +202,7 @@ private function calculateQueensBirthday(): void * second Wednesday in October in 1900. The holiday was moved to the fourth Monday of October in 1910 * has remained on this date since then. * - * @link http://www.timeanddate.com/holidays/new-zealand/labour-day + * @link https://www.timeanddate.com/holidays/new-zealand/labour-day * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -229,9 +229,9 @@ private function calculateLabourDay(): void * Christmas day, and Boxing day are public holidays in New Zealand, * they are subject to mondayisation rules. * - * @link http://www.timeanddate.com/holidays/new-zealand/boxing-day - * @link http://www.timeanddate.com/holidays/new-zealand/christmas-day - * @link http://employment.govt.nz/er/holidaysandleave/publicholidays/mondayisation.asp + * @link https://www.timeanddate.com/holidays/new-zealand/boxing-day + * @link https://www.timeanddate.com/holidays/new-zealand/christmas-day + * @link https://www.employment.govt.nz/leave-and-holidays/public-holidays/public-holidays-falling-on-a-weekend/ * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Slovakia.php b/src/Yasumi/Provider/Slovakia.php index 260f676c7..79d9773e1 100644 --- a/src/Yasumi/Provider/Slovakia.php +++ b/src/Yasumi/Provider/Slovakia.php @@ -27,7 +27,7 @@ * dňoch pracovného pokoja a pamätných dňoch" * [national law] * - * 2/ http://www.zakonypreludi.sk/zz/1993-241 + * 2/ https://www.zakonypreludi.sk/zz/1993-241 * * * English: diff --git a/src/Yasumi/Provider/SouthAfrica.php b/src/Yasumi/Provider/SouthAfrica.php index d02bc0e8d..15e9f7422 100644 --- a/src/Yasumi/Provider/SouthAfrica.php +++ b/src/Yasumi/Provider/SouthAfrica.php @@ -88,7 +88,7 @@ public function initialize(): void * 1996, 35 years after the fateful events of 21 March 1960 when demonstrators in Sharpeville were gunned down by * police. * - * @link http://www.gov.za/about-sa/public-holidays#21march + * @link https://www.gov.za/about-sa/public-holidays#21march * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -110,7 +110,7 @@ private function calculateHumanRightsDay(): void * * Family Day in South Africa takes place on the Monday following Easter Sunday. * - * @link http://www.gov.za/sites/www.gov.za/files/Act36of1994.pdf + * @link https://www.gov.za/documents/public-holidays-act * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -132,8 +132,8 @@ private function calculateFamilyDay(): void * * Freedom Day commemorates the first democratic elections held in South Africa on 27 April 1994. * - * @link http://www.gov.za/sites/www.gov.za/files/Act36of1994.pdf - * @link http://www.gov.za/freedom-day-2014 + * @link https://www.gov.za/documents/public-holidays-act + * @link https://www.gov.za/freedom-day-2014 * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -159,8 +159,8 @@ private function calculateFreedomDay(): void * police, and the violence that ensued during the next few weeks, approximately 700 hundred people, many of them * youths, were killed and property destroyed. Youth Day, previously known as Soweto Day, commemorates these events. * - * @link http://www.gov.za/sites/www.gov.za/files/Act36of1994.pdf - * @link http://www.gov.za/youth-day-2014 + * @link https://www.gov.za/documents/public-holidays-act + * @link https://www.gov.za/youth-day-2014 * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -183,7 +183,7 @@ private function calculateYouthDay(): void * President Jacob Zuma has declared 3 August 2016, the date of the 2016 Municipal Elections, a public holiday. The * purpose is to enable all South Africans who are eligible to vote to exercise their right on 3 August 2016. * - * @link http://www.gov.za/speeches/president-jacob-zuma-declares-3-august-2016-public-holiday-24-jun-2016-0000 + * @link https://www.gov.za/speeches/president-jacob-zuma-declares-3-august-2016-public-holiday-24-jun-2016-0000 * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -211,8 +211,8 @@ private function calculate2016MunicipalElectionsDay(): void * (legislation that required African persons to carry a document on them to 'prove' that they were allowed to enter * a 'white area'). * - * @link http://www.gov.za/about-sa/public-holidays#women - * @link http://www.gov.za/womens-day + * @link https://www.gov.za/about-sa/public-holidays#women + * @link https://www.gov.za/womens-day * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -236,8 +236,8 @@ private function calculateNationalWomensDay(): void * Africans celebrate the day by remembering the cultural heritage of the many cultures that make up the population * of South Africa. * - * @link http://www.gov.za/sites/www.gov.za/files/Act36of1994.pdf - * @link http://www.gov.za/heritage-day-2014 + * @link https://www.gov.za/documents/public-holidays-act + * @link https://www.gov.za/heritage-day-2014 * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -263,8 +263,8 @@ private function calculateHeritageDay(): void * of democracy in South Africa 16 December retained its status as a public holiday, however, this time with the * purpose of fostering reconciliation and national unity. * - * @link http://www.gov.za/sites/www.gov.za/files/Act36of1994.pdf - * @link http://www.gov.za/day-reconciliation-2014 + * @link https://www.gov.za/documents/public-holidays-act + * @link https://www.gov.za/day-reconciliation-2014 * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -290,7 +290,7 @@ private function calculateDayOfReconciliation(): void * Note: Not entirely sure if this is a common rule as the Public Holidays Act doesn't mention such specific * situation. * - * @link http://www.gov.za/sites/www.gov.za/files/Act36of1994.pdf + * @link https://www.gov.za/documents/public-holidays-act * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Spain.php b/src/Yasumi/Provider/Spain.php index df629eef9..5f235d330 100755 --- a/src/Yasumi/Provider/Spain.php +++ b/src/Yasumi/Provider/Spain.php @@ -71,7 +71,7 @@ public function initialize(): void * Hispanidad, the international Hispanic community. On November 27, 1981, a royal decree established Día de la * Hispanidad as a national holiday. * - * @link http://en.wikipedia.org/wiki/Fiesta_Nacional_de_España + * @link https://en.wikipedia.org/wiki/Fiesta_Nacional_de_España * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -97,7 +97,7 @@ private function calculateNationalDay(): void * 1978. In this referendum, a new constitution was approved. This was an important step in Spain's transition to * becoming a constitutional monarchy and democracy. * - * @link http://www.timeanddate.com/holidays/spain/constitution-day + * @link https://www.timeanddate.com/holidays/spain/constitution-day * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Spain/Andalusia.php b/src/Yasumi/Provider/Spain/Andalusia.php index cafb20a67..a83456f93 100755 --- a/src/Yasumi/Provider/Spain/Andalusia.php +++ b/src/Yasumi/Provider/Spain/Andalusia.php @@ -27,7 +27,7 @@ * autonomous community is officially recognized as a nationality of Spain. The territory is divided into eight * provinces: Almería, Cádiz, Córdoba, Granada, Huelva, Jaén, Málaga and Seville. Its capital is the city of Seville. * - * @link http://en.wikipedia.org/wiki/Andalusia + * @link https://en.wikipedia.org/wiki/Andalusia */ class Andalusia extends Spain { @@ -66,7 +66,7 @@ public function initialize(): void * for the statute that made Andalusia an autonomous community of Andalusia (Spain). The Day of Andalucía is not a * public holiday in the rest of Spain on February 28. * - * @link http://en.wikipedia.org/wiki/D%C3%ADa_de_Andaluc%C3%ADa + * @link https://en.wikipedia.org/wiki/D%C3%ADa_de_Andaluc%C3%ADa * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Spain/Aragon.php b/src/Yasumi/Provider/Spain/Aragon.php index 0c813743b..4456608a1 100755 --- a/src/Yasumi/Provider/Spain/Aragon.php +++ b/src/Yasumi/Provider/Spain/Aragon.php @@ -26,7 +26,7 @@ * Teruel. Its capital is Zaragoza (also called Saragossa in English). The current Statute of Autonomy declares Aragon a * nationality of Spain. * - * @link http://en.wikipedia.org/wiki/Aragon + * @link https://en.wikipedia.org/wiki/Aragon */ class Aragon extends Spain { diff --git a/src/Yasumi/Provider/Spain/Asturias.php b/src/Yasumi/Provider/Spain/Asturias.php index a3af1fe74..463e0a4dc 100755 --- a/src/Yasumi/Provider/Spain/Asturias.php +++ b/src/Yasumi/Provider/Spain/Asturias.php @@ -28,7 +28,7 @@ * Middle Ages. Divided into eight comarcas (counties), the autonomous community of Asturias is bordered by Cantabria to * the east, by Castile and León to the south, by Galicia to the west, and by the Bay of Biscay to the north. * - * @link http://en.wikipedia.org/wiki/Asturias + * @link https://en.wikipedia.org/wiki/Asturias */ class Asturias extends Spain { @@ -68,7 +68,7 @@ public function initialize(): void * June 28, 1984. This date was chosen as it is the day on which the birth of Mary is traditionally celebrated. * The public holiday was first observed on September 8, 1984. * - * @link http://www.timeanddate.com/holidays/spain/asturias-day + * @link https://www.timeanddate.com/holidays/spain/asturias-day * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Spain/BalearicIslands.php b/src/Yasumi/Provider/Spain/BalearicIslands.php index a3c25a3f9..dc6466a91 100755 --- a/src/Yasumi/Provider/Spain/BalearicIslands.php +++ b/src/Yasumi/Provider/Spain/BalearicIslands.php @@ -27,7 +27,7 @@ * Iberian Peninsula. The four largest islands are Majorca, Minorca, Ibiza and Formentera. There are many minor islands * and islets in close proximity to the larger islands, including Cabrera, Dragonera and S'Espalmador. * - * @link http://en.wikipedia.org/wiki/Balearic_Islands + * @link https://en.wikipedia.org/wiki/Balearic_Islands */ class BalearicIslands extends Spain { @@ -68,7 +68,7 @@ public function initialize(): void * which are part of Spain, on March 1 each year. This date commemorates when the Balearic Islands' Statute of * Autonomy came into effect on March 1, 1983. * - * @link http://www.timeanddate.com/holidays/spain/the-balearic-islands-day + * @link https://www.timeanddate.com/holidays/spain/the-balearic-islands-day * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Spain/BasqueCountry.php b/src/Yasumi/Provider/Spain/BasqueCountry.php index 17acdd4dc..1db204f40 100755 --- a/src/Yasumi/Provider/Spain/BasqueCountry.php +++ b/src/Yasumi/Provider/Spain/BasqueCountry.php @@ -26,7 +26,7 @@ * The Basque Country is an autonomous community of northern Spain. It includes the Basque provinces of Álava, Biscay * and Gipuzkoa, also called Historical Territories. * - * @link http://en.wikipedia.org/wiki/Basque_Country_(autonomous_community) + * @link https://en.wikipedia.org/wiki/Basque_Country_(autonomous_community) */ class BasqueCountry extends Spain { @@ -68,7 +68,7 @@ public function initialize(): void * * In 2016, this holiday is replaced by the Day of the First Constitiution of the Basque Country. * - * @link http://www.officeholidays.com/countries/spain/basque_community_day.php + * @link https://www.officeholidays.com/holidays/day-of-the-basque-country * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Spain/CanaryIslands.php b/src/Yasumi/Provider/Spain/CanaryIslands.php index 51950b6b9..84a33d556 100755 --- a/src/Yasumi/Provider/Spain/CanaryIslands.php +++ b/src/Yasumi/Provider/Spain/CanaryIslands.php @@ -28,7 +28,7 @@ * Spain's 17 autonomous communities and are among the outermost regions of the European Union proper. The main islands * are (from largest to smallest) Tenerife, Fuerteventura, Gran Canaria, Lanzarote, La Palma, La Gomera and El Hierro. * - * @link http://en.wikipedia.org/wiki/Canary_Islands + * @link https://en.wikipedia.org/wiki/Canary_Islands */ class CanaryIslands extends Spain { @@ -67,7 +67,7 @@ public function initialize(): void * year. This event celebrates the islands' culture and people. It also marks the anniversary of the autonomous * Canary Islands Parliament's first session, which was on May 30, 1983. * - * @link http://www.timeanddate.com/holidays/spain/canaries-day-observed + * @link https://www.timeanddate.com/holidays/spain/canaries-day * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Spain/Cantabria.php b/src/Yasumi/Provider/Spain/Cantabria.php index 64beb44b2..c7fd37b68 100755 --- a/src/Yasumi/Provider/Spain/Cantabria.php +++ b/src/Yasumi/Provider/Spain/Cantabria.php @@ -28,7 +28,7 @@ * (provinces of León, Palencia and Burgos), on the west by the Principality of Asturias, and on the north by the * Cantabrian Sea (Bay of Biscay). * - * @link http://en.wikipedia.org/wiki/Cantabria + * @link https://en.wikipedia.org/wiki/Cantabria */ class Cantabria extends Spain { @@ -71,7 +71,7 @@ public function initialize(): void * "Special Regional Interest" in 1983. Following the establishment of the autonomous community of Cantabria in * 1982, the event became known as the Day of Cantabria. * - * @link http://www.timeanddate.com/holidays/spain/cantabria-day + * @link https://www.timeanddate.com/holidays/spain/cantabria-day * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Spain/CastileAndLeon.php b/src/Yasumi/Provider/Spain/CastileAndLeon.php index 2a798fdf7..2c9609b5c 100755 --- a/src/Yasumi/Provider/Spain/CastileAndLeon.php +++ b/src/Yasumi/Provider/Spain/CastileAndLeon.php @@ -29,7 +29,7 @@ * 910 of the Kingdom of Castile appears in 1230 and again in 1230. It is the largest autonomous community in Spain and * the third largest region of the European Union * - * @link http://en.wikipedia.org/wiki/Castile_and_León + * @link https://en.wikipedia.org/wiki/Castile_and_León */ class CastileAndLeon extends Spain { @@ -68,7 +68,7 @@ public function initialize(): void * Comuneros were dealt a crushing defeat by the royalist forces of King Charles I in the Revolt of the Comuneros on * April 23, 1521. * - * @link http://en.wikipedia.org/wiki/Castile_and_León_Day + * @link https://en.wikipedia.org/wiki/Castile_and_León_Day * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Spain/CastillaLaMancha.php b/src/Yasumi/Provider/Spain/CastillaLaMancha.php index e5a590d13..d3bd12912 100755 --- a/src/Yasumi/Provider/Spain/CastillaLaMancha.php +++ b/src/Yasumi/Provider/Spain/CastillaLaMancha.php @@ -29,7 +29,7 @@ * communities. Albacete is the largest and most populous city. Its capital city is Toledo, and its judicial capital * city is Albacete. * - * @link http://en.wikipedia.org/wiki/Castilla-La_Mancha + * @link https://en.wikipedia.org/wiki/Castilla-La_Mancha */ class CastillaLaMancha extends Spain { @@ -71,7 +71,7 @@ public function initialize(): void * first time on May 31, 1983. The Day of Castilla-La Mancha was a public holiday for the first time on * May 31, 1984. * - * @link http://www.timeanddate.com/holidays/spain/castile-la-mancha-day + * @link https://www.timeanddate.com/holidays/spain/castile-la-mancha-day * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Spain/Catalonia.php b/src/Yasumi/Provider/Spain/Catalonia.php index e62463917..b7cba08c7 100755 --- a/src/Yasumi/Provider/Spain/Catalonia.php +++ b/src/Yasumi/Provider/Spain/Catalonia.php @@ -30,7 +30,7 @@ * Catalonia is bordered by France and Andorra to the north, the Mediterranean Sea to the east, and the Spanish regions * of Aragon and the Valencian Community to west and south respectively. * - * @link http://en.wikipedia.org/wiki/Catalonia + * @link https://en.wikipedia.org/wiki/Catalonia */ class Catalonia extends Spain { diff --git a/src/Yasumi/Provider/Spain/Ceuta.php b/src/Yasumi/Provider/Spain/Ceuta.php index de8807b7c..5c6c70bac 100755 --- a/src/Yasumi/Provider/Spain/Ceuta.php +++ b/src/Yasumi/Provider/Spain/Ceuta.php @@ -27,7 +27,7 @@ * Africa, sharing a western border with Morocco. Separated from the Iberian peninsula by the Strait of Gibraltar, Ceuta * lies along the boundary between the Mediterranean Sea and the Atlantic Ocean. * - * @link http://en.wikipedia.org/wiki/Ceuta + * @link https://en.wikipedia.org/wiki/Ceuta */ class Ceuta extends Spain { @@ -65,7 +65,7 @@ public function initialize(): void * This local holiday marks the date when Pedro de Menezes (or Meneses), Count of Viana do Alentejo, took control of * the city from King John I of Portugal on September 2, 1415. * - * @link http://www.timeanddate.com/holidays/spain/the-independent-city-ceuta-day + * @link https://www.timeanddate.com/holidays/spain/the-independent-city-ceuta-day * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php index 848857e76..699b35de3 100755 --- a/src/Yasumi/Provider/Spain/CommunityOfMadrid.php +++ b/src/Yasumi/Provider/Spain/CommunityOfMadrid.php @@ -29,7 +29,7 @@ * city of Madrid, which is also the national capital of Spain. It is bounded to the south and east by Castile–La Mancha * and to the north and west by Castile and León. * - * @link http://en.wikipedia.org/wiki/Community_of_Madrid + * @link https://en.wikipedia.org/wiki/Community_of_Madrid */ class CommunityOfMadrid extends Spain { @@ -72,7 +72,7 @@ public function initialize(): void * Malasaña in memory of one of the heroines of the revolt, the teenager Manuela Malasaña, who was executed by * French troops in the aftermath of the revolt. * - * @link http://en.wikipedia.org/wiki/Dos_de_Mayo_Uprising + * @link https://en.wikipedia.org/wiki/Dos_de_Mayo_Uprising * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Spain/Extremadura.php b/src/Yasumi/Provider/Spain/Extremadura.php index 0433440fe..912778ccf 100755 --- a/src/Yasumi/Provider/Spain/Extremadura.php +++ b/src/Yasumi/Provider/Spain/Extremadura.php @@ -28,7 +28,7 @@ * Salamanca and Ávila); to the south, it borders Andalusia (provinces of Huelva, Seville, and Córdoba); and to the * east, it borders Castile–La Mancha (provinces of Toledo and Ciudad Real). * - * @link http://en.wikipedia.org/wiki/Extremadura + * @link https://en.wikipedia.org/wiki/Extremadura */ class Extremadura extends Spain { @@ -68,7 +68,7 @@ public function initialize(): void * A law enacted on June 3, 1985, proclaimed September 8 to be a public holiday known as the Day of Extremadura. * The public holiday was first observed on September 8, 1985. * - * @link http://www.timeanddate.com/holidays/spain/extremadura-day + * @link https://www.timeanddate.com/holidays/spain/extremadura-day * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Spain/Galicia.php b/src/Yasumi/Provider/Spain/Galicia.php index 2b05bb4f9..a03815983 100755 --- a/src/Yasumi/Provider/Spain/Galicia.php +++ b/src/Yasumi/Provider/Spain/Galicia.php @@ -28,7 +28,7 @@ * Spanish autonomous communities of Castile and León and Asturias to the east, and the Atlantic Ocean to the west and * the north. * - * @link http://en.wikipedia.org/wiki/Galicia_(Spain) + * @link https://en.wikipedia.org/wiki/Galicia_(Spain) */ class Galicia extends Spain { @@ -69,7 +69,7 @@ public function initialize(): void * taken place on May 17 each year since 1963. In the year 1991 Galician Literature Day was declared a public * holiday in all Galicia. * - * @link http://en.wikipedia.org/wiki/Galician_Literature_Day + * @link https://en.wikipedia.org/wiki/Galician_Literature_Day * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -97,7 +97,7 @@ private function calculateGalicianLiteratureDay(): void * Sunday. If July 25 falls on a Tuesday or Thursday, many businesses and organizations are also closed on Monday, * July 24, or Friday, July 26. In the rest of Spain, July 25 is not a public holiday. * - * @link http://www.timeanddate.com/holidays/spain/santiago-apostle + * @link https://www.timeanddate.com/holidays/spain/santiago-apostle * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Spain/LaRioja.php b/src/Yasumi/Provider/Spain/LaRioja.php index 0673b6aa7..488dcf66a 100755 --- a/src/Yasumi/Provider/Spain/LaRioja.php +++ b/src/Yasumi/Provider/Spain/LaRioja.php @@ -27,7 +27,7 @@ * capital is Logroño. Other cities and towns in the province include Calahorra, Arnedo, Alfaro, Haro, Santo Domingo de * la Calzada, and Nájera. It has an estimated population of 322,415 inhabitants. * - * @link http://en.wikipedia.org/wiki/La_Rioja_(Spain) + * @link https://en.wikipedia.org/wiki/La_Rioja_(Spain) */ class LaRioja extends Spain { @@ -65,7 +65,7 @@ public function initialize(): void * La Rioja, on June 9. It marks the anniversary of when the autonomous community of La Rioja's statute was approved * on June 9, 1982. The Day of La Rioja was first observed on June 9, 1983. * - * @link http://www.timeanddate.com/holidays/spain/rioja-day + * @link https://www.timeanddate.com/holidays/spain/rioja-day * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Spain/Melilla.php b/src/Yasumi/Provider/Spain/Melilla.php index e049aecf8..4584a0cb2 100755 --- a/src/Yasumi/Provider/Spain/Melilla.php +++ b/src/Yasumi/Provider/Spain/Melilla.php @@ -25,7 +25,7 @@ * square kilometres (4.7 sq mi). Melilla, along with Ceuta, is one of two permanently inhabited Spanish cities in * mainland Africa. It was part of Málaga province until 14 March 1995, when the city's Statute of Autonomy was passed. * - * @link http://en.wikipedia.org/wiki/Melilla + * @link https://en.wikipedia.org/wiki/Melilla */ class Melilla extends Spain { diff --git a/src/Yasumi/Provider/Spain/Navarre.php b/src/Yasumi/Provider/Spain/Navarre.php index 0000a1922..1a1a8f4e2 100755 --- a/src/Yasumi/Provider/Spain/Navarre.php +++ b/src/Yasumi/Provider/Spain/Navarre.php @@ -25,7 +25,7 @@ * Basque Country, La Rioja, and Aragon in Spain and Aquitaine in France. The capital city is Pamplona (or Iruña in * Basque). * - * @link http://en.wikipedia.org/wiki/Navarre + * @link https://en.wikipedia.org/wiki/Navarre */ class Navarre extends Spain { diff --git a/src/Yasumi/Provider/Spain/RegionOfMurcia.php b/src/Yasumi/Provider/Spain/RegionOfMurcia.php index b54a0449d..2a79d2ebc 100755 --- a/src/Yasumi/Provider/Spain/RegionOfMurcia.php +++ b/src/Yasumi/Provider/Spain/RegionOfMurcia.php @@ -27,7 +27,7 @@ * Valencian Community, on the Mediterranean coast. The city of Murcia is the capital of the region and seat of * government organs, except for the parliament, the Regional Assembly of Murcia, which is located in Cartagena. * - * @link http://en.wikipedia.org/wiki/Region_of_Murcia + * @link https://en.wikipedia.org/wiki/Region_of_Murcia */ class RegionOfMurcia extends Spain { @@ -66,7 +66,7 @@ public function initialize(): void * community of Murcia, Spain, on June 9. It marks the anniversary of the approval of the statute of autonomy of * Murcia on June 9, 1982. The Day of the Region of Murcia was first celebrated on June 9, 1983. * - * @link http://www.timeanddate.com/holidays/spain/murcia-day + * @link https://www.timeanddate.com/holidays/spain/murcia-day * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Spain/ValencianCommunity.php b/src/Yasumi/Provider/Spain/ValencianCommunity.php index 9385a73c9..24bc2566d 100755 --- a/src/Yasumi/Provider/Spain/ValencianCommunity.php +++ b/src/Yasumi/Provider/Spain/ValencianCommunity.php @@ -30,7 +30,7 @@ * Castile–La Mancha to the west, and Murcia to the south. It is formed by the provinces of Castelló, València and * Alacant. * - * @link http://en.wikipedia.org/wiki/Valencian_Community + * @link https://en.wikipedia.org/wiki/Valencian_Community */ class ValencianCommunity extends Spain { @@ -73,7 +73,7 @@ public function initialize(): void * autonomous communities of Catalonia, Aragon, Castile-La Mancha, and Mercia. The Balearic Islands are close by in * the Mediterranean. The Valencia region gained some autonomy in 1977 and full autonomy in 1982. * - * @link http://www.timeanddate.com/holidays/spain/the-valencian-community-day + * @link https://www.timeanddate.com/holidays/spain/the-valencian-community-day * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/Sweden.php b/src/Yasumi/Provider/Sweden.php index 56678f23c..6df730215 100644 --- a/src/Yasumi/Provider/Sweden.php +++ b/src/Yasumi/Provider/Sweden.php @@ -177,7 +177,7 @@ private function calculateStJohnsHolidays(): void * In many Lutheran Churches, it is moved to the first Sunday of November. * * @link https://en.wikipedia.org/wiki/All_Saints%27_Day - * @link http://www.timeanddate.com/holidays/sweden/all-saints-day + * @link https://www.timeanddate.com/holidays/sweden/all-saints-day * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/src/Yasumi/Provider/USA.php b/src/Yasumi/Provider/USA.php index 855061de0..ef4eceb06 100755 --- a/src/Yasumi/Provider/USA.php +++ b/src/Yasumi/Provider/USA.php @@ -70,7 +70,7 @@ public function initialize(): void * Honors Dr. Martin Luther King, Jr., Civil Rights leader, who was actually born on January 15, 1929; combined * with other holidays in several states. It is observed on the third Monday of January since 1986. * - * @link http://en.wikipedia.org/wiki/Martin_Luther_King,_Jr._Day + * @link https://en.wikipedia.org/wiki/Martin_Luther_King,_Jr._Day * * @throws \Exception */ @@ -94,7 +94,7 @@ private function calculateMartinLutherKingday(): void * Act, 1968 shifted the date of the commemoration of Washington's Birthday from February 22 to the third Monday * in February. * - * @link http://en.wikipedia.org/wiki/Washington%27s_Birthday + * @link https://en.wikipedia.org/wiki/Washington%27s_Birthday * * @throws \Exception */ @@ -119,7 +119,7 @@ private function calculateWashingtonsBirthday(): void * Memorial Day was first declared a federal holiday on May 1, 1865. The Uniform Holidays Act, 1968 shifted the * date of the commemoration of Memorial Day from May 30 to the last Monday in May. * - * @link http://en.wikipedia.org/wiki/Memorial_Day + * @link https://en.wikipedia.org/wiki/Memorial_Day * * @throws \Exception */ @@ -144,7 +144,7 @@ private function calculateMemorialDay(): void * from Great Britain. In case Independence Day falls on a Sunday, a substituted holiday is observed the * following Monday. If it falls on a Saturday, a substituted holiday is observed the previous Friday. * - * @link http://en.wikipedia.org/wiki/Independence_Day_(United_States) + * @link https://en.wikipedia.org/wiki/Independence_Day_(United_States) * * @throws \Exception */ @@ -163,7 +163,7 @@ private function calculateIndependenceDay(): void * Labor Day in the United States is a holiday celebrated on the first Monday in September. It is a celebration * of the American labor movement and is dedicated to the social and economic achievements of workers. * - * @link http://en.wikipedia.org/wiki/Labor_Day + * @link https://en.wikipedia.org/wiki/Labor_Day * * @throws \Exception */ @@ -190,7 +190,7 @@ private function calculateLabourDay(): void * though people have celebrated Columbus's voyage since the colonial period. Since 1970 (Oct. 12), the holiday * has been fixed to the second Monday in October. * - * @link http://en.wikipedia.org/wiki/Columbus_Day + * @link https://en.wikipedia.org/wiki/Columbus_Day * * @throws \Exception */ @@ -214,7 +214,7 @@ private function calculateColumbusDay(): void * also known as veterans. It is a federal holiday that is observed on November 11 since 1919. Congress amended * a bill on June 1, 1954, replacing "Armistice" with "Veterans," and it has been known as Veterans Day since. * - * @link http://en.wikipedia.org/wiki/Veterans_Day + * @link https://en.wikipedia.org/wiki/Veterans_Day * * @throws \Exception */ @@ -237,7 +237,7 @@ private function calculateVeteransDay(): void * President Abraham Lincoln proclaimed a national day of "Thanksgiving and Praise to our beneficent Father who * dwelleth in the Heavens", to be celebrated on the last Thursday in November. * - * @link http://en.wikipedia.org/wiki/Thanksgiving_(United_States) + * @link https://en.wikipedia.org/wiki/Thanksgiving_(United_States) * * @throws \Exception */ diff --git a/src/Yasumi/Provider/UnitedKingdom.php b/src/Yasumi/Provider/UnitedKingdom.php index 8c8161d7d..e1f4c0417 100644 --- a/src/Yasumi/Provider/UnitedKingdom.php +++ b/src/Yasumi/Provider/UnitedKingdom.php @@ -68,7 +68,7 @@ public function initialize(): void * Since 1974 (by Royal Proclamation) it was established as a bank holiday. * * @link https://en.wikipedia.org/wiki/Public_holidays_in_the_United_Kingdom - * @link http://www.timeanddate.com/holidays/uk/new-year-day + * @link https://www.timeanddate.com/holidays/uk/new-year-day * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -107,7 +107,7 @@ protected function calculateNewYearsDay(): void * and schools are closed, while stores may be open or closed, according to local custom. Public transport systems * often run to a holiday timetable. * - * @link http://www.timeanddate.com/holidays/uk/early-may-bank-holiday + * @link https://www.timeanddate.com/holidays/uk/early-may-bank-holiday * * @throws InvalidDateException * @throws \InvalidArgumentException @@ -151,7 +151,7 @@ protected function calculateMayDayBankHoliday(): void * The last Monday in May is a bank holiday. Many organizations, businesses and schools are closed. Stores may be * open or closed, according to local custom. Public transport systems often run to a holiday timetable. * - * @link http://www.timeanddate.com/holidays/uk/spring-bank-holiday + * @link https://www.timeanddate.com/holidays/uk/spring-bank-holiday * @link https://en.wikipedia.org/wiki/Public_holidays_in_the_United_Kingdom * * @throws InvalidDateException @@ -261,8 +261,8 @@ protected function calculateSummerBankHoliday(): void * If Christmas Day falls on a Saturday, the following Monday and Tuesday are bank holidays. All schools and many * organizations are closed in this period. Some may close for the whole week between Christmas and New Year. * - * @link http://www.timeanddate.com/holidays/uk/christmas-day - * @link http://www.timeanddate.com/holidays/uk/boxing-day + * @link https://www.timeanddate.com/holidays/uk/christmas-day + * @link https://www.timeanddate.com/holidays/uk/boxing-day * * @param string|null $type the Holiday Type (e.g. Official, Seasonal, etc.) * diff --git a/src/Yasumi/Provider/UnitedKingdom/Scotland.php b/src/Yasumi/Provider/UnitedKingdom/Scotland.php index 6001bbe45..91782564f 100644 --- a/src/Yasumi/Provider/UnitedKingdom/Scotland.php +++ b/src/Yasumi/Provider/UnitedKingdom/Scotland.php @@ -76,7 +76,7 @@ public function initialize(): void * If New Years Day falls on a Saturday, the following Monday and Tuesday are bank holidays. * * @link https://en.wikipedia.org/wiki/Public_holidays_in_Scotland - * @link http://www.timeanddate.com/holidays/uk/new-year-day + * @link https://www.timeanddate.com/holidays/uk/new-year-day * * @throws InvalidDateException * @throws \InvalidArgumentException diff --git a/tests/Italy/LiberationDayTest.php b/tests/Italy/LiberationDayTest.php index 44ccca384..fb85309bd 100644 --- a/tests/Italy/LiberationDayTest.php +++ b/tests/Italy/LiberationDayTest.php @@ -27,7 +27,7 @@ * April 25 is a national Italian holiday commemorating the end of the second world war and the end of Nazi occupation * of the country. On May 27, 1949, bill 260 made the anniversary a permanent, annual national holiday. * - * @link http://en.wikipedia.org/wiki/Liberation_Day_%28Italy%29 + * @link https://en.wikipedia.org/wiki/Liberation_Day_%28Italy%29 */ class LiberationDayTest extends ItalyBaseTestCase implements YasumiTestCaseInterface { diff --git a/tests/Italy/RepublicDayTest.php b/tests/Italy/RepublicDayTest.php index 138f1361a..7e269d073 100644 --- a/tests/Italy/RepublicDayTest.php +++ b/tests/Italy/RepublicDayTest.php @@ -27,7 +27,7 @@ * the Italian people were called to the polls to decide on the form of government, following the Second World War and * the fall of Fascism. * - * @link http://en.wikipedia.org/wiki/Festa_della_Repubblica + * @link https://en.wikipedia.org/wiki/Festa_della_Repubblica */ class RepublicDayTest extends ItalyBaseTestCase implements YasumiTestCaseInterface { From 1de54606ff5725e5f7185321ecc07cd160878cc7 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Fri, 4 Oct 2019 23:58:04 +0900 Subject: [PATCH 129/133] Removed notification It has been longtime since the release that supports PHP7 only. --- README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/README.md b/README.md index 6e74e50c3..b6c365558 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,6 @@ [![StyleCI](https://styleci.io/repos/32797151/shield?branch=master)](https://styleci.io/repos/32797151) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/azuyalabs/yasumi/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/azuyalabs/yasumi/?branch=master) -Important! ------------ -Yasumi version 2.0 has been released with support for PHP 7 only. As of January 2019 support for PHP 5 has ended. - -For the previous code base (1.8.0) a separate support branch has been created that will only receive the most critical bug fixes (for those still using PHP 5). Please note that although v1.8.x works both in PHP 5 and PHP 7, the code base hasn't been upgraded to PHP 7. - -It is highly recommended to upgrade to PHP7 and Yasumi v2.0.0 to enjoy the latest changes and improvements. More information can be found on the blog here: [Yasumi Release v2](https://azuyalabs.github.io/yasumi/blog/release_v2) - Introduction ------------ Yasumi (Japanese for 'Holiday'「休み」) is an easy PHP library to help you calculate the dates and names of holidays and other From 8dba56f7b1bda41a50ebd5b3915a57bd7393dc31 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Sat, 5 Oct 2019 03:45:43 +0200 Subject: [PATCH 130/133] Summer bank holiday test (#178) * Fix unstable test --- tests/UnitedKingdom/England/BoxingDayTest.php | 12 +++-- .../England/ChristmasDayTest.php | 12 +++-- .../England/EasterMondayTest.php | 12 +++-- tests/UnitedKingdom/England/EnglandTest.php | 11 +++-- .../UnitedKingdom/England/GoodFridayTest.php | 10 ++-- .../England/MayDayBankHolidayTest.php | 16 ++++--- .../UnitedKingdom/England/NewYearsDayTest.php | 16 ++++--- .../England/SpringBankHolidayTest.php | 16 ++++--- .../England/SummerBankHolidayTest.php | 39 ++++++++++++---- tests/UnitedKingdom/MayDayBankHolidayTest.php | 1 - .../NorthernIreland/BattleOfTheBoyneTest.php | 14 +++--- .../NorthernIreland/BoxingDayTest.php | 12 +++-- .../NorthernIreland/ChristmasDayTest.php | 12 +++-- .../NorthernIreland/EasterMondayTest.php | 12 +++-- .../NorthernIreland/GoodFridayTest.php | 10 ++-- .../NorthernIreland/MayDayBankHolidayTest.php | 16 ++++--- .../NorthernIreland/NewYearsDayTest.php | 16 ++++--- .../NorthernIreland/NorthernIrelandTest.php | 11 +++-- .../NorthernIreland/SpringBankHolidayTest.php | 12 +++-- .../NorthernIreland/StPatricksDayTest.php | 14 +++--- .../NorthernIreland/SummerBankHolidayTest.php | 46 +++++++++++++------ .../UnitedKingdom/Scotland/BoxingDayTest.php | 12 +++-- .../Scotland/ChristmasDayTest.php | 12 +++-- .../UnitedKingdom/Scotland/GoodFridayTest.php | 10 ++-- .../Scotland/MayDayBankHolidayTest.php | 16 ++++--- .../Scotland/NewYearsDayTest.php | 16 ++++--- tests/UnitedKingdom/Scotland/ScotlandTest.php | 11 +++-- .../Scotland/SecondNewYearsDayTest.php | 16 ++++--- .../Scotland/SpringBankHolidayTest.php | 12 +++-- .../Scotland/StAndrewsDayTest.php | 12 +++-- .../Scotland/SummerBankHolidayTest.php | 12 +++-- tests/UnitedKingdom/SpringBankHolidayTest.php | 1 - tests/UnitedKingdom/SummerBankHolidayTest.php | 19 ++++++-- tests/UnitedKingdom/Wales/BoxingDayTest.php | 12 +++-- .../UnitedKingdom/Wales/ChristmasDayTest.php | 12 +++-- .../UnitedKingdom/Wales/EasterMondayTest.php | 12 +++-- tests/UnitedKingdom/Wales/GoodFridayTest.php | 10 ++-- .../Wales/MayDayBankHolidayTest.php | 16 ++++--- tests/UnitedKingdom/Wales/NewYearsDayTest.php | 16 ++++--- .../Wales/SpringBankHolidayTest.php | 16 ++++--- .../Wales/SummerBankHolidayTest.php | 41 +++++++++++++---- tests/UnitedKingdom/Wales/WalesTest.php | 11 +++-- 42 files changed, 373 insertions(+), 242 deletions(-) diff --git a/tests/UnitedKingdom/England/BoxingDayTest.php b/tests/UnitedKingdom/England/BoxingDayTest.php index be01bddbc..bf689d0d7 100644 --- a/tests/UnitedKingdom/England/BoxingDayTest.php +++ b/tests/UnitedKingdom/England/BoxingDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class BoxingDayTest extends EnglandBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -55,7 +57,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -73,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -87,7 +89,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/ChristmasDayTest.php b/tests/UnitedKingdom/England/ChristmasDayTest.php index 391c13336..c416252e1 100644 --- a/tests/UnitedKingdom/England/ChristmasDayTest.php +++ b/tests/UnitedKingdom/England/ChristmasDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class ChristmasDayTest extends EnglandBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -55,7 +57,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -73,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -87,7 +89,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/EasterMondayTest.php b/tests/UnitedKingdom/England/EasterMondayTest.php index 7a4be0510..4c0570255 100644 --- a/tests/UnitedKingdom/England/EasterMondayTest.php +++ b/tests/UnitedKingdom/England/EasterMondayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class EasterMondayTest extends EnglandBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -72,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -86,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/EnglandTest.php b/tests/UnitedKingdom/England/EnglandTest.php index b5bb2c4cd..35366f83e 100644 --- a/tests/UnitedKingdom/England/EnglandTest.php +++ b/tests/UnitedKingdom/England/EnglandTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\UnitedKingdom\England; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class EnglandTest extends EnglandBaseTestCase /** * Tests if all official holidays in England are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -38,7 +39,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in England are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -47,7 +48,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in England are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -56,7 +57,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in England are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -71,7 +72,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in England are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/UnitedKingdom/England/GoodFridayTest.php b/tests/UnitedKingdom/England/GoodFridayTest.php index 9bd83bcb7..ca21008bf 100644 --- a/tests/UnitedKingdom/England/GoodFridayTest.php +++ b/tests/UnitedKingdom/England/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends EnglandBaseTestCase implements YasumiTestCaseInterf /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php index 68b6723de..3ced29d35 100644 --- a/tests/UnitedKingdom/England/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/England/MayDayBankHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class MayDayBankHolidayTest extends EnglandBaseTestCase implements YasumiTestCas /** * Tests the holiday defined in this test. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -52,8 +54,8 @@ public function testHoliday() /** * Tests the holiday exception in 1995 and 2020. * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayExceptions() { @@ -74,7 +76,7 @@ public function testHolidayExceptions() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -87,7 +89,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -101,7 +103,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/NewYearsDayTest.php b/tests/UnitedKingdom/England/NewYearsDayTest.php index 8ee27b5f2..6149c5162 100644 --- a/tests/UnitedKingdom/England/NewYearsDayTest.php +++ b/tests/UnitedKingdom/England/NewYearsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -45,8 +47,8 @@ class NewYearsDayTest extends EnglandBaseTestCase implements YasumiTestCaseInter * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayOnAfterEstablishment($year, $expected) { @@ -60,7 +62,7 @@ public function testHolidayOnAfterEstablishment($year, $expected) /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -73,7 +75,7 @@ public function testHolidayBeforeEstablishment() /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayIsObservedTypeBeforeChange() { @@ -89,7 +91,7 @@ public function testHolidayIsObservedTypeBeforeChange() * 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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -98,7 +100,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -112,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/SpringBankHolidayTest.php b/tests/UnitedKingdom/England/SpringBankHolidayTest.php index d7b87d5d1..560b3fe6a 100644 --- a/tests/UnitedKingdom/England/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SpringBankHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class SpringBankHolidayTest extends EnglandBaseTestCase implements YasumiTestCas /** * Tests the holiday defined in this test. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -52,8 +54,8 @@ public function testHoliday() /** * Tests the holiday exceptions in 2002 and 2012. * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayException() { @@ -74,7 +76,7 @@ public function testHolidayException() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -87,7 +89,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -101,7 +103,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/England/SummerBankHolidayTest.php b/tests/UnitedKingdom/England/SummerBankHolidayTest.php index 9a0b8923a..54e9c8c41 100644 --- a/tests/UnitedKingdom/England/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SummerBankHolidayTest.php @@ -32,10 +32,15 @@ class SummerBankHolidayTest extends EnglandBaseTestCase implements YasumiTestCas */ public const ESTABLISHMENT_YEAR = 1871; + /** + * The year in which the holiday was renamed from August Bank Holiday to Summer Bank Holiday. + */ + public const RENAME_YEAR = 1965; + /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -51,8 +56,8 @@ public function testHoliday() /** * Tests the holiday exception in 2020. * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayBefore1965() { @@ -68,8 +73,8 @@ public function testHolidayBefore1965() /** * Tests the holiday during trial period in 1965-1970. * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayTrialPeriod() { @@ -113,7 +118,7 @@ public function testHolidayTrialPeriod() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -126,21 +131,35 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + $this->generateRandomYear(self::RENAME_YEAR), [self::LOCALE => 'Summer Bank Holiday'] ); } + /** + * Tests the translated name of the holiday defined in this test. + * @throws ReflectionException + */ + public function testTranslationBeforeRename(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::RENAME_YEAR - 1), + [self::LOCALE => 'August Bank Holiday'] + ); + } + /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/MayDayBankHolidayTest.php b/tests/UnitedKingdom/MayDayBankHolidayTest.php index 2586196a6..d6d12e122 100644 --- a/tests/UnitedKingdom/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/MayDayBankHolidayTest.php @@ -54,7 +54,6 @@ public function testHoliday() * Tests the holiday exception in 1995 and 2020. * @throws ReflectionException * @throws Exception - * @throws Exception */ public function testHolidayExceptions() { diff --git a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php index e58f16f27..766d6bd15 100644 --- a/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BattleOfTheBoyneTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class BattleOfTheBoyneTest extends NorthernIrelandBaseTestCase implements Yasumi * @param int $year the year for which the holiday defined in this test needs to be tested * @param \DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -56,7 +58,7 @@ public function testHoliday($year, $expected) /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -71,7 +73,7 @@ public function testHolidayBeforeEstablishment() * 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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -89,7 +91,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -103,7 +105,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php index 1d9d52c18..42b4101ce 100644 --- a/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/BoxingDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class BoxingDayTest extends NorthernIrelandBaseTestCase implements YasumiTestCas * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -55,7 +57,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -73,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -87,7 +89,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php index 5f5dbfca4..d5d393f71 100644 --- a/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/ChristmasDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class ChristmasDayTest extends NorthernIrelandBaseTestCase implements YasumiTest * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -55,7 +57,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -73,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -87,7 +89,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php index 6df23bf86..39c215e4f 100644 --- a/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/EasterMondayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class EasterMondayTest extends NorthernIrelandBaseTestCase implements YasumiTest * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -72,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -86,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php index c2529f693..9c9722fd6 100644 --- a/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends NorthernIrelandBaseTestCase implements YasumiTestCa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php index da085b9d8..08b38cc73 100644 --- a/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/MayDayBankHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class MayDayBankHolidayTest extends NorthernIrelandBaseTestCase implements Yasum /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -51,8 +53,8 @@ public function testHoliday() /** * Tests the holiday exception in 1995 and 2020. * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayExceptions() { @@ -73,7 +75,7 @@ public function testHolidayExceptions() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -86,7 +88,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -100,7 +102,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php index 66f2aa930..b46bd36dc 100644 --- a/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NewYearsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -45,8 +47,8 @@ class NewYearsDayTest extends NorthernIrelandBaseTestCase implements YasumiTestC * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayOnAfterEstablishment($year, $expected) { @@ -60,7 +62,7 @@ public function testHolidayOnAfterEstablishment($year, $expected) /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -73,7 +75,7 @@ public function testHolidayBeforeEstablishment() /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayIsObservedTypeBeforeChange() { @@ -89,7 +91,7 @@ public function testHolidayIsObservedTypeBeforeChange() * 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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -98,7 +100,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -112,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php index 745c2f0b5..fb84414c1 100644 --- a/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php +++ b/tests/UnitedKingdom/NorthernIreland/NorthernIrelandTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\UnitedKingdom\NorthernIreland; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class NorthernIrelandTest extends NorthernIrelandBaseTestCase /** * Tests if all official holidays in Northern Ireland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -38,7 +39,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Northern Ireland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -47,7 +48,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Northern Ireland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -56,7 +57,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Northern Ireland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -72,7 +73,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Northern Ireland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php index 341d74f13..73aa13ef1 100644 --- a/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SpringBankHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class SpringBankHolidayTest extends NorthernIrelandBaseTestCase implements Yasum /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -50,7 +52,7 @@ public function testHoliday() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php index 09607d2bc..835014044 100644 --- a/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/StPatricksDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class StPatricksDayTest extends NorthernIrelandBaseTestCase implements YasumiTes * @param int $year the year for which the holiday defined in this test needs to be tested * @param \DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -56,7 +58,7 @@ public function testHoliday($year, $expected) /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -71,7 +73,7 @@ public function testHolidayBeforeEstablishment() * 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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -89,7 +91,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -103,7 +105,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php index 56a2076bd..eb5d93073 100644 --- a/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/NorthernIreland/SummerBankHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,10 +34,15 @@ class SummerBankHolidayTest extends NorthernIrelandBaseTestCase implements Yasum */ public const ESTABLISHMENT_YEAR = 1871; + /** + * The year in which the holiday was renamed from August Bank Holiday to Summer Bank Holiday. + */ + public const RENAME_YEAR = 1965; + /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -51,8 +58,8 @@ public function testHoliday() /** * Tests the holiday exception in 2020. * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayBefore1965() { @@ -67,13 +74,8 @@ public function testHolidayBefore1965() /** * Tests the holiday during trial period in 1965-1970. - * @throws \ReflectionException - * @throws \Exception - * @throws \Exception - * @throws \Exception - * @throws \Exception - * @throws \Exception - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayTrialPeriod() { @@ -117,7 +119,7 @@ public function testHolidayTrialPeriod() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -130,21 +132,35 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + $this->generateRandomYear(self::RENAME_YEAR), [self::LOCALE => 'Summer Bank Holiday'] ); } + /** + * Tests the translated name of the holiday defined in this test. + * @throws ReflectionException + */ + public function testTranslationBeforeRename(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::RENAME_YEAR - 1), + [self::LOCALE => 'August Bank Holiday'] + ); + } + /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/BoxingDayTest.php b/tests/UnitedKingdom/Scotland/BoxingDayTest.php index 616494a15..b81708d4e 100644 --- a/tests/UnitedKingdom/Scotland/BoxingDayTest.php +++ b/tests/UnitedKingdom/Scotland/BoxingDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class BoxingDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -55,7 +57,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -73,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -87,7 +89,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php index 5c45cc0e5..b9e829841 100644 --- a/tests/UnitedKingdom/Scotland/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Scotland/ChristmasDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class ChristmasDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -55,7 +57,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -73,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -87,7 +89,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/GoodFridayTest.php b/tests/UnitedKingdom/Scotland/GoodFridayTest.php index c38a3981d..066bdd63b 100644 --- a/tests/UnitedKingdom/Scotland/GoodFridayTest.php +++ b/tests/UnitedKingdom/Scotland/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends ScotlandBaseTestCase implements YasumiTestCaseInter /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php index 830a19477..e3659fcf5 100644 --- a/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/MayDayBankHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class MayDayBankHolidayTest extends ScotlandBaseTestCase implements YasumiTestCa /** * Tests the holiday defined in this test. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -52,8 +54,8 @@ public function testHoliday() /** * Tests the holiday exception in 1995 and 2020. * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayExceptions() { @@ -74,7 +76,7 @@ public function testHolidayExceptions() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -87,7 +89,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -101,7 +103,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php index 418955622..96ac0792f 100644 --- a/tests/UnitedKingdom/Scotland/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/NewYearsDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -46,8 +48,8 @@ class NewYearsDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInte * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayOnAfterEstablishment($year, $expected) { @@ -62,7 +64,7 @@ public function testHolidayOnAfterEstablishment($year, $expected) /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -75,7 +77,7 @@ public function testHolidayBeforeEstablishment() /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayIsObservedTypeBeforeChange() { @@ -91,7 +93,7 @@ public function testHolidayIsObservedTypeBeforeChange() * 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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -108,7 +110,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -122,7 +124,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/ScotlandTest.php b/tests/UnitedKingdom/Scotland/ScotlandTest.php index 670b88966..495d790fd 100644 --- a/tests/UnitedKingdom/Scotland/ScotlandTest.php +++ b/tests/UnitedKingdom/Scotland/ScotlandTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\UnitedKingdom\Scotland; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class ScotlandTest extends ScotlandBaseTestCase /** * Tests if all official holidays in Scotland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -36,7 +37,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Scotland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -45,7 +46,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Scotland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -54,7 +55,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Scotland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -70,7 +71,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Scotland are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { diff --git a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php index 4a6962204..d2aaefed6 100644 --- a/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php +++ b/tests/UnitedKingdom/Scotland/SecondNewYearsDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -46,8 +48,8 @@ class SecondNewYearsDayTest extends ScotlandBaseTestCase implements YasumiTestCa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayOnAfterEstablishment($year, $expected) { @@ -62,7 +64,7 @@ public function testHolidayOnAfterEstablishment($year, $expected) /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -75,7 +77,7 @@ public function testHolidayBeforeEstablishment() /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayIsObservedTypeBeforeChange() { @@ -91,7 +93,7 @@ public function testHolidayIsObservedTypeBeforeChange() * 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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -108,7 +110,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -122,7 +124,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php index 38503ef67..014d6e97c 100644 --- a/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SpringBankHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class SpringBankHolidayTest extends ScotlandBaseTestCase implements YasumiTestCa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -50,7 +52,7 @@ public function testHoliday() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php index 8baf7109e..151485d38 100644 --- a/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php +++ b/tests/UnitedKingdom/Scotland/StAndrewsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -40,8 +42,8 @@ class StAndrewsDayTest extends ScotlandBaseTestCase implements YasumiTestCaseInt * @param int $year the year for which the holiday defined in this test needs to be tested * @param \DateTime $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -58,7 +60,7 @@ public function testHoliday($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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -76,7 +78,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. * - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -90,7 +92,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php index 70eee7ce2..783106888 100644 --- a/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Scotland/SummerBankHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class SummerBankHolidayTest extends ScotlandBaseTestCase implements YasumiTestCa /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -50,7 +52,7 @@ public function testHoliday() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -63,7 +65,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -77,7 +79,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/SpringBankHolidayTest.php b/tests/UnitedKingdom/SpringBankHolidayTest.php index b27822aee..348b5b7a1 100644 --- a/tests/UnitedKingdom/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/SpringBankHolidayTest.php @@ -54,7 +54,6 @@ public function testHoliday() * Tests the holiday exceptions in 2002 and 2012. * @throws ReflectionException * @throws Exception - * @throws Exception */ public function testHolidayException() { diff --git a/tests/UnitedKingdom/SummerBankHolidayTest.php b/tests/UnitedKingdom/SummerBankHolidayTest.php index adac910fb..fe591a8c4 100644 --- a/tests/UnitedKingdom/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/SummerBankHolidayTest.php @@ -75,11 +75,6 @@ public function testHolidayBefore1965() * Tests the holiday during trial period in 1965-1970. * @throws ReflectionException * @throws Exception - * @throws Exception - * @throws Exception - * @throws Exception - * @throws Exception - * @throws Exception */ public function testHolidayTrialPeriod() { @@ -148,6 +143,20 @@ public function testTranslation(): void ); } + /** + * Tests the translated name of the holiday defined in this test. + * @throws ReflectionException + */ + public function testTranslationBeforeRename(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::RENAME_YEAR - 1), + [self::LOCALE => 'August Bank Holiday'] + ); + } + /** * Tests type of the holiday defined in this test. * @throws ReflectionException diff --git a/tests/UnitedKingdom/Wales/BoxingDayTest.php b/tests/UnitedKingdom/Wales/BoxingDayTest.php index bf88db1b0..eee71a3cb 100644 --- a/tests/UnitedKingdom/Wales/BoxingDayTest.php +++ b/tests/UnitedKingdom/Wales/BoxingDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class BoxingDayTest extends WalesBaseTestCase implements YasumiTestCaseInterface * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -55,7 +57,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -73,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -87,7 +89,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/ChristmasDayTest.php b/tests/UnitedKingdom/Wales/ChristmasDayTest.php index f89a2d3f4..b32321bc1 100644 --- a/tests/UnitedKingdom/Wales/ChristmasDayTest.php +++ b/tests/UnitedKingdom/Wales/ChristmasDayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class ChristmasDayTest extends WalesBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -55,7 +57,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -73,7 +75,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -87,7 +89,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/EasterMondayTest.php b/tests/UnitedKingdom/Wales/EasterMondayTest.php index 837bbde20..03910b78e 100644 --- a/tests/UnitedKingdom/Wales/EasterMondayTest.php +++ b/tests/UnitedKingdom/Wales/EasterMondayTest.php @@ -15,6 +15,8 @@ use DateInterval; use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -36,8 +38,8 @@ class EasterMondayTest extends WalesBaseTestCase implements YasumiTestCaseInterf * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHoliday($year, $expected) { @@ -53,7 +55,7 @@ public function testHoliday($year, $expected) * Returns a list of test dates * * @return array list of test dates for the holiday defined in this test - * @throws \Exception + * @throws Exception */ public function HolidayDataProvider(): array { @@ -72,7 +74,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -86,7 +88,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/GoodFridayTest.php b/tests/UnitedKingdom/Wales/GoodFridayTest.php index 100a4eb17..d4ec2a195 100644 --- a/tests/UnitedKingdom/Wales/GoodFridayTest.php +++ b/tests/UnitedKingdom/Wales/GoodFridayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -29,8 +31,8 @@ class GoodFridayTest extends WalesBaseTestCase implements YasumiTestCaseInterfac /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -45,7 +47,7 @@ public function testHoliday() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -59,7 +61,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php index 40e3e7519..b8d710000 100644 --- a/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/MayDayBankHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -35,8 +37,8 @@ class MayDayBankHolidayTest extends WalesBaseTestCase implements YasumiTestCaseI /** * Tests the holiday defined in this test. * - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -52,8 +54,8 @@ public function testHoliday() /** * Tests the holiday exception in 1995 and 2020. * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayExceptions() { @@ -74,7 +76,7 @@ public function testHolidayExceptions() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -87,7 +89,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -101,7 +103,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/NewYearsDayTest.php b/tests/UnitedKingdom/Wales/NewYearsDayTest.php index a11078001..eb0c293a9 100644 --- a/tests/UnitedKingdom/Wales/NewYearsDayTest.php +++ b/tests/UnitedKingdom/Wales/NewYearsDayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -45,8 +47,8 @@ class NewYearsDayTest extends WalesBaseTestCase implements YasumiTestCaseInterfa * @param int $year the year for which the holiday defined in this test needs to be tested * @param string $expected the expected date * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayOnAfterEstablishment($year, $expected) { @@ -60,7 +62,7 @@ public function testHolidayOnAfterEstablishment($year, $expected) /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -73,7 +75,7 @@ public function testHolidayBeforeEstablishment() /** * Tests that the holiday defined in this test is of the type 'observance' before the year it was changed. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayIsObservedTypeBeforeChange() { @@ -89,7 +91,7 @@ public function testHolidayIsObservedTypeBeforeChange() * 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 + * @throws Exception */ public function HolidayDataProvider(): array { @@ -98,7 +100,7 @@ public function HolidayDataProvider(): array /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -112,7 +114,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php index 0a9890ce3..d9b7a577a 100644 --- a/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SpringBankHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -34,8 +36,8 @@ class SpringBankHolidayTest extends WalesBaseTestCase implements YasumiTestCaseI /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -51,8 +53,8 @@ public function testHoliday() /** * Tests the holiday exceptions in 2002 and 2012. * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayException() { @@ -73,7 +75,7 @@ public function testHolidayException() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -86,7 +88,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { @@ -100,7 +102,7 @@ public function testTranslation(): void /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php index a84ef460f..ca69ded05 100644 --- a/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/Wales/SummerBankHolidayTest.php @@ -14,6 +14,8 @@ use DateTime; use DateTimeZone; +use Exception; +use ReflectionException; use Yasumi\Holiday; use Yasumi\tests\YasumiTestCaseInterface; @@ -32,10 +34,15 @@ class SummerBankHolidayTest extends WalesBaseTestCase implements YasumiTestCaseI */ public const ESTABLISHMENT_YEAR = 1871; + /** + * The year in which the holiday was renamed from August Bank Holiday to Summer Bank Holiday. + */ + public const RENAME_YEAR = 1965; + /** * Tests the holiday defined in this test. - * @throws \Exception - * @throws \ReflectionException + * @throws Exception + * @throws ReflectionException */ public function testHoliday() { @@ -51,8 +58,8 @@ public function testHoliday() /** * Tests the holiday exception in 2020. * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayBefore1965() { @@ -68,8 +75,8 @@ public function testHolidayBefore1965() /** * Tests the holiday during trial period in 1965-1970. * - * @throws \ReflectionException - * @throws \Exception + * @throws ReflectionException + * @throws Exception */ public function testHolidayTrialPeriod() { @@ -113,7 +120,7 @@ public function testHolidayTrialPeriod() /** * Tests the holiday defined in this test before establishment. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -126,21 +133,35 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testTranslation(): void { $this->assertTranslatedHolidayName( self::REGION, self::HOLIDAY, - $this->generateRandomYear(self::ESTABLISHMENT_YEAR), + $this->generateRandomYear(self::RENAME_YEAR), [self::LOCALE => 'Summer Bank Holiday'] ); } + /** + * Tests the translated name of the holiday defined in this test. + * @throws ReflectionException + */ + public function testTranslationBeforeRename(): void + { + $this->assertTranslatedHolidayName( + self::REGION, + self::HOLIDAY, + $this->generateRandomYear(self::ESTABLISHMENT_YEAR, self::RENAME_YEAR - 1), + [self::LOCALE => 'August Bank Holiday'] + ); + } + /** * Tests type of the holiday defined in this test. - * @throws \ReflectionException + * @throws ReflectionException */ public function testHolidayType(): void { diff --git a/tests/UnitedKingdom/Wales/WalesTest.php b/tests/UnitedKingdom/Wales/WalesTest.php index 04ede843e..279b5dc01 100644 --- a/tests/UnitedKingdom/Wales/WalesTest.php +++ b/tests/UnitedKingdom/Wales/WalesTest.php @@ -12,6 +12,7 @@ namespace Yasumi\tests\UnitedKingdom\Wales; +use ReflectionException; use Yasumi\Holiday; /** @@ -26,7 +27,7 @@ class WalesTest extends WalesBaseTestCase /** * Tests if all official holidays in Wales are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOfficialHolidays(): void { @@ -38,7 +39,7 @@ public function testOfficialHolidays(): void /** * Tests if all observed holidays in Wales are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testObservedHolidays(): void { @@ -47,7 +48,7 @@ public function testObservedHolidays(): void /** * Tests if all seasonal holidays in Wales are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testSeasonalHolidays(): void { @@ -56,7 +57,7 @@ public function testSeasonalHolidays(): void /** * Tests if all bank holidays in Wales are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testBankHolidays(): void { @@ -71,7 +72,7 @@ public function testBankHolidays(): void /** * Tests if all other holidays in Wales are defined by the provider class - * @throws \ReflectionException + * @throws ReflectionException */ public function testOtherHolidays(): void { From 1687be58830a9cef6bcffc3e83b4bad989147833 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 5 Oct 2019 21:07:32 +0900 Subject: [PATCH 131/133] Used proper syntax for classes in the global namespace. Signed-off-by: Sacha Telgenhof --- .../England/SummerBankHolidayTest.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/UnitedKingdom/England/SummerBankHolidayTest.php b/tests/UnitedKingdom/England/SummerBankHolidayTest.php index 54e9c8c41..888deb764 100644 --- a/tests/UnitedKingdom/England/SummerBankHolidayTest.php +++ b/tests/UnitedKingdom/England/SummerBankHolidayTest.php @@ -39,8 +39,8 @@ class SummerBankHolidayTest extends EnglandBaseTestCase implements YasumiTestCas /** * Tests the holiday defined in this test. - * @throws Exception - * @throws ReflectionException + * @throws \Exception + * @throws \ReflectionException */ public function testHoliday() { @@ -56,8 +56,8 @@ public function testHoliday() /** * Tests the holiday exception in 2020. * - * @throws ReflectionException - * @throws Exception + * @throws \Exception + * @throws \ReflectionException */ public function testHolidayBefore1965() { @@ -73,8 +73,8 @@ public function testHolidayBefore1965() /** * Tests the holiday during trial period in 1965-1970. * - * @throws ReflectionException - * @throws Exception + * @throws \ReflectionException + * @throws \Exception */ public function testHolidayTrialPeriod() { @@ -118,7 +118,7 @@ public function testHolidayTrialPeriod() /** * Tests the holiday defined in this test before establishment. - * @throws ReflectionException + * @throws \ReflectionException */ public function testHolidayBeforeEstablishment() { @@ -131,7 +131,7 @@ public function testHolidayBeforeEstablishment() /** * Tests the translated name of the holiday defined in this test. - * @throws ReflectionException + * @throws \ReflectionException */ public function testTranslation(): void { @@ -145,7 +145,7 @@ public function testTranslation(): void /** * Tests the translated name of the holiday defined in this test. - * @throws ReflectionException + * @throws \ReflectionException */ public function testTranslationBeforeRename(): void { @@ -159,7 +159,7 @@ public function testTranslationBeforeRename(): void /** * Tests type of the holiday defined in this test. - * @throws ReflectionException + * @throws \ReflectionException */ public function testHolidayType(): void { From 88280e3d601e0dd0aef50bd1154f7e091d07c32a Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sat, 5 Oct 2019 21:58:47 +0900 Subject: [PATCH 132/133] Upgraded to PHP Unit 8.4 Signed-off-by: Sacha Telgenhof --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7dce24c30..1b256086a 100755 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "friendsofphp/php-cs-fixer": "^2.14", "fzaninotto/faker": "~1.8", "mikey179/vfsstream": "~1.6", - "phpunit/phpunit": "~8.3" + "phpunit/phpunit": "~8.4" }, "autoload": { "psr-4": { From 9870599ed23e08f083c60bb6c6c5b5125977a248 Mon Sep 17 00:00:00 2001 From: Sacha Telgenhof Date: Sun, 6 Oct 2019 12:07:51 +0900 Subject: [PATCH 133/133] Updated Changelog reflecting changes of the v2.2.0 release. Signed-off-by: Sacha Telgenhof --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa913711c..201ddcfc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this ## [Unreleased] +### Added + +### Changed + +### Fixed + +### Removed + + +## [2.2.0] - 2019-10-06 + ### Added - Holiday providers for England, Wales, Scotland and Northern Ireland [\#166](https://github.com/azuyalabs/yasumi/pull/166) ([c960657](https://github.com/c960657)) - Holiday Provider for South Korea. [\#156](https://github.com/azuyalabs/yasumi/pull/156) ([blood72](https://github.com/blood72))